diff --git a/charts/netbox/Chart.yaml b/charts/netbox/Chart.yaml index 189cf1d..1d7ca6d 100644 --- a/charts/netbox/Chart.yaml +++ b/charts/netbox/Chart.yaml @@ -10,16 +10,16 @@ icon: https://raw.githubusercontent.com/digitalocean/netbox/develop/netbox/proje appVersion: 3.4.1 type: application -version: 4.3.14 +version: 5.0.0 maintainers: - name: Alexander Olofsson email: ace@haxalot.com dependencies: - name: postgresql - version: ^10.6.0 + version: ^12.1.4 repository: https://charts.bitnami.com/bitnami condition: postgresql.enabled - name: redis - version: ^15.7.0 + version: ^17.3.17 repository: https://charts.bitnami.com/bitnami diff --git a/charts/netbox/templates/configuration.yaml b/charts/netbox/templates/configuration.yaml index f04df54..e2a865d 100644 --- a/charts/netbox/templates/configuration.yaml +++ b/charts/netbox/templates/configuration.yaml @@ -23,8 +23,8 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} helm.sh/chart: {{ include "netbox.chart" . }} data: - DB_NAME: {{ .Values.postgresql.postgresqlDatabase | quote }} - DB_USER: {{ .Values.postgresql.postgresqlUsername | quote }} + DB_NAME: {{ .Values.postgresql.auth.database | quote }} + DB_USER: {{ .Values.postgresql.auth.username | quote }} DB_HOST: {{ .Values.postgresql.postgresqlHost | default (include "netbox.postgresql.fullname" .) }} DB_PORT: {{ .Values.postgresql.postgresqlPort | default 5432 | quote }} diff --git a/charts/netbox/templates/deployment-housekeeping.yaml b/charts/netbox/templates/deployment-housekeeping.yaml index f317a82..89d5b39 100644 --- a/charts/netbox/templates/deployment-housekeeping.yaml +++ b/charts/netbox/templates/deployment-housekeeping.yaml @@ -44,10 +44,10 @@ spec: secretKeyRef: {{- if .Values.postgresql.existingSecret }} name: {{ .Values.postgresql.existingSecret }} - key: {{ .Values.postgresql.existingSecretKey }} + key: password {{- else }} name: {{ include "netbox.postgresql.fullname" . }} - key: postgresql-password + key: password {{- end }} {{- end }} envFrom: diff --git a/charts/netbox/templates/deployment-worker.yaml b/charts/netbox/templates/deployment-worker.yaml index 68bb6de..6e21aea 100644 --- a/charts/netbox/templates/deployment-worker.yaml +++ b/charts/netbox/templates/deployment-worker.yaml @@ -46,10 +46,10 @@ spec: secretKeyRef: {{- if .Values.postgresql.existingSecret }} name: {{ .Values.postgresql.existingSecret }} - key: {{ .Values.postgresql.existingSecretKey }} + key: password {{- else }} name: {{ include "netbox.postgresql.fullname" . }} - key: postgresql-password + key: password {{- end }} {{- end }} envFrom: diff --git a/charts/netbox/templates/deployment.yaml b/charts/netbox/templates/deployment.yaml index f8742de..4a0b8c9 100644 --- a/charts/netbox/templates/deployment.yaml +++ b/charts/netbox/templates/deployment.yaml @@ -60,7 +60,7 @@ spec: key: {{ .Values.postgresql.existingSecretKey }} {{- else }} name: {{ include "netbox.postgresql.fullname" . }} - key: postgresql-password + key: password {{- end }} {{- end }} envFrom: diff --git a/charts/netbox/templates/secrets.yaml b/charts/netbox/templates/secrets.yaml index c8ec996..5571c80 100644 --- a/charts/netbox/templates/secrets.yaml +++ b/charts/netbox/templates/secrets.yaml @@ -9,8 +9,8 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} helm.sh/chart: {{ include "netbox.chart" . }} data: -{{- if and (.Values.postgresql.postgresqlPassword) (not .Values.postgresql.enabled) }} - DB_PASSWORD: {{ .Values.postgresql.postgresqlPassword | b64enc }} +{{- if and (.Values.postgresql.auth.password) (not .Values.postgresql.enabled) }} + DB_PASSWORD: {{ .Values.postgresql.auth.password | b64enc }} {{- end }} {{- if .Values.djangoSecret }} SECRET_KEY: {{ .Values.djangoSecret | b64enc }} diff --git a/charts/netbox/values.yaml b/charts/netbox/values.yaml index fbe95a3..66abe1f 100644 --- a/charts/netbox/values.yaml +++ b/charts/netbox/values.yaml @@ -44,16 +44,17 @@ ingress: postgresql: enabled: true - postgresqlDatabase: netbox - postgresqlUsername: netbox + auth: + database: netbox + username: netbox + # password: postgres + ## When defined the `password` field is ignored + ## Refer to https://github.com/bitnami/charts/blob/d839514d4ea3072a816097493e74cf583d40e3cb/bitnami/postgresql/values.yaml#L143 + # existingSecret: secret-name # The following variables are only used when internal PG is disabled # postgresqlHost: postgres - # postgresqlPassword: postgres # postgresqlPort: 5432 - # When defined the `postgresqlPassword` field is ignored - # existingSecret: secret-name - # existingSecretKey: postgresql-password redis: architecture: standalone @@ -62,6 +63,7 @@ redis: # password: netbox master: + kind: Deployment persistence: enabled: false service: