Skip to content

Conversation

longxiucai
Copy link

In the Helm template generation of certificate monitoring paths, incorrect path concatenation logic resulted in redundant double slashes (//) in --watch-file and --watch-kubeconf parameters, e.g.:

...
    - --watch-file=/mnt/watch/file-9dff78b77fe2f4b0f34f77796df3fea5983e5d4b//var/lib/kubelet/pki/kubelet-client-current.pem
    - --watch-file=/mnt/watch/file-15d8ed7db7457d4f5108195ceb52a124a8703898//etc/kubernetes/pki/ca.crt
...
    volumeMounts:
    - mountPath: /mnt/watch/file-9dff78b77fe2f4b0f34f77796df3fea5983e5d4b//var/lib/kubelet/pki
      name: file-9dff78b77fe2f4b0f34f77796df3fea5983e5d4b
      readOnly: true
    - mountPath: /mnt/watch/file-15d8ed7db7457d4f5108195ceb52a124a8703898//etc/kubernetes/pki
      name: file-15d8ed7db7457d4f5108195ceb52a124a8703898
      readOnly: true
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: kube-api-access-vmn6h
      readOnly: true

This fix adjusts the path cleaning logic in templates to ensure only a single slash is maintained between the hash directory and certificate path.

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

Successfully merging this pull request may close these issues.

1 participant