charts icon indicating copy to clipboard operation
charts copied to clipboard

[bitnami/supabase] Storage PVC and NetworkPolicy are created even if storage is explicitly disabled

Open frittentheke opened this issue 1 year ago • 3 comments

Name and Version

bitnami/supabase 5.2.7

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. Set storage.enabled=false in values
  2. See PVC (and resulting PV) and NetworkPolicy for storage being created

Are you using any custom parameters or values?

storage:
  enabled: false

What is the expected behavior?

If storage is disabled and there is no deployment, it makes not sense to create a PVC or NetworkPolicy.

What do you see instead?

Since there is no condition on storage as a whole being enabled for

  • PVC https://github.com/bitnami/charts/blob/aeecba3c132c3bc89a9877300f235222985287e7/bitnami/supabase/templates/storage/pvc.yaml#L6
  • NetworkPolicy https://github.com/bitnami/charts/blob/aeecba3c132c3bc89a9877300f235222985287e7/bitnami/supabase/templates/storage/networkpolicy.yaml#L6

both resources are created without being used.

Additional information

I understand that there are individual switches to disable storage.persistence.enabled and storage.networkPolicy.enabled. This is more about a particular configuration and storage.enabled should be the precondition for all related resources to even being considered.

frittentheke avatar Jun 26 '24 11:06 frittentheke

Hi!

Thank you so much for reporting. Indeed, if the component is not enable these objects should not be created. As you discovered the issue, would you like to submit a PR adding an if statement?

javsalgar avatar Jun 27 '24 07:06 javsalgar

Thank you so much for reporting. Indeed, if the component is not enable these objects should not be created. As you discovered the issue, would you like to submit a PR adding an if statement?

@javsalgar I did just do that, see https://github.com/bitnami/charts/pull/27580

frittentheke avatar Jun 28 '24 09:06 frittentheke

Thank you for opening this issue and submitting the associated Pull Request. Our team will review and provide feedback. Once the PR is merged, the issue will automatically close.

Your contribution is greatly appreciated!

carrodher avatar Jun 28 '24 10:06 carrodher