From 3fdd71ea3bc17a0c1732897a4f05fd5abef58d28 Mon Sep 17 00:00:00 2001 From: brkinney Date: Thu, 9 Jan 2025 14:43:04 -0500 Subject: [PATCH] Add optional annotations to secrets --- .../splunk-otel-collector/templates/secret-etcd.yaml | 4 ++++ .../splunk-otel-collector/templates/secret-splunk.yaml | 4 ++++ helm-charts/splunk-otel-collector/values.schema.json | 6 ++++++ helm-charts/splunk-otel-collector/values.yaml | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/helm-charts/splunk-otel-collector/templates/secret-etcd.yaml b/helm-charts/splunk-otel-collector/templates/secret-etcd.yaml index 8f98c1c74..98550c35f 100644 --- a/helm-charts/splunk-otel-collector/templates/secret-etcd.yaml +++ b/helm-charts/splunk-otel-collector/templates/secret-etcd.yaml @@ -10,6 +10,10 @@ metadata: chart: {{ template "splunk-otel-collector.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} + {{- if .Values.agent.controlPlaneMetrics.etcd.secret.annotations }} + annotations: + {{- toYaml .Values.agent.controlPlaneMetrics.etcd.secret.annotations | nindent 4 }} + {{- end }} type: Opaque data: {{- with .Values.agent.controlPlaneMetrics.etcd.secret.clientCert }} diff --git a/helm-charts/splunk-otel-collector/templates/secret-splunk.yaml b/helm-charts/splunk-otel-collector/templates/secret-splunk.yaml index 45f5ce3aa..519fb66c3 100644 --- a/helm-charts/splunk-otel-collector/templates/secret-splunk.yaml +++ b/helm-charts/splunk-otel-collector/templates/secret-splunk.yaml @@ -10,6 +10,10 @@ metadata: chart: {{ template "splunk-otel-collector.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} + {{- if .Values.secret.annotations }} + annotations: + {{- toYaml .Values.secret.annotations | nindent 4 }} + {{- end }} type: Opaque data: {{- if (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") }} diff --git a/helm-charts/splunk-otel-collector/values.schema.json b/helm-charts/splunk-otel-collector/values.schema.json index 6472c986a..993fb2f03 100644 --- a/helm-charts/splunk-otel-collector/values.schema.json +++ b/helm-charts/splunk-otel-collector/values.schema.json @@ -425,6 +425,9 @@ }, "caFile": { "type": "string" + }, + "annotations": { + "type": "object" } } }, @@ -1188,6 +1191,9 @@ }, "validateSecret": { "type": "boolean" + }, + "annotations": { + "type": "object" } } }, diff --git a/helm-charts/splunk-otel-collector/values.yaml b/helm-charts/splunk-otel-collector/values.yaml index 1b3580e96..184187e39 100644 --- a/helm-charts/splunk-otel-collector/values.yaml +++ b/helm-charts/splunk-otel-collector/values.yaml @@ -320,6 +320,8 @@ agent: # NOTE: The content of the file itself should be used here, not the file path. # The file will be stored as a secret in kubernetes. caFile: "" + # Secret annotations + annotations: {} # Specifies whether the etcd's TLS cert will be verified. If set to false, a CA certificate must be made # available as part of the etcd secret to verify the TLS cert with. skipVerify: true @@ -1010,6 +1012,8 @@ secret: name: "" # Specifies whether secret provided by user should be validated. validateSecret: true + # Secret annotations + annotations: {} # The tolerations for deploying the agent collector daemonset. By default, it targets control-plane, worker, # and k8s distribution-specific nodes (infrastructure or system) to ensure logs and metrics collection from nodes.