Skip to content

Commit

Permalink
fix: do not render envvar for scm token when using external credentia…
Browse files Browse the repository at this point in the history
…l pooling
  • Loading branch information
pavel-snyk committed Jan 16, 2024
1 parent 47ffbef commit b883ca0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions charts/snyk-broker/templates/broker_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b883ca0

Please sign in to comment.