-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Set defaultVolumeType for storageclass #9872
Comments
A PR to change the default in the the local-storage manifest would be welcome! |
##Environment Details Infrastructure
Node(s) CPU architecture, OS, and version: Linux 5.14.21-150500.53-default x86_64 GNU/Linux Cluster Configuration:
Config.yaml:
Reproduction
Results: // current release annotations $ kg storageclass -o yaml
// latest commit attention to the annotation for defaultVolumeType: local
|
@VestigeJ you might also confirm the PV type when you create a PVC following this change - check that it is local instead of hostPath. |
RKE is not K3s so it doesn't really matter what we do here, it has no impact on that distro. |
Is your feature request related to a problem? Please describe.
local-path-provisioner has an option to use local instead of the default hostPath, which is not possible to set during k3s installation.
Reason for setting local is to support solutions like Velero to backup the volum. Also, there is a big warning about using hostPath at https://kubernetes.io/docs/concepts/storage/volumes/#hostpath.
The reason hostPath is default seams to be because RKE had issues (rancher/local-path-provisioner#85 (comment)) when it was set to the default some time ago, hence, it was made configurable instead.
Describe the solution you'd like
Being able to set local as volume type instead of hostpath during rke installation.
Describe alternatives you've considered
Running
kubectl patch storageclass local-path -p '{"metadata":{"annotations":{"defaultVolumeType":"local"}}}'
after installationAdditional context
https://github.com/k3s-io/k3s/blob/master/manifests/local-storage.yaml#L90-L98 - no config to change the annotation to set defaultVolumeType
The text was updated successfully, but these errors were encountered: