Getting 2 volume mount inside POD with same name "k8tz"
volumeMounts: - mountPath: /etc/localtime name: k8tz readOnly: true subPath: Asia/Kolkata - mountPath: /usr/share/zoneinfo name: k8tz readOnly: true
volumes:
- hostPath: path: /usr/share/zoneinfo type: "" name: k8tz
Getting 2 volume mount inside POD with same name "k8tz" . This is causing problem. Second 1 is not needed.
Hi @hari14singh, can you show me the deployment and/or the full pod yaml? I need more information to reproduce the problem
Same here with current k8tz 0.15.0 Sample pod (trimmed):
apiVersion: v1
kind: Pod
metadata:
annotations:
k8tz.io/injected: "true"
k8tz.io/timezone: Europe/Berlin
name: test-nginx-5988dbd68f-s9mqc
namespace: test
spec:
containers:
- env:
- name: TZ
value: Europe/Berlin
image: nginx:1.25.2
name: nginx
volumeMounts:
- mountPath: /etc/localtime
name: k8tz
readOnly: true
subPath: Europe/Berlin
- mountPath: /usr/share/zoneinfo
name: k8tz
readOnly: true
volumes:
- hostPath:
path: /usr/share/zoneinfo
type: ""
name: k8tz
To clarify the issue, the mounted /etc/localtime is not a symlink to /usr/share/zoneinfo/Europe/Berlin
# realpath /etc/localtime
/usr/share/zoneinfo/Etc/UTC
I will need to see the applied pod and or deployment that creates it. It seems like you are using pods that was already injected but not annotated.
If it happen to someone, please open new issue and also provide logs from the admission controller with verbose: true (helm ... --set verbose=true).