refactor(authentication): streamline secret reference assignment in deployment.yaml
- Introduced a variable for the target secret name to improve readability and maintainability of the secret injection logic. - This change enhances the clarity of the deployment configuration for the authentication module. Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
e34a57bef5
commit
05aa22215e
@ -107,11 +107,12 @@ spec:
|
|||||||
key: {{ $key | snakecase | upper }}
|
key: {{ $key | snakecase | upper }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
# inject from secret created by FreeleapsSecret object
|
# inject from secret created by FreeleapsSecret object
|
||||||
|
{{ $targetSecretName := .Values.authentication.secrets.target.name }}
|
||||||
{{- range .Values.authentication.secrets.data }}
|
{{- range .Values.authentication.secrets.data }}
|
||||||
- name: {{ .key | snakecase | upper }}
|
- name: {{ .key | snakecase | upper }}
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ .Values.authentication.secrets.target.name }}
|
name: {{ $targetSecretName }}
|
||||||
key: {{ .key }}
|
key: {{ .key }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.logIngest.enabled }}
|
{{- if .Values.logIngest.enabled }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user