Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(agent): [SMAGENT-6037] fix the template failure for helm 3.9 #1524

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ sources:
- https://app.sysdigcloud.com/#/settings/user
- https://github.com/draios/sysdig
type: application
version: 1.19.2
version: 1.19.3
21 changes: 14 additions & 7 deletions charts/agent/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,21 @@ data:
Checking here the user is using Custom CA and if http_proxy.ssl = true
If these conditions are true, then we use the agent.sslCaFileName for the http_proxy.ca_certificate
*/}}
{{- if and (eq (include "sysdig.custom_ca.enabled" (dict "global" .Values.global.ssl "component" .Values.ssl)) "true") (.Values.sysdig.settings) (hasKey .Values.sysdig.settings "http_proxy") (hasKey (default dict .Values.sysdig.settings.http_proxy) "ssl") (eq (get (default (dict "ssl" false) .Values.sysdig.settings.http_proxy) "ssl") true) }}
{{- $baseSettings := .Values.sysdig.settings -}}
{{- $caFilePath := printf "%s%s" "/etc/ca-certs/" (include "sysdig.custom_ca.keyName" (dict "global" .Values.global.ssl "component" .Values.ssl)) }}
{{- $mergedSettings := mergeOverwrite $baseSettings (dict "http_proxy" (dict "ca_certificate" $caFilePath)) -}}
{{ toYaml $mergedSettings | nindent 4 }}
{{- else if .Values.sysdig.settings }}
{{ toYaml .Values.sysdig.settings | nindent 4 }}
{{- if and (eq (include "sysdig.custom_ca.enabled" (dict "global" .Values.global.ssl "component" .Values.ssl)) "true") }}
{{- if (hasKey .Values.sysdig.settings "http_proxy") }}
{{- if (hasKey .Values.sysdig.settings.http_proxy "ssl") }}
{{- if (.Values.sysdig.settings.http_proxy.ssl) }}
{{- $baseSettings := .Values.sysdig.settings -}}
{{- $caFilePath := printf "%s%s" "/etc/ca-certs/" (include "sysdig.custom_ca.keyName" (dict "global" .Values.global.ssl "component" .Values.ssl)) }}
{{- $mergedSettings := mergeOverwrite $baseSettings (dict "http_proxy" (dict "ca_certificate" $caFilePath)) -}}
{{ toYaml $mergedSettings | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.sysdig.settings }}
{{ toYaml .Values.sysdig.settings | nindent 4 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might result in some duplication since https://github.com/sysdiglabs/charts/pull/1524/files#diff-3cf829d749cba0e0b831af9d7d58cd1b70ff2039e2af38f06523ef121fa47a72R47 we are already returning also .Values.sysdig.settings

{{ end }}
{{- if .Values.leaderelection.enable }}
k8s_delegation_election: true
k8s_coldstart:
Expand Down
Loading