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

Issue with volumePermissions #147

Closed
zerowebcorp opened this issue Feb 4, 2024 · 2 comments
Closed

Issue with volumePermissions #147

zerowebcorp opened this issue Feb 4, 2024 · 2 comments

Comments

@zerowebcorp
Copy link

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
➜  
@zerowebcorp
Copy link
Author

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

@jp-gouin
Copy link
Owner

jp-gouin commented Feb 5, 2024

Fix in v4.2.2

@jp-gouin jp-gouin closed this as completed Feb 5, 2024
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

2 participants