From 3c32ea72b1a4c58ccf55ea0783386dbff974c2b3 Mon Sep 17 00:00:00 2001
From: Vitaliy Filippov <vitalif@yourcmc.ru>
Date: Wed, 22 Jun 2022 15:42:51 +0300
Subject: [PATCH] Fix Kubernetes 1.22 support by updating csi-attacher to
 v3.0.1

Minimum supported Kubernetes version is now 1.17

Fixes #6, #17
---
 deploy/kubernetes/attacher.yaml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/deploy/kubernetes/attacher.yaml b/deploy/kubernetes/attacher.yaml
index c18ddc6..cca2d7d 100644
--- a/deploy/kubernetes/attacher.yaml
+++ b/deploy/kubernetes/attacher.yaml
@@ -21,9 +21,15 @@ rules:
   - apiGroups: [""]
     resources: ["nodes"]
     verbs: ["get", "list", "watch"]
+  - apiGroups: ["storage.k8s.io"]
+    resources: ["csinodes"]
+    verbs: ["get", "list", "watch"]
   - apiGroups: ["storage.k8s.io"]
     resources: ["volumeattachments"]
     verbs: ["get", "list", "watch", "update", "patch"]
+  - apiGroups: ["storage.k8s.io"]
+    resources: ["volumeattachments/status"]
+    verbs: ["patch"]
 ---
 kind: ClusterRoleBinding
 apiVersion: rbac.authorization.k8s.io/v1
@@ -75,7 +81,7 @@ spec:
         operator: "Exists"
       containers:
         - name: csi-attacher
-          image: quay.io/k8scsi/csi-attacher:v2.2.0
+          image: quay.io/k8scsi/csi-attacher:v3.0.1
           args:
             - "--v=4"
             - "--csi-address=$(ADDRESS)"