diff --git a/CHANGELOG.md b/CHANGELOG.md index d4d5ae85a7c99aaa26fd9503605ed94992fafc9e..a5f14b0af19c1186176d3fe599e74d35aad1e473 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 diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 878cde7a21a7e0471925fa5d410aa56afa4401b8..e07100e2a6f047a8399559ef1200946f27758aca 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 diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index c678ca374b9bc7d31309c3becaadbf7db4d279c9..f4a09a84f3726c3e3df62158f7e9551960fe55d8 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 0000000000000000000000000000000000000000..b77b7f53c6c169326e3e17d1fa98ea81d3a6fd4e --- /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: {{ .Values.externaldb.username }} + password: {{ .Values.externaldb.password }} + name: {{ .Values.externaldb.name }} + type: {{ .Values.externaldb.type }} + jdbcUrl: {{ .Values.externaldb.jdbcUrl }} +{{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index c1b503816955f811b29fa66cdae89b9aa418dad8..acd6efcaae869d5e86ef3a7e72973ca623dfd4fa 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/ +