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

Splunk Operator Helm: Default value for storageClassName should be "" instead of "default" in persistentVolumeClaim #1397

Open
kundeng opened this issue Nov 14, 2024 · 1 comment
Assignees

Comments

@kundeng
Copy link

kundeng commented Nov 14, 2024

Please select the type of request

Enhancement

Tell us more

When configuring persistentVolumeClaim, the default value for storageClassName is set to "default". This can lead to issues in clusters where the StorageClass is not named "default". To ensure compatibility across different Kubernetes environments, the default value should be an empty string "", which allows Kubernetes to use the cluster’s default StorageClass, regardless of its name.

Steps to Reproduce:

1.	Deploy an application that includes a persistentVolumeClaim without specifying a storageClassName.
2.	Observe that the PVC attempts to use a StorageClass named "default".
3.	If no such StorageClass exists, the PVC remains in a pending state.

Expected Behavior:

•	The storageClassName should default to "", allowing Kubernetes to automatically select the cluster’s default StorageClass.
•	PVCs should bind successfully without explicitly specifying a storageClassName.

Actual Behavior:

•	The storageClassName defaults to "default".
•	PVCs fail to bind if there is no StorageClass named "default" in the cluster.

Impact:

This issue can cause deployments to fail in clusters where the default StorageClass has a different name or where no StorageClass named "default" exists. It requires manual intervention to modify the PVCs or create a StorageClass named "default", which is not always desirable or feasible.

Suggested Fix:

•	Change the default value of storageClassName to an empty string "" in the persistentVolumeClaim configuration.
•	Update documentation to reflect this change, advising users that leaving storageClassName empty will use the cluster’s default StorageClass.
@vivekr-splunk
Copy link
Collaborator

@kundeng Thanks for raising this issue and for finding a potential fix. We'll review the issue and get back to you soon. If your solution works, we'll move forward with it. Thanks again for your help!

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