Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions charts/seed/templates/csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ rescan-on-resize = yes
` -}}

{{- if and (not .Values.seedKubeadm) (not .Values.seedVirtual) (semverCompare ">= 1.20-0" .Capabilities.KubeVersion.Version) -}}
{{- if semverCompare "< 1.31.2" .Capabilities.KubeVersion.Version }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -20,6 +21,7 @@ type: Opaque
data:
cloudprovider.conf: {{ tpl $conf $ | b64enc }}
---
{{- end }}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down Expand Up @@ -506,16 +508,23 @@ spec:
- /bin/cinder-csi-plugin
- "--nodeid=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
{{- if semverCompare "< 1.31.2" .Capabilities.KubeVersion.Version }}
- "--cloud-config=$(CLOUD_CONFIG)"
{{- end }}
{{- if semverCompare ">= 1.31.2" .Capabilities.KubeVersion.Version }}
- "--node-service-no-os-client=true"
{{- end }}
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: unix://csi/csi.sock
{{- if semverCompare "< 1.31.2" .Capabilities.KubeVersion.Version }}
- name: CLOUD_CONFIG
value: /etc/config/cloudprovider.conf
{{- end }}
imagePullPolicy: "IfNotPresent"
ports:
- containerPort: 9808
Expand All @@ -539,9 +548,11 @@ spec:
- name: pods-probe-dir
mountPath: /dev
mountPropagation: "HostToContainer"
{{- if semverCompare "< 1.31.2" .Capabilities.KubeVersion.Version }}
- name: secret-cinderplugin
mountPath: /etc/config
readOnly: true
{{- end }}
volumes:
- name: socket-dir
hostPath:
Expand All @@ -559,7 +570,9 @@ spec:
hostPath:
path: /dev
type: Directory
{{- if semverCompare "< 1.31.2" .Capabilities.KubeVersion.Version }}
- name: secret-cinderplugin
secret:
secretName: cloud-config
{{- end }}
{{- end }}