-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
What's going on?
config serviceaccount in sidecar want to inject into a pod with another serviceaccount
Expected Behavior
sidecar serviceaccount should inject successfullly in pod sidecar container
But pod container still mount old serviceaccount, serviceaccount in sidecar not inject into pod
Reproducer
sidecar config add seviceaccount
apiVersion: v1
data:
sidecar-telegraf-elasticsearch: |
name: sidecar-telegraf-elasticsearch
containers:
- name: telegraf
image: registry-jinan-lab.inspurcloud.cn/library/common/telegraf:1.9.1-14
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9126
name: prometheus
volumeMounts:
- name: telegraf
mountPath: /etc/telegraf
serviceAccountName: lma-sidecar
volumes:
- name: telegraf
configMap:
name: telegraf-elasticsearch
sidecar inject pod but not with lma-sidecar serviceaccount but with elasticsearch serviceaccount
- image: registry-jinan-lab.inspurcloud.cn/library/common/telegraf:1.9.1-14
imagePullPolicy: IfNotPresent
name: telegraf
ports:
- containerPort: 9126
name: prometheus
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/telegraf
name: telegraf
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: elasticsearch-token-m5bs9
readOnly: true
Version Deets
- Kubernetes Version: v1.20.1
- k8s-sidecar-injector Version: 0.5.0
Metadata
Metadata
Assignees
Labels
No labels