vSphere-CSI: update to 2.4.0 (#8295)

This commit is contained in:
Cristian Calin
2021-12-10 21:07:23 +02:00
committed by GitHub
parent b396801e28
commit 0e969c0b72
11 changed files with 155 additions and 241 deletions

View File

@@ -5,6 +5,11 @@ metadata:
namespace: kube-system
spec:
replicas: {{ vsphere_csi_controller_replicas }}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 0
selector:
matchLabels:
app: vsphere-csi-controller
@@ -14,6 +19,16 @@ spec:
app: vsphere-csi-controller
role: vsphere-csi
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- vsphere-csi-controller
topologyKey: "kubernetes.io/hostname"
serviceAccountName: vsphere-csi-controller
nodeSelector:
node-role.kubernetes.io/control-plane: ""
@@ -39,12 +54,14 @@ spec:
dnsPolicy: "Default"
containers:
- name: csi-attacher
image: {{ quay_image_repo }}/k8scsi/csi-attacher:{{ vsphere_csi_attacher_image_tag }}
image: {{ kube_image_repo }}/sig-storage/csi-attacher:{{ vsphere_csi_attacher_image_tag }}
args:
- "--v=4"
- "--timeout=300s"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
- "--kube-api-qps=100"
- "--kube-api-burst=100"
env:
- name: ADDRESS
value: /csi/csi.sock
@@ -53,17 +70,15 @@ spec:
name: socket-dir
{% if external_vsphere_version >= "7.0" %}
- name: csi-resizer
image: {{ quay_image_repo }}/k8scsi/csi-resizer:{{ vsphere_csi_resizer_tag }}
image: {{ kube_image_repo }}/sig-storage/csi-resizer:{{ vsphere_csi_resizer_tag }}
args:
- "--v=4"
- "--timeout=300s"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
{% if vsphere_csi_controller is version('v2.2.0', '>=') %}
- "--handle-volume-inuse-error=false"
- "--kube-api-qps=100"
- "--kube-api-burst=100"
{% endif %}
env:
- name: ADDRESS
value: /csi/csi.sock
@@ -77,6 +92,7 @@ spec:
args:
- "--fss-name=internal-feature-states.csi.vsphere.vmware.com"
- "--fss-namespace=$(CSI_NAMESPACE)"
- "--use-gocsi=false"
{% endif %}
imagePullPolicy: {{ k8s_image_pull_policy }}
env:
@@ -84,6 +100,10 @@ spec:
value: unix://{{ csi_endpoint }}/csi.sock
- name: X_CSI_MODE
value: "controller"
- name: X_CSI_SPEC_DISABLE_LEN_CHECK
value: "true"
- name: X_CSI_SERIAL_VOL_ACCESS_TIMEOUT
value: 3m
- name: VSPHERE_CSI_CONFIG
value: "/etc/cloud/csi-vsphere.conf"
- name: LOGGER_LEVEL
@@ -98,8 +118,6 @@ spec:
fieldRef:
fieldPath: metadata.namespace
{% endif %}
- name: X_CSI_SERIAL_VOL_ACCESS_TIMEOUT
value: 3m
volumeMounts:
- mountPath: /etc/cloud
name: vsphere-config-volume
@@ -122,7 +140,7 @@ spec:
periodSeconds: 5
failureThreshold: 3
- name: liveness-probe
image: {{ quay_image_repo }}/k8scsi/livenessprobe:{{ vsphere_csi_liveness_probe_image_tag }}
image: {{ kube_image_repo }}/sig-storage/livenessprobe:{{ vsphere_csi_liveness_probe_image_tag }}
args:
- "--v=4"
- "--csi-address=$(ADDRESS)"
@@ -167,7 +185,7 @@ spec:
name: vsphere-config-volume
readOnly: true
- name: csi-provisioner
image: {{ quay_image_repo }}/k8scsi/csi-provisioner:{{ vsphere_csi_provisioner_image_tag }}
image: {{ kube_image_repo }}/sig-storage/csi-provisioner:{{ vsphere_csi_provisioner_image_tag }}
args:
- "--v=4"
- "--timeout=300s"
@@ -193,42 +211,3 @@ spec:
secretName: vsphere-config-secret
- name: socket-dir
emptyDir: {}
---
apiVersion: v1
data:
"csi-migration": "false" # csi-migration feature is only available for vSphere 7.0U1
"csi-auth-check": "true"
"online-volume-extend": "true"
kind: ConfigMap
metadata:
name: internal-feature-states.csi.vsphere.vmware.com
namespace: kube-system
---
apiVersion: storage.k8s.io/v1 # For k8s 1.17 or lower use storage.k8s.io/v1beta1
kind: CSIDriver
metadata:
name: csi.vsphere.vmware.com
spec:
attachRequired: true
podInfoOnMount: false
---
apiVersion: v1
kind: Service
metadata:
name: vsphere-csi-controller
namespace: kube-system
labels:
app: vsphere-csi-controller
spec:
ports:
- name: ctlr
port: 2112
targetPort: 2112
protocol: TCP
- name: syncer
port: 2113
targetPort: 2113
protocol: TCP
selector:
app: vsphere-csi-controller