bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
9.05k stars 9.23k forks source link

[bitnami/kube-prometheus] Possibility to disable storageClass check needed #30472

Open daslerjo opened 1 week ago

daslerjo commented 1 week ago

Name and Version

bitnami/kube-prometheus 9.0.5

What is the problem this feature will solve?

We have observed the issue in Chart version 9.0.5, but that behavior is probably still there even in the newest Chart version.

In our org, we use shared k8s clusters whereby users get access only to their namespace. Cluster resources are not accessible, as e.g. relevant here, there is no access to get the available storageClasses listed.

$ kubectl get storageclasses.storage.k8s.io
Error from server (Forbidden): storageclasses.storage.k8s.io is forbidden: User "xxx" cannot list resource "storageclasses" in API group "storage.k8s.io" at the cluster scope

Anyway, the deployment of apps via Helm Charts that need persistent storage works:

With the deployment of the Prometheus Operator (bitnami/kube-prometheus) we are facing the following problem regarding specifying a certain storageClass in the values file.

However, due to storageClass checking done by the Prometheus Operator, the deployment of a Prometheus instance fails.

prometheus-operator pod log:

level=error ts=2024-11-15T10:41:03.96505709Z caller=klog.go:126 component=k8s_client_runtime func=ErrorDepth msg="sync \"monitoring/prometheus-prometheus\" failed: storage class \"sc-vsan-multiaz\" does not exist"

Because of the storageClass check we stick to the default storage provisioner.

What is the feature you are proposing to solve the problem?

Add a parameter in the values file to be able to disable the storageClass check.

What alternatives have you considered?

Remove the storageClass check at all. If there is no valid storageClass specified, the deployment will fail anyway with the difference that the relevant log message will be found in another resource.

carrodher commented 6 days ago

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.