Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting 2 volume mount inside POD with same name "k8tz" #80

Open
hari14singh opened this issue Sep 7, 2023 · 3 comments
Open

Getting 2 volume mount inside POD with same name "k8tz" #80

hari14singh opened this issue Sep 7, 2023 · 3 comments

Comments

@hari14singh
Copy link

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.

test.txt

@yonatankahana
Copy link
Member

Hi @hari14singh,
can you show me the deployment and/or the full pod yaml? I need more information to reproduce the problem

@brightdroid
Copy link

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

@brightdroid
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants