bjw-s / helm-charts

A collection of Helm charts
https://bjw-s.github.io/helm-charts/
Apache License 2.0
524 stars 98 forks source link

Can't assign existing PVC to custom path on the container #327

Closed p4block closed 1 month ago

p4block commented 1 month ago

Details

I need to assign a pvc to a /long/path on the host, but it looks like I can't

What steps did you take and what happened:

persistence:
  data:
    enabled: true
    existingClaim: some-pvc
    globalMounts:
    - path: /foo/bar
      readOnly: false

What did you expect to happen:

I assumed this would mount the PVC to /foo/bar, but it mounts it to /data. In fact, no matter what I put in there, the final yaml doesn't change.

I've read the docs and really think this should be working and it's intended, but isn't. Maybe it's because I am using existingClaim.

it's also completely likely I am missing something very obvious

(And I can't simply change the "data" key as workaround because / isn't an allowed character in a volume name)

Anything else you would like to add:

If it's possible, maybe we can add it to the example values.yaml. I found nothing of the sort there, but I did on the html docs.

bjw-s commented 1 month ago

Which version of app-template / common library are you using? And do you perhaps have a link/gist to your full values.yaml?

I ask, because I am doing exactly what you are trying to accomplish here: https://github.com/bjw-s/home-ops/blob/336495984f70f7e599f283e38814cc2189ed476b/kubernetes/main/apps/media/maintainerr/app/helmrelease.yaml#L72-L76 and this works as intended for me.

p4block commented 1 month ago

@bjw-s Spot on, sorry for bothering you. I was using an ancient chart version. It works perfectly fine on the latest one.

bjw-s commented 1 month ago

No worries, glad you got things working!