-
Notifications
You must be signed in to change notification settings - Fork 69
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
fix(helm): configure version for snapshot api #361
fix(helm): configure version for snapshot api #361
Conversation
We can make use of built in object |
On some managed K8s clusters like OpenShift or GKE that ship with their own default CSI Drivers, the controllers will end up creating v1beta1 objects. An issue like the following was noticed when running cstor charts on GKE 1.19. ``` unable to recognize "": no matches for kind "VolumeSnapshotClass" in version "snapshot.storage.k8s.io/v1" ``` This commit uses the helm .Capabilities to check the version available in the cluster and install the class accordingly. As the .Capabilities might return false when using with template command, v1 is kept for false (or default) case. Signed-off-by: kmova <kiran.mova@mayadata.io> fix(helm): replacing flag with auto-detect Signed-off-by: kmova <kiran.mova@mayadata.io>
Thanks @shovanmaity - using |
One more changes requested. Sorry I have not explained it explained properly..
ref - https://helm.sh/docs/chart_template_guide/builtin_objects |
$ kubectl api-versions | grep "snapshot.storage.k8s.io"
snapshot.storage.k8s.io/v1
snapshot.storage.k8s.io/v1beta1 $ kubectl api-resources | grep VolumeSnapshotClass
volumesnapshotclasses snapshot.storage.k8s.io/v1beta1 false VolumeSnapshotClass As we are providing only v1 crd according to this code if v1 crd installed it will fail as |
Above comment is fixed in #362 |
On some managed K8s clusters like OpenShift or GKE that ship with
their own default CSI Drivers, the controllers will end up creating
v1beta1 objects. An issue like the following was noticed when running
cstor charts on GKE 1.19.
This commit uses the helm
.Capabilities
to check the version availablein the cluster and install the class accordingly. As the
.Capabilities
might return false when using with template command, v1 is kept for false
(or default) case.
Manually verified on GKE with and without setting the flag as follows:
Also, verified that v1 version is generated when running
helm template
Signed-off-by: kmova kiran.mova@mayadata.io