Skip to content

Commit 5a2d5f6

Browse files
feat(agent): Enable the possibility to specify an existing secret containing the local forwarder configuration [FR-2992] (#2382)
Co-authored-by: Francesco Furlan <[email protected]>
1 parent 0e7c383 commit 5a2d5f6

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

charts/agent/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ sources:
3030
- https://app.sysdigcloud.com/#/settings/user
3131
- https://github.com/draios/sysdig
3232
type: application
33-
version: 2.3.2
33+
version: 2.3.3

charts/agent/templates/daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,11 @@ spec:
394394
{{- if .Values.localForwarder.enabled }}
395395
- name: local-forwarder-config
396396
secret:
397+
{{- if eq .Values.localForwarder.existingSecretName "" }}
397398
secretName: {{ include "agent.localForwarderSecretName" . }}
399+
{{- else }}
400+
secretName: {{ .Values.localForwarder.existingSecretName }}
401+
{{- end }}
398402
{{- end }}
399403
- name: sysdig-agent-secrets
400404
secret:

charts/agent/templates/secrets.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type: Opaque
4949
data:
5050
{{ include "agent.httpProxyCredentials" . | indent 2 }}
5151
{{- end }}
52-
{{- if .Values.localForwarder.enabled }}
52+
{{- if and .Values.localForwarder.enabled (eq .Values.localForwarder.existingSecretName "") }}
5353
---
5454
apiVersion: v1
5555
kind: Secret

charts/agent/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,11 @@ leaderelection:
341341
enable: false
342342
localForwarder:
343343
enabled: false
344+
# If existingSecretName is set to anything different than an empty string
345+
# the local forwarder secret generation is skipped and the existing secret
346+
# name is used to mount the secret volume instead of the one defined in
347+
# the secrets template
348+
existingSecretName: ""
344349
transmitMessageTypes:
345350
- POLICY_EVENTS
346351
- SECURE_AUDIT

0 commit comments

Comments
 (0)