diff --git a/charts/snyk-broker/templates/broker_deployment.yaml b/charts/snyk-broker/templates/broker_deployment.yaml index e11a857..b102721 100644 --- a/charts/snyk-broker/templates/broker_deployment.yaml +++ b/charts/snyk-broker/templates/broker_deployment.yaml @@ -108,11 +108,13 @@ spec: secretKeyRef: name: {{ .Values.scmType}}-broker-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} key: "{{ .Values.scmType}}-broker-token-key" + {{- if not .Values.useExternalSecretScmTokenPool }} - name: GITHUB_TOKEN valueFrom: secretKeyRef: name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} key: "{{ .Values.scmType}}-token-key" + {{- end }} {{- if or (.Values.scmTokenPool) (.Values.useExternalSecretScmTokenPool) }} - name: GITHUB_TOKEN_POOL valueFrom: @@ -132,11 +134,13 @@ spec: secretKeyRef: name: {{ .Values.scmType}}-broker-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} key: "{{ .Values.scmType}}-broker-token-key" + {{- if not .Values.useExternalSecretScmTokenPool }} - name: GITHUB_TOKEN valueFrom: secretKeyRef: name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} key: "{{ .Values.scmType}}-token-key" + {{- end }} {{- if or (.Values.scmTokenPool) (.Values.useExternalSecretScmTokenPool) }} - name: GITHUB_TOKEN_POOL valueFrom: @@ -186,11 +190,13 @@ spec: secretKeyRef: name: {{ .Values.scmType}}-broker-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} key: "{{ .Values.scmType}}-broker-token-key" + {{- if not .Values.useExternalSecretScmTokenPool }} - name: GITLAB_TOKEN valueFrom: secretKeyRef: name: {{ .Values.scmType}}-token{{if not .Values.disableSuffixes }}-{{ .Release.Name }}{{ end }} key: "{{ .Values.scmType}}-token-key" + {{- end }} {{- if or (.Values.scmTokenPool) (.Values.useExternalSecretScmTokenPool) }} - name: GITLAB_TOKEN_POOL valueFrom: diff --git a/charts/snyk-broker/tests/__snapshot__/broker_deployment_scm_token_pool_test.yaml.snap b/charts/snyk-broker/tests/__snapshot__/broker_deployment_scm_token_pool_test.yaml.snap index 2ee046d..2b81f2f 100644 --- a/charts/snyk-broker/tests/__snapshot__/broker_deployment_scm_token_pool_test.yaml.snap +++ b/charts/snyk-broker/tests/__snapshot__/broker_deployment_scm_token_pool_test.yaml.snap @@ -183,11 +183,6 @@ github token pool configured with enabled useExternalSecretScmTokenPool: secretKeyRef: key: github-com-broker-token-key name: github-com-broker-token-RELEASE-NAME - - name: GITHUB_TOKEN - valueFrom: - secretKeyRef: - key: github-com-token-key - name: github-com-token-RELEASE-NAME - name: GITHUB_TOKEN_POOL valueFrom: secretKeyRef: