Skip to content

Commit 8789029

Browse files
brkinneyatoulme
andauthored
Add optional annotations to secrets (#1599)
* Add optional annotations to secrets * Include changelog file * Update .chloggen/secretannotations.yaml --------- Co-authored-by: Antoine Toulme <[email protected]>
1 parent 2f4ca14 commit 8789029

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

.chloggen/secretannotations.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: enhancement
3+
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other)
4+
component: chart
5+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
6+
note: Add optional annotations to secrets
7+
# One or more tracking issues related to the change
8+
issues: [1599]
9+
# (Optional) One or more lines of additional information to render under the primary note.
10+
# These lines will be padded with 2 spaces and then inserted directly into the document.
11+
# Use pipe (|) for multiline entries.
12+
subtext:

helm-charts/splunk-otel-collector/templates/secret-etcd.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ metadata:
1010
chart: {{ template "splunk-otel-collector.chart" . }}
1111
release: {{ .Release.Name }}
1212
heritage: {{ .Release.Service }}
13+
{{- if .Values.agent.controlPlaneMetrics.etcd.secret.annotations }}
14+
annotations:
15+
{{- toYaml .Values.agent.controlPlaneMetrics.etcd.secret.annotations | nindent 4 }}
16+
{{- end }}
1317
type: Opaque
1418
data:
1519
{{- with .Values.agent.controlPlaneMetrics.etcd.secret.clientCert }}

helm-charts/splunk-otel-collector/templates/secret-splunk.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ metadata:
1010
chart: {{ template "splunk-otel-collector.chart" . }}
1111
release: {{ .Release.Name }}
1212
heritage: {{ .Release.Service }}
13+
{{- if .Values.secret.annotations }}
14+
annotations:
15+
{{- toYaml .Values.secret.annotations | nindent 4 }}
16+
{{- end }}
1317
type: Opaque
1418
data:
1519
{{- if (eq (include "splunk-otel-collector.splunkO11yEnabled" .) "true") }}

helm-charts/splunk-otel-collector/values.schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,9 @@
425425
},
426426
"caFile": {
427427
"type": "string"
428+
},
429+
"annotations": {
430+
"type": "object"
428431
}
429432
}
430433
},
@@ -1208,6 +1211,9 @@
12081211
},
12091212
"validateSecret": {
12101213
"type": "boolean"
1214+
},
1215+
"annotations": {
1216+
"type": "object"
12111217
}
12121218
}
12131219
},

helm-charts/splunk-otel-collector/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ agent:
320320
# NOTE: The content of the file itself should be used here, not the file path.
321321
# The file will be stored as a secret in kubernetes.
322322
caFile: ""
323+
# Secret annotations
324+
annotations: {}
323325
# Specifies whether the etcd's TLS cert will be verified. If set to false, a CA certificate must be made
324326
# available as part of the etcd secret to verify the TLS cert with.
325327
skipVerify: true
@@ -1020,6 +1022,8 @@ secret:
10201022
name: ""
10211023
# Specifies whether secret provided by user should be validated.
10221024
validateSecret: true
1025+
# Secret annotations
1026+
annotations: {}
10231027

10241028
# The tolerations for deploying the agent collector daemonset. By default, it targets control-plane, worker,
10251029
# and k8s distribution-specific nodes (infrastructure or system) to ensure logs and metrics collection from nodes.

0 commit comments

Comments
 (0)