From 8c62491952e1ffae5b76fb4b1e1f1ec724ab8d93 Mon Sep 17 00:00:00 2001 From: Kavitha Thulasiraman Date: Wed, 30 Jun 2021 12:11:44 -0400 Subject: [PATCH 01/10] add external db --- chart/templates/deployment.yaml | 14 ++++++++++++++ chart/templates/external-db-configmap.yaml | 19 +++++++++++++++++++ chart/values.yaml | 12 ++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 chart/templates/external-db-configmap.yaml diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index c678ca3..f4a09a8 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -121,6 +121,11 @@ spec: - mountPath: {{ .Values.config.mountPath }} name: {{ template "nexus.name" . }}-conf {{- end }} + {{- if .Values.externaldb.enabled }} + - mountPath: /nexus-data/etc/fabric/nexus-store.properties + name: {{ template "nexus.name" . }}-db-properties + subPath: nexus-store.properties + {{- end }} {{- if .Values.nexus.properties.override }} - mountPath: /nexus-data/etc/nexus.properties name: {{ template "nexus.name" . }}-properties @@ -163,6 +168,15 @@ spec: configMap: name: {{ template "nexus.name" . }}-conf {{- end }} + {{- if .Values.externaldb.enabled }} + - name: {{ template "nexus.name" . }}-db-properties + configMap: + name: {{ template "nexus.name" . }}-db-properties + items: + - key: nexus-store.properties + path: nexus-store.properties + {{- end }} + {{- if .Values.nexus.properties.override }} - name: {{ template "nexus.name" . }}-properties configMap: diff --git a/chart/templates/external-db-configmap.yaml b/chart/templates/external-db-configmap.yaml new file mode 100644 index 0000000..3a1c17a --- /dev/null +++ b/chart/templates/external-db-configmap.yaml @@ -0,0 +1,19 @@ +{{- if .Values.externaldb.enabled -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "nexus.name" . }}-db-properties + labels: {{- include "nexus.labels" . | nindent 4 }} + {{- if .Values.nexus.extraLabels }} + {{- with .Values.nexus.extraLabels }} + {{ toYaml . | indent 4 }} + {{- end }} + {{- end }} +data: + nexus-store.properties: | + username: postgres + password: 3JEDt18IKn + name: postgres + type: jdbc + jdbcUrl: jdbc\:postgresql\://my-release-postgresql\:5432/ +{{- end }} \ No newline at end of file diff --git a/chart/values.yaml b/chart/values.yaml index c1b5038..3117f21 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -115,6 +115,8 @@ nexus: override: true data: {} # data: + ## To connect to external database this field is required. External database connection is available only in pro version + # nexus.datastore.enabled: true --To connect to external database this field is reuired. External database connection is available only in pro version # nexus.licenseFile: /nexus-data/sonatype-license.override.lic # nexus.scripts.allowCreation: true # See this article for ldap configuratioon options https://support.sonatype.com/hc/en-us/articles/216597138-Setting-Advanced-LDAP-Connection-Properties-in-Nexus-Repository-Manager @@ -260,3 +262,13 @@ serviceAccount: psp: create: false + +# Parameters to connect to external db +#externaldb: + # enabled: false + #username: postgres + #password: 3JEDt18IKn + #name: postgres + #type: jdbc + #jdbcUrl: jdbc\:postgresql\://my-release-postgresql\:5432/ + -- GitLab From 8e1af6c1ef815e06a04169d157b97d5b3dee8a6f Mon Sep 17 00:00:00 2001 From: Kavitha Thulasiraman Date: Wed, 30 Jun 2021 12:50:37 -0400 Subject: [PATCH 02/10] add external db --- chart/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index 3117f21..acd6efc 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -264,8 +264,8 @@ psp: create: false # Parameters to connect to external db -#externaldb: - # enabled: false +externaldb: + enabled: false #username: postgres #password: 3JEDt18IKn #name: postgres -- GitLab From 4979de3fc3b4bc7399243f233ec0088d4f70a622 Mon Sep 17 00:00:00 2001 From: Kavitha Thulasiraman Date: Thu, 1 Jul 2021 12:24:30 -0400 Subject: [PATCH 03/10] add changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 618a676..458e48a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [29.1.0-bb.5] +### Added +- Feature to connect to external database (pro version only) + ## [29.1.0-bb.4] ### Changed - kube-api network policy toggle -- GitLab From 10498b47467d1c49cafe81391a2730bb02bd1620 Mon Sep 17 00:00:00 2001 From: Kavitha Thulasiraman Date: Fri, 2 Jul 2021 09:14:01 -0400 Subject: [PATCH 04/10] bump up chart version --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 9e9aac2..878cde7 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nexus-repository-manager -version: 29.1.0-bb.4 +version: 29.1.0-bb.5 appVersion: 3.29.0 description: Sonatype Nexus Repository Manager - Universal Binary repository type: application -- GitLab From c3ca3a5794b750e66052285310a72898bace0a83 Mon Sep 17 00:00:00 2001 From: Kavitha Thulasiraman Date: Tue, 6 Jul 2021 10:15:28 -0400 Subject: [PATCH 05/10] add external db --- chart/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/values.yaml b/chart/values.yaml index acd6efc..f6ed2d8 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -39,7 +39,7 @@ sso: id: "nexus" name: "nexus" description: "nexus group" - privileges: + Hprivileges: - "nx-all" roles: - "nx-admin" -- GitLab From 53dd381e76f3c8a49daab57ebe2e969a2b33e495 Mon Sep 17 00:00:00 2001 From: Kavitha Thulasiraman Date: Tue, 6 Jul 2021 10:35:23 -0400 Subject: [PATCH 06/10] add external db --- CHANGELOG.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 458e48a..a5f14b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,13 @@ # Changelog -## [29.1.0-bb.5] +--- +## [29.1.0-bb.6] - 2021-07-05 +## Added +- Provision to connect to external database [pro version only] + +## [29.1.0-bb.5] - 2021-06-30 ### Added -- Feature to connect to external database (pro version only) +- Network policy to allow prometheus scraping of istio envoy sidecar ## [29.1.0-bb.4] ### Changed -- GitLab From 17a0d92193d808a401f4de601b140eff517b3cbc Mon Sep 17 00:00:00 2001 From: Kavitha Thulasiraman Date: Tue, 6 Jul 2021 10:50:56 -0400 Subject: [PATCH 07/10] add external db --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4d5ae8..a5f14b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog --- +## [29.1.0-bb.6] - 2021-07-05 +## Added +- Provision to connect to external database [pro version only] + ## [29.1.0-bb.5] - 2021-06-30 ### Added - Network policy to allow prometheus scraping of istio envoy sidecar -- GitLab From b7f6e7c80c08b54fadf515c43b4a4da8104b77f9 Mon Sep 17 00:00:00 2001 From: Kavitha Thulasiraman Date: Wed, 7 Jul 2021 11:50:05 +0000 Subject: [PATCH 08/10] Update external-db-configmap.yaml --- chart/templates/external-db-configmap.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chart/templates/external-db-configmap.yaml b/chart/templates/external-db-configmap.yaml index 3a1c17a..b77b7f5 100644 --- a/chart/templates/external-db-configmap.yaml +++ b/chart/templates/external-db-configmap.yaml @@ -11,9 +11,9 @@ metadata: {{- end }} data: nexus-store.properties: | - username: postgres - password: 3JEDt18IKn - name: postgres - type: jdbc - jdbcUrl: jdbc\:postgresql\://my-release-postgresql\:5432/ -{{- end }} \ No newline at end of file + username: {{ .Values.externaldb.username }} + password: {{ .Values.externaldb.password }} + name: {{ .Values.externaldb.name }} + type: {{ .Values.externaldb.type }} + jdbcUrl: {{ .Values.externaldb.jdbcUrl }} +{{- end }} -- GitLab From 3b03c629e84e49adb27b429dcb563910a57533e9 Mon Sep 17 00:00:00 2001 From: Kavitha Thulasiraman Date: Wed, 7 Jul 2021 12:24:09 +0000 Subject: [PATCH 09/10] Update values.yaml --- chart/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/values.yaml b/chart/values.yaml index f6ed2d8..acd6efc 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -39,7 +39,7 @@ sso: id: "nexus" name: "nexus" description: "nexus group" - Hprivileges: + privileges: - "nx-all" roles: - "nx-admin" -- GitLab From 2bcdc0e9239b50d2714de42092e61ef18464606f Mon Sep 17 00:00:00 2001 From: Michael McLeroy Date: Fri, 9 Jul 2021 11:37:15 -0400 Subject: [PATCH 10/10] chore: chart version bump --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 878cde7..e07100e 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nexus-repository-manager -version: 29.1.0-bb.5 +version: 29.1.0-bb.6 appVersion: 3.29.0 description: Sonatype Nexus Repository Manager - Universal Binary repository type: application -- GitLab