From e17c7bf10c071edc040480e96308ba95ea1ba2e8 Mon Sep 17 00:00:00 2001 From: devasmith <60352859+devasmith@users.noreply.github.com> Date: Mon, 12 Aug 2024 09:05:41 +0200 Subject: [PATCH] Fix caCertData to use root data object instead of current context --- charts/netbox/templates/configmap.yaml | 6 +++--- charts/netbox/templates/cronjob.yaml | 2 +- charts/netbox/templates/deployment.yaml | 2 +- charts/netbox/templates/worker-deployment.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/netbox/templates/configmap.yaml b/charts/netbox/templates/configmap.yaml index c37e3019..448a3f04 100644 --- a/charts/netbox/templates/configmap.yaml +++ b/charts/netbox/templates/configmap.yaml @@ -293,7 +293,7 @@ data: AUTH_LDAP_BIND_DN: {{ $.Values.remoteAuth.ldap.bindDn | quote }} AUTH_LDAP_START_TLS: {{ toJson $.Values.remoteAuth.ldap.startTls }} LDAP_IGNORE_CERT_ERRORS: {{ toJson $.Values.remoteAuth.ldap.ignoreCertErrors }} - {{- if .Values.remoteAuth.ldap.caCertData }} + {{- if $.Values.remoteAuth.ldap.caCertData }} LDAP_CA_CERT_FILE: /etc/netbox/config/ldap/ldap_ca.crt {{- end }} AUTH_LDAP_USER_DN_TEMPLATE: {{ default nil $.Values.remoteAuth.ldap.userDnTemplate }} @@ -307,9 +307,9 @@ data: AUTH_LDAP_MIRROR_GROUPS: {{ toJson $.Values.remoteAuth.ldap.mirrorGroups }} AUTH_LDAP_MIRROR_GROUPS_EXCEPT: {{ toJson $.Values.remoteAuth.ldap.mirrorGroupsExcept }} AUTH_LDAP_CACHE_TIMEOUT: {{ int $.Values.remoteAuth.ldap.cacheTimeout }} - {{- if .Values.remoteAuth.ldap.caCertData }} + {{- if $.Values.remoteAuth.ldap.caCertData }} ldap_ca.crt: |- - {{- toYaml .Values.remoteAuth.ldap.caCertData | nindent 4 }} + {{- toYaml $.Values.remoteAuth.ldap.caCertData | nindent 4 }} {{- end }} {{- end }} {{- end }} diff --git a/charts/netbox/templates/cronjob.yaml b/charts/netbox/templates/cronjob.yaml index f56925f2..692ac704 100644 --- a/charts/netbox/templates/cronjob.yaml +++ b/charts/netbox/templates/cronjob.yaml @@ -70,7 +70,7 @@ spec: mountPath: /etc/netbox/config/ldap/ldap_config.py subPath: ldap_config.py readOnly: true - {{- if .Values.remoteAuth.ldap.caCertData }} + {{- if $.Values.remoteAuth.ldap.caCertData }} - name: config mountPath: /etc/netbox/config/ldap/ldap_ca.crt subPath: ldap_ca.crt diff --git a/charts/netbox/templates/deployment.yaml b/charts/netbox/templates/deployment.yaml index 7e67d13e..c04fe834 100644 --- a/charts/netbox/templates/deployment.yaml +++ b/charts/netbox/templates/deployment.yaml @@ -160,7 +160,7 @@ spec: mountPath: /etc/netbox/config/ldap/ldap_config.py subPath: ldap_config.py readOnly: true - {{- if .Values.remoteAuth.ldap.caCertData }} + {{- if $.Values.remoteAuth.ldap.caCertData }} - name: config mountPath: /etc/netbox/config/ldap/ldap_ca.crt subPath: ldap_ca.crt diff --git a/charts/netbox/templates/worker-deployment.yaml b/charts/netbox/templates/worker-deployment.yaml index 57e6dcdc..742405e2 100644 --- a/charts/netbox/templates/worker-deployment.yaml +++ b/charts/netbox/templates/worker-deployment.yaml @@ -76,7 +76,7 @@ spec: mountPath: /etc/netbox/config/ldap/ldap_config.py subPath: ldap_config.py readOnly: true - {{- if .Values.remoteAuth.ldap.caCertData }} + {{- if $.Values.remoteAuth.ldap.caCertData }} - name: config mountPath: /etc/netbox/config/ldap/ldap_ca.crt subPath: ldap_ca.crt