diff --git a/charts/cortex-agent/templates/daemonset.yaml b/charts/cortex-agent/templates/daemonset.yaml index 04beeb5..c8bbdcd 100644 --- a/charts/cortex-agent/templates/daemonset.yaml +++ b/charts/cortex-agent/templates/daemonset.yaml @@ -143,7 +143,7 @@ spec: mountPath: /etc/traps {{- end }} - {{- if .Values.deploymentSecret.create }} + {{- if or .Values.deploymentSecret.create .Values.deploymentSecret.name }} - name: deployment-secrets mountPath: /opt/traps/config/deployment readOnly: true @@ -205,10 +205,10 @@ spec: type: DirectoryOrCreate {{- end }} - {{- if .Values.deploymentSecret.create }} + {{- if or .Values.deploymentSecret.create .Values.deploymentSecret.name }} - name: deployment-secrets secret: - secretName: {{ include "cortex-xdr.deploymentSecretName" . }} + secretName: {{ .Values.deploymentSecret.name | default (include "cortex-xdr.deploymentSecretName" .) }} {{- end }} {{- if (include "cortex-xdr.dockerPullSecretName" .) }} diff --git a/charts/cortex-agent/templates/deployment-secret.yaml b/charts/cortex-agent/templates/deployment-secret.yaml index 237e6d9..f375de0 100644 --- a/charts/cortex-agent/templates/deployment-secret.yaml +++ b/charts/cortex-agent/templates/deployment-secret.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: - name: {{ include "cortex-xdr.deploymentSecretName" . }} + name: {{ .Values.deploymentSecret.name | default (include "cortex-xdr.deploymentSecretName" .) }} namespace: {{ .Values.namespace.name }} type: Opaque stringData: diff --git a/charts/cortex-agent/values.yaml b/charts/cortex-agent/values.yaml index da1448e..c0f2aee 100644 --- a/charts/cortex-agent/values.yaml +++ b/charts/cortex-agent/values.yaml @@ -14,6 +14,9 @@ deploymentSecret: # Set to "false" to inject distributionId externally, e.g. Vault-agent-injector create: true + # In case you want to create your own deployment secret, enter its name here + name: "" + serviceAccount: # create/don't create service account create: true