From e20a0442a67792f2f1e5623a66406d2598eee7be Mon Sep 17 00:00:00 2001 From: Hector Fernandez Date: Wed, 5 Feb 2020 15:00:33 +0100 Subject: [PATCH] azuredisk: bump version to 0.5.0 (#394) * azuredisk: bump version to 0.5.0 * fix: remove double quotes * chore: use quay.io instead of azure registry * azure: add tolerations for the ds Co-authored-by: Sebastian Brandt <793580+sebbrandt87@users.noreply.github.com> --- stable/azuredisk-csi-driver/Chart.yaml | 4 +- .../templates/csi-azuredisk-controller.yaml | 37 ++++++++++---- .../templates/csi-azuredisk-node.yaml | 16 ++++--- .../rbac-csi-azuredisk-controller.yaml | 38 ++++++++++++++- stable/azuredisk-csi-driver/values.yaml | 48 +++++++++++++++++-- 5 files changed, 121 insertions(+), 22 deletions(-) diff --git a/stable/azuredisk-csi-driver/Chart.yaml b/stable/azuredisk-csi-driver/Chart.yaml index 4fc88b7ee..ca4ac3ef2 100644 --- a/stable/azuredisk-csi-driver/Chart.yaml +++ b/stable/azuredisk-csi-driver/Chart.yaml @@ -1,10 +1,10 @@ apiVersion: v1 -appVersion: 0.4.0 +appVersion: 0.5.0 description: Azure disk Container Storage Interface (CSI) Storage Plugin name: azuredisk-csi-driver maintainers: - name: sebbrandt87 -version: 0.4.0 +version: 0.5.0 kubeVersion: ">=1.15.0" home: https://github.com/kubernetes-sigs/azuredisk-csi-driver sources: diff --git a/stable/azuredisk-csi-driver/templates/csi-azuredisk-controller.yaml b/stable/azuredisk-csi-driver/templates/csi-azuredisk-controller.yaml index 702b32b44..aa9e7503f 100644 --- a/stable/azuredisk-csi-driver/templates/csi-azuredisk-controller.yaml +++ b/stable/azuredisk-csi-driver/templates/csi-azuredisk-controller.yaml @@ -20,10 +20,11 @@ spec: priorityClassName: system-cluster-critical containers: - name: csi-provisioner - image: quay.io/k8scsi/csi-provisioner:v1.4.0 + image: "{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}" args: + - --provisioner=disk.csi.azure.com - --csi-address=$(ADDRESS) - - --timeout=30s + - --timeout=120s - --retry-interval-start=1s - --retry-interval-max=5m - --worker-threads=100 @@ -32,6 +33,7 @@ spec: {{- end}} - --enable-leader-election - --leader-election-type=leases + - --v=5 env: - name: ADDRESS value: /csi/csi.sock @@ -40,7 +42,7 @@ spec: - mountPath: /csi name: socket-dir - name: csi-attacher - image: quay.io/k8scsi/csi-attacher:v2.0.0 + image: "{{ .Values.image.csiAttacher.repository }}:{{ .Values.image.csiAttacher.tag }}" args: - --v=5 - --csi-address=$(ADDRESS) @@ -48,6 +50,8 @@ spec: - --retry-interval-start=1s - --retry-interval-max=5m - --worker-threads=20 + - -leader-election + - -leader-election-type=leases env: - name: ADDRESS value: /csi/csi.sock @@ -56,7 +60,7 @@ spec: - mountPath: /csi name: socket-dir - name: cluster-driver-registrar - image: quay.io/k8scsi/csi-cluster-driver-registrar:v1.0.1 + image: "{{ .Values.image.clusterDriverRegistrar.repository }}:{{ .Values.image.clusterDriverRegistrar.tag }}" args: - --csi-address=$(ADDRESS) - --driver-requires-attachment=true @@ -68,9 +72,22 @@ spec: - name: socket-dir mountPath: /csi - name: csi-snapshotter - image: quay.io/k8scsi/csi-snapshotter:v1.2.2 + image: "{{ .Values.image.csiSnapshotter.repository }}:{{ .Values.image.csiSnapshotter.tag }}" args: - --csi-address=$(ADDRESS) + - -leader-election + env: + - name: ADDRESS + value: /csi/csi.sock + volumeMounts: + - name: socket-dir + mountPath: /csi + - name: csi-resizer + image: "{{ .Values.image.csiResizer.repository }}:{{ .Values.image.csiResizer.tag }}" + args: + - -csi-address=$(ADDRESS) + - -v=5 + - -leader-election env: - name: ADDRESS value: /csi/csi.sock @@ -78,7 +95,7 @@ spec: - name: socket-dir mountPath: /csi - name: liveness-probe - image: quay.io/k8scsi/livenessprobe:v1.1.0 + image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}" args: - --csi-address=/csi/csi.sock - --connection-timeout=3s @@ -87,11 +104,11 @@ spec: - name: socket-dir mountPath: /csi - name: azuredisk - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ .Values.image.azuredisk.repository }}:{{ .Values.image.azuredisk.tag }}" args: - - "--v=5" - - "--endpoint=$(CSI_ENDPOINT)" - - "--nodeid=$(KUBE_NODE_NAME)" + - --v=5 + - --endpoint=$(CSI_ENDPOINT) + - --nodeid=$(KUBE_NODE_NAME) ports: - containerPort: 9602 name: healthz diff --git a/stable/azuredisk-csi-driver/templates/csi-azuredisk-node.yaml b/stable/azuredisk-csi-driver/templates/csi-azuredisk-node.yaml index bb2de8af7..058016934 100644 --- a/stable/azuredisk-csi-driver/templates/csi-azuredisk-node.yaml +++ b/stable/azuredisk-csi-driver/templates/csi-azuredisk-node.yaml @@ -16,6 +16,10 @@ spec: hostNetwork: true nodeSelector: beta.kubernetes.io/os: linux +{{- if .Values.azuredisk.node.tolerations }} + tolerations: +{{ toYaml .Values.azuredisk.node.tolerations | indent 8 }} +{{- end }} priorityClassName: system-node-critical containers: - name: liveness-probe @@ -23,13 +27,13 @@ spec: volumeMounts: - mountPath: /csi name: socket-dir - image: quay.io/k8scsi/livenessprobe:v1.1.0 + image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}" args: - --csi-address=/csi/csi.sock - --connection-timeout=3s - --health-port=9602 - name: node-driver-registrar - image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0 + image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}" args: - --csi-address=$(ADDRESS) - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) @@ -49,11 +53,11 @@ spec: - name: registration-dir mountPath: /registration - name: azuredisk - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ .Values.image.azuredisk.repository }}:{{ .Values.image.azuredisk.tag }}" args: - - "--v=5" - - "--endpoint=$(CSI_ENDPOINT)" - - "--nodeid=$(KUBE_NODE_NAME)" + - --v=5 + - --endpoint=$(CSI_ENDPOINT) + - --nodeid=$(KUBE_NODE_NAME) ports: - containerPort: 9602 name: healthz diff --git a/stable/azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml b/stable/azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml index 2a3dbd9f8..d88beeff6 100644 --- a/stable/azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml +++ b/stable/azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml @@ -25,7 +25,7 @@ rules: verbs: ["get", "list", "watch"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] - verbs: ["get", "watch", "list", "delete", "update", "create"] + verbs: ["get", "watch", "list", "delete", "update", "create", "patch"] --- @@ -166,4 +166,40 @@ roleRef: kind: ClusterRole name: azuredisk-external-snapshotter-role apiGroup: rbac.authorization.k8s.io + +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: azuredisk-external-resizer-role + namespace: {{ .Release.Namespace }} +{{ include "azuredisk.labels" . | indent 2 }} +rules: + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: ["get", "list", "watch", "update", "patch"] + - apiGroups: [""] + resources: ["persistentvolumeclaims"] + verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["persistentvolumeclaims/status"] + verbs: ["update", "patch"] + - apiGroups: [""] + resources: ["events"] + verbs: ["list", "watch", "create", "update", "patch"] +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: azuredisk-csi-resizer-role + namespace: {{ .Release.Namespace }} +{{ include "azuredisk.labels" . | indent 2 }} +subjects: + - kind: ServiceAccount + name: csi-azuredisk-controller-sa + namespace: {{ .Release.Namespace }} +roleRef: + kind: ClusterRole + name: azuredisk-external-resizer-role + apiGroup: rbac.authorization.k8s.io {{ end }} diff --git a/stable/azuredisk-csi-driver/values.yaml b/stable/azuredisk-csi-driver/values.yaml index 5ad56f6c2..a6dfbe179 100644 --- a/stable/azuredisk-csi-driver/values.yaml +++ b/stable/azuredisk-csi-driver/values.yaml @@ -1,7 +1,36 @@ image: - repository: mcr.microsoft.com/k8s/csi/azuredisk-csi - tag: v0.4.0 - pullPolicy: Always + azuredisk: + repository: mcr.microsoft.com/k8s/csi/azuredisk-csi + tag: v0.5.0 + pullPolicy: Always + csiProvisioner: + repository: quay.io/k8scsi/csi-provisioner + tag: v1.4.0 + pullPolicy: Always + csiAttacher: + repository: quay.io/k8scsi/csi-attacher + tag: v1.2.0 + pullPolicy: Always + clusterDriverRegistrar: + repository: quay.io/k8scsi/csi-cluster-driver-registrar + tag: v1.0.1 + pullPolicy: Always + csiSnapshotter: + repository: quay.io/k8scsi/csi-snapshotter + tag: v1.1.0 + pullPolicy: Always + csiResizer: + repository: quay.io/k8scsi/csi-resizer + tag: v0.3.0 + pullPolicy: Always + livenessProbe: + repository: quay.io/k8scsi/livenessprobe + tag: v1.1.0 + pullPolicy: Always + nodeDriverRegistrar: + repository: quay.io/k8scsi/csi-node-driver-registrar + tag: v1.1.0 + pullPolicy: Always serviceAccount: create: true @@ -9,7 +38,20 @@ serviceAccount: rbac: create: true +controller: + replicas: 3 + # True if enable volume scheduling for dynamic volume provisioning enableVolumeScheduling: false cloudConfig: /etc/kubernetes/cloud-config/cloud.conf + +azuredisk: + node: + tolerations: + - effect: NoSchedule + operator: Exists + - effect: NoExecute + operator: Exists + - key: CriticalAddonsOnly + operator: Exists