Skip to content

Commit

Permalink
Move variables outside range loop for proper access
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabris committed Feb 5, 2025
1 parent f9d6c19 commit 933e694
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions k8s_helm_charts/zdm/templates/cdm.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{ $zdm_secretName := include "zdm.secretName" . -}}
{{- $zdm_secretScbName := include "zdm.secretScbName" . -}}
{{- $cdm_enabled := include "cdm.enabled" . -}}
{{- $scb_enabled := include "scb.enabled" . -}}

{{- if eq (include "cdm.enabled" .) "true" }}
{{- if eq $cdm_enabled "true" }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -65,7 +67,7 @@ spec:
secretKeyRef:
name: {{ $zdm_secretName }}
key: target_password
{{- if eq (include "scb.enabled" .) "true" }}
{{- if eq $scb_enabled "true" }}
volumeMounts:
- name: scb
mountPath: "/tmp/scb"
Expand Down
3 changes: 2 additions & 1 deletion k8s_helm_charts/zdm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{- $zdm_selectorLabels := include "zdm.selectorLabels" . -}}
{{- $zdm_secretName := include "zdm.secretName" . -}}
{{- $zdm_secretScbName := include "zdm.secretScbName" . -}}
{{- $scb_enabled := include "scb.enabled" . -}}

# calculate a variable that contains all proxy service addresses
{{ $service_addresses := "" -}}
Expand Down Expand Up @@ -97,7 +98,7 @@ spec:
key: target_password
ports:
- containerPort: 9042
{{- if eq (include "scb.enabled" .) "true" }}
{{- if eq $scb_enabled "true" }}
volumeMounts:
- name: scb
mountPath: "/tmp/scb"
Expand Down

0 comments on commit 933e694

Please sign in to comment.