Skip to content

Commit d6a1d42

Browse files
committed
put behind a feature gate
1 parent 889d78f commit d6a1d42

File tree

117 files changed

+74
-1527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+74
-1527
lines changed

.chloggen/explicitlymounttokens.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ change_type: enhancement
33
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other)
44
component: all
55
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
6-
note: Explicitly mount service tokens in specific tokens rather than enabling them at the service account level
6+
note: Offer an experimental feature gate to mount service tokens in specific tokens.
77
# One or more tracking issues related to the change
88
issues: [1421]
99
# (Optional) One or more lines of additional information to render under the primary note.
1010
# These lines will be padded with 2 spaces and then inserted directly into the document.
1111
# Use pipe (|) for multiline entries.
12-
subtext:
12+
subtext: |
13+
Kubernetes API access tokens are currently granted via mounting them on all containers of the cluster receiver,
14+
gateway and daemonset. They are also enabled for the target allocator deployment.
15+
This experimental change defines how to mount the service account token on specific containers.

examples/add-filter-processor/rendered_manifests/daemonset.yaml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ spec:
3838
hostNetwork: true
3939
dnsPolicy: ClusterFirstWithHostNet
4040
serviceAccountName: default-splunk-otel-collector
41-
automountServiceAccountToken: false
4241
nodeSelector:
4342
kubernetes.io/os: linux
4443
tolerations:
@@ -220,28 +219,8 @@ spec:
220219
- mountPath: /usr/lib/splunk-otel-collector/agent-bundle/run/collectd
221220
name: run-collectd
222221
readOnly: false
223-
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
224-
name: serviceaccount-token
225-
readOnly: true
226222
terminationGracePeriodSeconds: 600
227223
volumes:
228-
- name: serviceaccount-token
229-
projected:
230-
defaultMode: 0444
231-
sources:
232-
- serviceAccountToken:
233-
path: token
234-
- configMap:
235-
name: kube-root-ca.crt
236-
items:
237-
- key: ca.crt
238-
path: ca.crt
239-
- downwardAPI:
240-
items:
241-
- path: namespace
242-
fieldRef:
243-
apiVersion: v1
244-
fieldPath: metadata.namespace
245224
- name: run-collectd
246225
emptyDir:
247226
sizeLimit: 25Mi

examples/add-filter-processor/rendered_manifests/deployment-cluster-receiver.yaml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ spec:
3434
checksum/config: 4e343035a89a2b86f2f7841a81c3c485850742afe99e7c8c5d5069886a778ddc
3535
spec:
3636
serviceAccountName: default-splunk-otel-collector
37-
automountServiceAccountToken: false
3837
nodeSelector:
3938
kubernetes.io/os: linux
4039
containers:
@@ -86,34 +85,13 @@ spec:
8685
cpu: 200m
8786
memory: 500Mi
8887
volumeMounts:
89-
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
90-
name: serviceaccount-token
91-
readOnly: true
9288
- mountPath: /conf
9389
name: collector-configmap
9490
- mountPath: /usr/lib/splunk-otel-collector/agent-bundle/run/collectd
9591
name: run-collectd
9692
readOnly: false
9793
terminationGracePeriodSeconds: 600
9894
volumes:
99-
- name: serviceaccount-token
100-
projected:
101-
defaultMode: 0444
102-
sources:
103-
- serviceAccountToken:
104-
expirationSeconds: 3607
105-
path: token
106-
- configMap:
107-
name: kube-root-ca.crt
108-
items:
109-
- key: ca.crt
110-
path: ca.crt
111-
- downwardAPI:
112-
items:
113-
- path: namespace
114-
fieldRef:
115-
apiVersion: v1
116-
fieldPath: metadata.namespace
11795
- name: collector-configmap
11896
configMap:
11997
name: default-splunk-otel-collector-otel-k8s-cluster-receiver

examples/add-filter-processor/rendered_manifests/serviceAccount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Source: splunk-otel-collector/templates/serviceAccount.yaml
33
apiVersion: v1
44
kind: ServiceAccount
5-
automountServiceAccountToken: false
5+
automountServiceAccountToken: true
66
metadata:
77
name: default-splunk-otel-collector
88
namespace: default

examples/add-kafkametrics-receiver/rendered_manifests/daemonset.yaml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ spec:
3838
hostNetwork: true
3939
dnsPolicy: ClusterFirstWithHostNet
4040
serviceAccountName: default-splunk-otel-collector
41-
automountServiceAccountToken: false
4241
nodeSelector:
4342
kubernetes.io/os: linux
4443
tolerations:
@@ -220,28 +219,8 @@ spec:
220219
- mountPath: /usr/lib/splunk-otel-collector/agent-bundle/run/collectd
221220
name: run-collectd
222221
readOnly: false
223-
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
224-
name: serviceaccount-token
225-
readOnly: true
226222
terminationGracePeriodSeconds: 600
227223
volumes:
228-
- name: serviceaccount-token
229-
projected:
230-
defaultMode: 0444
231-
sources:
232-
- serviceAccountToken:
233-
path: token
234-
- configMap:
235-
name: kube-root-ca.crt
236-
items:
237-
- key: ca.crt
238-
path: ca.crt
239-
- downwardAPI:
240-
items:
241-
- path: namespace
242-
fieldRef:
243-
apiVersion: v1
244-
fieldPath: metadata.namespace
245224
- name: run-collectd
246225
emptyDir:
247226
sizeLimit: 25Mi

