Issue with volumePermissions
zerowebcorp opened this issue · comments
Describe the bug
When running on a bare metal k8s server and testing with a local volume mounted as hostPath, the bitnami non-root container is not able to access the PV even though the pv is created. The solution, as I understand is to use the volumePermissions
init container. However, enabling this option throws an error.
To Reproduce
volumePermissions:
enabled: true
image:
registry: docker.io
repository: bitnami/bitnami-shell
tag: 10-debian-10
pullPolicy: IfNotPresent
command: ['sh', '-c', 'chmod -R g+rwX /bitnami']
resources:
requests: {}
Expected behavior
initContainer is created.
Error
➜ helm upgrade --install openldap helm-openldap/openldap-stack-ha -f values.yaml
Error: UPGRADE FAILED: failed to create resource: StatefulSet in version "v1" cannot be handled as a StatefulSet: json: cannot unmarshal object into Go struct field Container.spec.template.spec.initContainers.command of type []string
➜
I did find this as a workaround
initContainers:
- name: volume-permissions
image: busybox
command: [ 'sh', '-c', 'chmod -R g+rwX /bitnami' ]
volumeMounts:
- mountPath: /bitnami
name: data
Fix in v4.2.2