Skip to content

Commit

Permalink
fix(shield): avoid merge with main context (#2030)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertoBarba authored Nov 14, 2024
1 parent f3abbfd commit bd7667c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/shield/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ maintainers:
- name: mavimo
email: [email protected]
type: application
version: 0.1.17
version: 0.1.18
appVersion: "1.0.0"
2 changes: 1 addition & 1 deletion charts/shield/templates/cluster/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If release name contains chart name it will be used as a full name.
{{- end -}}

{{- define "cluster.affinity" -}}
{{- $affinity := merge .Values.affinity .Values.cluster.affinity -}}
{{- $affinity := merge (dict) .Values.affinity .Values.cluster.affinity -}}
{{- with $affinity -}}
{{- . | toYaml -}}
{{- end -}}
Expand Down
6 changes: 3 additions & 3 deletions charts/shield/templates/cluster/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ spec:
{{- if $proxyEnvs }}
{{- $proxyEnvs | nindent 12 }}
{{- end }}
{{- $customCAEnvs := (include "common.custom_ca.envs" (merge . (dict "CACertsPath" "/etc/sysdig/ca-certs/"))) }}
{{- $customCAEnvs := (include "common.custom_ca.envs" (merge (dict) . (dict "CACertsPath" "/etc/sysdig/ca-certs/"))) }}
{{- if $customCAEnvs }}
{{- $customCAEnvs | nindent 12 }}
{{- end }}
Expand All @@ -133,7 +133,7 @@ spec:
port: {{ .Values.cluster.additional_settings.monitoring_port }}
{{- .Values.cluster.probes.readiness | toYaml | nindent 12 }}
volumeMounts:
{{- $customCAMounts := (include "common.custom_ca.volume_mount" .) }}
{{- $customCAMounts := (include "common.custom_ca.volume_mount" (merge (dict) . (dict "CACertsPath" "/etc/sysdig/ca-certs/")) ) }}
{{- if $customCAMounts }}
{{- $customCAMounts | nindent 12 }}
{{- end }}
Expand All @@ -144,7 +144,7 @@ spec:
name: {{ printf "secret-%s" $secretName }}
{{- end }}
{{- if (include "cluster.tls_certificates.required" .) }}
- mountPath: {{ include "cluster.tls_certificates.mount_path" (merge . (dict "CACertsPath" "/etc/sysdig/ca-certs/")) }}
- mountPath: {{ include "cluster.tls_certificates.mount_path" . }}
name: cluster-shield-tls-certificates-secret
{{- end }}
{{- include "cluster.volume_mounts" . | nindent 12 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/shield/templates/host/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If release name contains chart name it will be used as a full name.
{{- $_ := set $proxyConfig "proxy_host" $host._0 -}}
{{- $_ := set $proxyConfig "proxy_port" $host._1 -}}
{{- if (include "common.custom_ca.enabled" .) }}
{{- $_ = set $proxyConfig "ca_certificate" (include "common.custom_ca.path" (mergeOverwrite . (dict "CACertsPath" "certificates/"))) }}
{{- $_ = set $proxyConfig "ca_certificate" (include "common.custom_ca.path" (merge (dict) . (dict "CACertsPath" "certificates/"))) }}
{{- end }}
{{- $proxyConfig | toYaml -}}
{{- end -}}
Expand Down
6 changes: 3 additions & 3 deletions charts/shield/templates/host/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
{{- if (include "common.proxy.enabled" .) }}
{{- include "common.proxy.envs" . | nindent 12 }}
{{- end }}
{{- include "common.custom_ca.envs" (merge . (dict "CACertsPath" "/opt/draios/certificates/")) | nindent 12 }}
{{- include "common.custom_ca.envs" (merge (dict) . (dict "CACertsPath" "/opt/draios/certificates/")) | nindent 12 }}
volumeMounts:
{{- /* Autopilot = false */}}
{{- if not (include "common.cluster_type.is_gke_autopilot" .) }}
Expand Down Expand Up @@ -151,7 +151,7 @@ spec:
{{- if (include "common.proxy.enabled" .) }}
{{- include "common.proxy.envs" . | nindent 12 }}
{{- end }}
{{- include "common.custom_ca.envs" (merge . (dict "CACertsPath" "/opt/draios/certificates/")) | nindent 12 }}
{{- include "common.custom_ca.envs" (merge (dict) . (dict "CACertsPath" "/opt/draios/certificates/")) | nindent 12 }}
{{- if .Values.features.responding.rapid_response.enabled }}
- name: PASSWORD
valueFrom:
Expand Down Expand Up @@ -182,7 +182,7 @@ spec:
volumeMounts:
{{- /* TOOD: Local Forwarder config mount */}}
{{- /* Custom CA */}}
{{- include "common.custom_ca.volume_mount" (merge . (dict "CACertsPath" "/opt/draios/certificates/")) | nindent 12 }}
{{- include "common.custom_ca.volume_mount" (merge (dict) . (dict "CACertsPath" "/opt/draios/certificates/")) | nindent 12 }}
{{- /* Always requested */}}
- mountPath: /host/dev
name: dev-vol
Expand Down

0 comments on commit bd7667c

Please sign in to comment.