examples/add-kafkametrics-receiver/rendered_manifests/deployment-cluster-receiver.yaml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ spec:
3434
checksum/config: 4e343035a89a2b86f2f7841a81c3c485850742afe99e7c8c5d5069886a778ddc
3535
spec:
3636
serviceAccountName: default-splunk-otel-collector
37-
automountServiceAccountToken: false
3837
nodeSelector:
3938
kubernetes.io/os: linux
4039
containers:
@@ -86,34 +85,13 @@ spec:
8685
cpu: 200m
8786
memory: 500Mi
8887
volumeMounts:
89-
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
90-
name: serviceaccount-token
91-
readOnly: true
9288
- mountPath: /conf
9389
name: collector-configmap
9490
- mountPath: /usr/lib/splunk-otel-collector/agent-bundle/run/collectd
9591
name: run-collectd
9692
readOnly: false
9793
terminationGracePeriodSeconds: 600
9894
volumes:
99-
- name: serviceaccount-token
100-
projected:
101-
defaultMode: 0444
102-
sources:
103-
- serviceAccountToken:
104-
expirationSeconds: 3607
105-
path: token
106-
- configMap:
107-
name: kube-root-ca.crt
108-
items:
109-
- key: ca.crt
110-
path: ca.crt
111-
- downwardAPI:
112-
items:
113-
- path: namespace
114-
fieldRef:
115-
apiVersion: v1
116-
fieldPath: metadata.namespace
11795
- name: collector-configmap
11896
configMap:
11997
name: default-splunk-otel-collector-otel-k8s-cluster-receiver

examples/add-kafkametrics-receiver/rendered_manifests/serviceAccount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Source: splunk-otel-collector/templates/serviceAccount.yaml
33
apiVersion: v1
44
kind: ServiceAccount
5-
automountServiceAccountToken: false
5+
automountServiceAccountToken: true
66
metadata:
77
name: default-splunk-otel-collector
88
namespace: default

examples/add-receiver-creator/rendered_manifests/daemonset.yaml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ spec:
3838
hostNetwork: true
3939
dnsPolicy: ClusterFirstWithHostNet
4040
serviceAccountName: default-splunk-otel-collector
41-
automountServiceAccountToken: false
4241
nodeSelector:
4342
kubernetes.io/os: linux
4443
tolerations:
@@ -171,28 +170,8 @@ spec:
171170
- mountPath: /usr/lib/splunk-otel-collector/agent-bundle/run/collectd
172171
name: run-collectd
173172
readOnly: false
174-
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
175-
name: serviceaccount-token
176-
readOnly: true
177173
terminationGracePeriodSeconds: 600
178174
volumes:
179-
- name: serviceaccount-token
180-
projected:
181-
defaultMode: 0444
182-
sources:
183-
- serviceAccountToken:
184-
path: token
185-
- configMap:
186-
name: kube-root-ca.crt
187-
items:
188-
- key: ca.crt
189-
path: ca.crt
190-
- downwardAPI:
191-
items:
192-
- path: namespace
193-
fieldRef:
194-
apiVersion: v1
195-
fieldPath: metadata.namespace
196175
- name: run-collectd
197176
emptyDir:
198177
sizeLimit: 25Mi

examples/add-receiver-creator/rendered_manifests/deployment-cluster-receiver.yaml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ spec:
3434
checksum/config: 4e343035a89a2b86f2f7841a81c3c485850742afe99e7c8c5d5069886a778ddc
3535
spec:
3636
serviceAccountName: default-splunk-otel-collector
37-
automountServiceAccountToken: false
3837
nodeSelector:
3938
kubernetes.io/os: linux
4039
containers:
@@ -86,34 +85,13 @@ spec:
8685
cpu: 200m
8786
memory: 500Mi
8887
volumeMounts:
89-
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
90-
name: serviceaccount-token
91-
readOnly: true
9288
- mountPath: /conf
9389
name: collector-configmap
9490
- mountPath: /usr/lib/splunk-otel-collector/agent-bundle/run/collectd
9591
name: run-collectd
9692
readOnly: false
9793
terminationGracePeriodSeconds: 600
9894
volumes:
99-
- name: serviceaccount-token
100-
projected:
101-
defaultMode: 0444
102-
sources:
103-
- serviceAccountToken:
104-
expirationSeconds: 3607
105-
path: token
106-
- configMap:
107-
name: kube-root-ca.crt
108-
items:
109-
- key: ca.crt
110-
path: ca.crt
111-
- downwardAPI:
112-
items:
113-
- path: namespace
114-
fieldRef:
115-
apiVersion: v1
116-
fieldPath: metadata.namespace
11795
- name: collector-configmap
11896
configMap:
11997
name: default-splunk-otel-collector-otel-k8s-cluster-receiver

examples/add-receiver-creator/rendered_manifests/serviceAccount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Source: splunk-otel-collector/templates/serviceAccount.yaml
33
apiVersion: v1
44
kind: ServiceAccount
5-
automountServiceAccountToken: false
5+
automountServiceAccountToken: true
66
metadata:
77
name: default-splunk-otel-collector
88
namespace: default

0 commit comments

Comments
 (0)