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

feat(agent): add "sysdig_api_endpoint" in dragent.yaml based on the region #2072

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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.34.0
version: 1.35.0
13 changes: 13 additions & 0 deletions charts/agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,15 @@ Determine sysdig secure endpoint based on provided region
{{- end -}}
{{- end -}}

{{/*
Determine api endpoint based on provided region
*/}}
{{- define "agent.secureApiEndpoint" -}}
{{- if hasKey ((include "sysdig.regions" .) | fromYaml) .Values.global.sysdig.region }}
{{- include "sysdig.secureApiEndpoint" . }}
{{- end -}}
{{- end -}}

{{/*
Agent agentConfigmapName
*/}}
Expand Down Expand Up @@ -526,6 +535,10 @@ ssl_verify_certificate: {{ $sslVerifyCertificate }}
{{- if eq (include "sysdig.custom_ca.enabled" (dict "global" .Values.global.ssl "component" .Values.ssl)) "true" }}
ca_certificate: certificates/{{ include "sysdig.custom_ca.keyName" (dict "global" .Values.global.ssl "component" .Values.ssl) }}
{{- end }}
{{- $secureApiEndpoint := include "get_if_not_in_settings" (dict "root" . "default" (include "sysdig.secureApiEndpoint" .) "setting" "sysdig_api_endpoint") }}
{{- if $secureApiEndpoint }}
sysdig_api_endpoint: {{ $secureApiEndpoint }}
{{- end }}
{{- end }}

{{/*
Expand Down
Loading
Loading