From 3c0dc8f2d276fc0a17e8f1ec37e0705fa501c9c0 Mon Sep 17 00:00:00 2001 From: Nick Hudson Date: Thu, 21 Nov 2024 15:14:54 -0600 Subject: [PATCH] fix nil pointer (#1053) --- charts/conductor/Chart.yaml | 2 +- .../conductor/templates/external-secrets.yaml | 41 +++++++++---------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/charts/conductor/Chart.yaml b/charts/conductor/Chart.yaml index dea20a826..901654362 100644 --- a/charts/conductor/Chart.yaml +++ b/charts/conductor/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.7.0 +version: 0.7.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/conductor/templates/external-secrets.yaml b/charts/conductor/templates/external-secrets.yaml index 4bef99ce5..0e6771b60 100644 --- a/charts/conductor/templates/external-secrets.yaml +++ b/charts/conductor/templates/external-secrets.yaml @@ -2,26 +2,25 @@ apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: - name: {{ .Release.Name }} - namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }} + namespace: {{ .Release.Namespace }} spec: - refreshInterval: {{ .Values.externalSecrets.refreshInterval }} - secretStoreRef: - name: {{ .Values.externalSecrets.parameterStore.name }} - kind: {{ .Values.externalSecrets.parameterStore.kind }} - target: - creationPolicy: 'Owner' - name: {{ .Values.externalSecrets.secretName }} - {{- if .Values.externalSecrets.secretRegex }} - dataFrom: - - find: - name: - regexp: {{ .Values.externalSecrets.secretRegex }} - {{- end }} - {{- if and .Values.externalSecrets.remoteRef.key .Values.externalSecrets.remoteRef.secretKey }} - data: - - secretKey: {{ .Values.externalSecrets.remoteRef.secretKey }} - remoteRef: - key: {{ .Values.externalSecrets.remoteRef.key }} - {{- end }} + refreshInterval: {{ .Values.externalSecrets.refreshInterval }} + secretStoreRef: + name: {{ .Values.externalSecrets.parameterStore.name }} + kind: {{ .Values.externalSecrets.parameterStore.kind }} + target: + creationPolicy: 'Owner' + name: {{ .Values.externalSecrets.secretName }} + {{- if .Values.externalSecrets.secretRegex }} + dataFrom: + - find: + name: + regexp: {{ .Values.externalSecrets.secretRegex }} + {{- else if and (hasKey .Values.externalSecrets "remoteRef") .Values.externalSecrets.remoteRef.key .Values.externalSecrets.remoteRef.secretKey }} + data: + - secretKey: {{ .Values.externalSecrets.remoteRef.secretKey }} + remoteRef: + key: {{ .Values.externalSecrets.remoteRef.key }} + {{- end }} {{- end }}