csi-driver-lvm icon indicating copy to clipboard operation
csi-driver-lvm copied to clipboard

Kubernetes 1.22 and v1beta1 versus v1

Open gnunn1 opened this issue 2 years ago • 4 comments

I'm trying to run this in OpenShift 4.9 and am running into some issues due to the usage of v1beta1 APIs instead of v1. The helm chart was easy to update to v1 however once the driver is running I see in the lvm-provisioner log that it is expected to find CSINode on v1beta1 instead of v1

E1021 19:09:47.474514 1 reflector.go:156] k8s.io/client-go/informers/factory.go:135: Failed to list *v1beta1.CSINode: the server could not find the requested resource

Any thoughts on how to work around this?

gnunn1 avatar Oct 21 '21 19:10 gnunn1

We are not aware how openshift manages api versioning and which k8s version is implemented in openshift 4.9.

Current k8s client.go master branch (v1.23alpha) still implements v1beta1.CSINode listers https://github.com/kubernetes/client-go/blob/master/listers/storage/v1beta1/csinode.go#L33

majst01 avatar Oct 22 '21 05:10 majst01

You can view the OpenShift documentation which notes the removal of the vibeta1 APIs as being driven by kubernetes 1.22 here:

https://docs.openshift.com/container-platform/4.9/release_notes/ocp-4-9-release-notes.html#ocp-4-9-removed-kube-1-22-apis

It links to the kubernetes docs which notes the removal of these APIs here:

https://kubernetes.io/docs/reference/using-api/deprecation-guide/#storage-resources-v122

gnunn1 avatar Oct 22 '21 06:10 gnunn1

If you like to try it out, there is an updated (but not yet released) version of the helm-chart here: https://github.com/metal-stack/helm-charts/tree/master/charts/csi-driver-lvm

contains (beside other updates): https://github.com/metal-stack/helm-charts/blob/master/charts/csi-driver-lvm/templates/common.yaml#L1-L6

mwennrich avatar Oct 22 '21 07:10 mwennrich

Thanks, that help chart does work fine though I did need to add the anyuid and privilege SCCs (OpenShift's version of PSP) to the controller and plugin service accounts. After that it works great.

One question, are you supposed to be able to just past the devicePattern, if I comment out vgName it complains that it is a required value and always seems to prefer it. It's not a big deal to create an LVM PV and VG ahead of time though.

gnunn1 avatar Oct 24 '21 18:10 gnunn1