Closed lkshrk closed 6 months ago
Thanks for raising the issue. Which version of the chart are you using, as I haven't really been able to reproduce this. There is even an explicit test present for this scenario: https://github.com/bjw-s/helm-charts/blob/main/charts/library/common-test/tests/container/volumemounts_test.yaml#L163-L181 so I'm kinda stumped 🤔
I am not sure if this is related, but using version 3.0.2 of the app-template seems to have an issue with hostPath
storage.
I have the following block:
persistence:
config:
enabled: true
type: hostPath
hostPath: /path/on/host
accessMode: ReadWriteOnce
size: 1Gi
retain: true
advancedMounts:
main:
main:
- path: /path/in/container
Which gives these errors:
- persistence.config: Must validate one and only one schema (oneOf)
- persistence.config: Additional property hostPath is not allowed
- persistence.config.type: persistence.config.type does not match: "persistentVolumeClaim"
For a working example of hostPath with 3.0.2 check out https://github.com/haraldkoch/kochhaus-home/blob/5163ab787270a2713e7ee847cb239f896c05c6a3/kubernetes/main/apps/home/zigbee2mqtt/app/helmrelease.yaml#L129
Probably accessMode: ReadWriteOnce
shouldn't be here for hostPath
type.
@haraldkoch I had a look, but other than the asterisks, that looks to be the same formatting as what I have. Am I missing something?
@JuniorJPDJ I just tried omitting it, and it is required:
- persistence.config: accessMode is required
I am not sure if this is related, but using version 3.0.2 of the app-template seems to have an issue with
hostPath
storage.I have the following block:
persistence: config: enabled: true type: hostPath hostPath: /path/on/host accessMode: ReadWriteOnce size: 1Gi retain: true advancedMounts: main: main: - path: /path/in/container
Your persistence
item has a number of fields that are unsupported for hostPath
type mounts:
size
retain
accessMode
When I omit these, I don't receive any validation errors.
For an overview of the fields available, check out https://bjw-s.github.io/helm-charts/docs/common-library/storage/types/hostPath/.Wonderful, thank you! Is there a readme/changelog somewhere that I can read to keep up with breaking changes like these?
Also, under ingress
, I noticed that if I use the identifier
tag, everything functions properly. Previously, I used the name
tag, which now breaks traefik ingress.
Hostpath mounts behave differently than the others, just like in k8s itself we get the same path inside and outside the container.
However, other items under persistence:
that are not hostpath in this chart automatically get mounted to a directory named after the key:
, which I thought was inconsistent. Maybe in the future it would be possible for hostpath volumes to get automatically mounted to the volume /name like the others?
Details
What steps did you take and what happened:
values.yaml:
extract from the pod definition:
What did you expect to happen:
I would expect the hostPath
/mnt/config/arr/prowlarr
to be mounted under/config
, instead it's mounted under/mnt/config/arr/prowlarr
Anything else you would like to add:
version: ghcr.io/onedr0p/prowlarr-develop:1.14.0.4286
Additional Information: