From 257ac44db2d39ede49fbfbb8e92ce2bae5811cd1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20K=C3=A4mmerling?=
 <lukas.kaemmerling@hetzner-cloud.de>
Date: Tue, 12 May 2020 09:36:12 +0200
Subject: [PATCH] Prepare Release v1.3.1 (#117)

---
 CHANGES.md                       |  4 +++
 README.md                        |  4 +--
 deploy/kubernetes/hcloud-csi.yml | 54 +++++++++++++++++++++++++++-----
 driver/driver.go                 |  2 +-
 4 files changed, 53 insertions(+), 11 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index ad2e694..e526e35 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,9 @@
 # Changes
 
+## v1.3.1
+
+- Add correct deployment file for latest version
+
 ## v1.3.0
 
 - Update `csi-attacher` sidecar to v2.2.0
diff --git a/README.md b/README.md
index b5dd3d9..502c6ef 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@ enabling you to use Volumes within Kubernetes. Please note that this driver **re
 
     Have a look at our [Version Matrix](README.md#version-matrix) to pick the correct deployment file.
    ```
-   kubectl apply -f https://raw.githubusercontent.com/hetznercloud/csi-driver/v1.3.0/deploy/kubernetes/hcloud-csi.yml
+   kubectl apply -f https://raw.githubusercontent.com/hetznercloud/csi-driver/v1.3.1/deploy/kubernetes/hcloud-csi.yml
    ```
 
 4. To verify everything is working, create a persistent volume claim and a pod
@@ -78,7 +78,7 @@ enabling you to use Volumes within Kubernetes. Please note that this driver **re
 
 | Kubernetes    | CSI Driver   | Deployment File |
 | ------------- | -----:| ------------------------------------------------------------------------------------------------------:|
-| 1.16-1.18     | 1.3.0 | https://raw.githubusercontent.com/hetznercloud/csi-driver/v1.3.0/deploy/kubernetes/hcloud-csi.yml      |
+| 1.16-1.18     | 1.3.1 | https://raw.githubusercontent.com/hetznercloud/csi-driver/v1.3.1/deploy/kubernetes/hcloud-csi.yml      |
 | 1.14-1.15     | 1.1.5 | https://raw.githubusercontent.com/hetznercloud/csi-driver/v1.1.5/deploy/kubernetes/hcloud-csi.yml      |
 | 1.13          | 1.1.5 | https://raw.githubusercontent.com/hetznercloud/csi-driver/v1.1.5/deploy/kubernetes/hcloud-csi-1.13.yml |
 
diff --git a/deploy/kubernetes/hcloud-csi.yml b/deploy/kubernetes/hcloud-csi.yml
index 64f38e9..6958631 100644
--- a/deploy/kubernetes/hcloud-csi.yml
+++ b/deploy/kubernetes/hcloud-csi.yml
@@ -52,11 +52,11 @@ rules:
     resources: ["secrets"]
     verbs: ["get", "list"]
   - apiGroups: [""]
-    resources: ["persistentvolumes", "persistentvolumeclaims/status"]
+    resources: ["persistentvolumes"]
     verbs: ["get", "list", "watch", "create", "delete", "patch"]
   - apiGroups: [""]
-    resources: ["persistentvolumeclaims"]
-    verbs: ["get", "list", "watch", "update"]
+    resources: ["persistentvolumeclaims", "persistentvolumeclaims/status"]
+    verbs: ["get", "list", "watch", "update", "patch"]
   - apiGroups: ["storage.k8s.io"]
     resources: ["storageclasses"]
     verbs: ["get", "list", "watch"]
@@ -106,7 +106,7 @@ spec:
       serviceAccount: hcloud-csi
       containers:
         - name: csi-attacher
-          image: quay.io/k8scsi/csi-attacher:v1.2.1
+          image: quay.io/k8scsi/csi-attacher:v2.2.0
           args:
             - --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
             - --v=5
@@ -132,7 +132,7 @@ spec:
               add: ["SYS_ADMIN"]
             allowPrivilegeEscalation: true
         - name: csi-provisioner
-          image: quay.io/k8scsi/csi-provisioner:v1.3.1
+          image: quay.io/k8scsi/csi-provisioner:v1.6.0
           args:
             - --provisioner=csi.hetzner.cloud
             - --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
@@ -147,7 +147,7 @@ spec:
               add: ["SYS_ADMIN"]
             allowPrivilegeEscalation: true
         - name: hcloud-csi-driver
-          image: hetznercloud/hcloud-csi-driver:1.3.0
+          image: hetznercloud/hcloud-csi-driver:1.3.1
           imagePullPolicy: Always
           env:
             - name: CSI_ENDPOINT
@@ -165,11 +165,30 @@ spec:
           ports:
             - containerPort: 9189
               name: metrics
+            - name: healthz
+              containerPort: 9808
+              protocol: TCP
+          livenessProbe:
+            failureThreshold: 5
+            httpGet:
+              path: /healthz
+              port: healthz
+            initialDelaySeconds: 10
+            timeoutSeconds: 3
+            periodSeconds: 2
           securityContext:
             privileged: true
             capabilities:
               add: ["SYS_ADMIN"]
             allowPrivilegeEscalation: true
+        - name: liveness-probe
+          imagePullPolicy: Always
+          image: quay.io/k8scsi/livenessprobe:v1.1.0
+          args:
+            - --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
+          volumeMounts:
+            - mountPath: /var/lib/csi/sockets/pluginproxy/
+              name: socket-dir
       volumes:
         - name: socket-dir
           emptyDir: {}
@@ -193,7 +212,7 @@ spec:
       serviceAccount: hcloud-csi
       containers:
         - name: csi-node-driver-registrar
-          image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
+          image: quay.io/k8scsi/csi-node-driver-registrar:v1.3.0
           args:
             - --v=5
             - --csi-address=/csi/csi.sock
@@ -212,7 +231,7 @@ spec:
           securityContext:
             privileged: true
         - name: hcloud-csi-driver
-          image: hetznercloud/hcloud-csi-driver:1.3.0
+          image: hetznercloud/hcloud-csi-driver:1.3.1
           imagePullPolicy: Always
           env:
             - name: CSI_ENDPOINT
@@ -237,6 +256,25 @@ spec:
           ports:
             - containerPort: 9189
               name: metrics
+            - name: healthz
+              containerPort: 9808
+              protocol: TCP
+          livenessProbe:
+            failureThreshold: 5
+            httpGet:
+              path: /healthz
+              port: healthz
+            initialDelaySeconds: 10
+            timeoutSeconds: 3
+            periodSeconds: 2
+        - name: liveness-probe
+          imagePullPolicy: Always
+          image: quay.io/k8scsi/livenessprobe:v1.1.0
+          args:
+            - --csi-address=/csi/csi.sock
+          volumeMounts:
+            - mountPath: /csi
+              name: plugin-dir
       volumes:
         - name: kubelet-dir
           hostPath:
diff --git a/driver/driver.go b/driver/driver.go
index 5797159..0b8fb67 100644
--- a/driver/driver.go
+++ b/driver/driver.go
@@ -2,7 +2,7 @@ package driver
 
 const (
 	PluginName    = "csi.hetzner.cloud"
-	PluginVersion = "1.3.0"
+	PluginVersion = "1.3.1"
 
 	MaxVolumesPerNode = 16
 	MinVolumeSize     = 10 // GB
-- 
GitLab