Closed MihaiSandor closed 2 years ago
Same issue after forced upgrade to LKE 1.23.
Hi, for LKE clusters, applying the linode CSI driver by hand is not required. LKE includes the linode block storage driver by default. This is part of the managed LKE service.
So if you are using an LKE cluster, you can simply create PVCs and block storage volumes will be created to fulfill those claims.
if you have deployed kubernetes directly on to linode VMs (via rancher linode plugins or otherwise), then that is what this plugin is useful for, to add block storage capabilities to those clusters.
As of kubernetes 1.18 the CSIDriver resource is built-in to the API and is no longer in beta. I suspect 1.22 has removed the beta versions of the API and that is why this is no longer working.
To apply this correctly, the following patch will work:
diff --git a/pkg/linode-bs/deploy/releases/linode-blockstorage-csi-driver.yaml b/pkg/linode-bs/deploy/releases/linode-blockstorage-csi-driver.yaml
index 242ac9b..13250a7 100644
--- a/pkg/linode-bs/deploy/releases/linode-blockstorage-csi-driver.yaml
+++ b/pkg/linode-bs/deploy/releases/linode-blockstorage-csi-driver.yaml
@@ -554,7 +554,7 @@ spec:
type: Directory
name: sys
---
-apiVersion: storage.k8s.io/v1beta1
+apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: linodebs.csi.linode.com
Will update this in the next release.
Again, this is not required for LKE clusters as the functionality provided by this repo is automatically included in LKE clusters.
Thanks for the report.
The deprecation of v1beta in favor of v1 is documented here:
https://kubernetes.io/docs/reference/using-api/deprecation-guide/#storage-resources-v122
This is fixed by #84
In the latest update, this change has been withdrawn. Was there a specific reason for this @srust?
Expected Behavior
Succesfull installation
Actual Behavior
error: unable to recognize "https://raw.githubusercontent.com/linode/linode-blockstorage-csi-driver/master/pkg/linode-bs/deploy/releases/linode-blockstorage-csi-driver.yaml": no matches for kind "CSIDriver" in version "storage.k8s.io/v1beta1"
Steps to Reproduce the Problem
Screenshots, Code Blocks, and Logs
kubectl apply -f https://raw.githubusercontent.com/linode/linode-blockstorage-csi-driver/master/pkg/linode-bs/deploy/releases/linode-blockstorage-csi-driver.yaml storageclass.storage.k8s.io/linode-block-storage unchanged storageclass.storage.k8s.io/linode-block-storage-retain unchanged serviceaccount/csi-controller-sa unchanged serviceaccount/csi-node-sa unchanged clusterrole.rbac.authorization.k8s.io/linode-csi-role unchanged clusterrole.rbac.authorization.k8s.io/external-attacher-role unchanged clusterrole.rbac.authorization.k8s.io/external-provisioner-role unchanged clusterrole.rbac.authorization.k8s.io/external-resizer-role unchanged clusterrolebinding.rbac.authorization.k8s.io/linode-csi-binding unchanged clusterrolebinding.rbac.authorization.k8s.io/csi-controller-attacher-binding unchanged clusterrolebinding.rbac.authorization.k8s.io/csi-controller-provisioner-binding unchanged clusterrolebinding.rbac.authorization.k8s.io/csi-controller-resizer-binding unchanged configmap/get-linode-id unchanged statefulset.apps/csi-linode-controller configured daemonset.apps/csi-linode-node unchanged error: unable to recognize "https://raw.githubusercontent.com/linode/linode-blockstorage-csi-driver/master/pkg/linode-bs/deploy/releases/linode-blockstorage-csi-driver.yaml": no matches for kind "CSIDriver" in version "storage.k8s.io/v1beta1"