Allow to use custom csi plugin image and enable topology support

This commit is contained in:
Jesse Haka 2020-11-11 09:50:08 +02:00
parent 9b3f13d93f
commit a8ed94b74f
4 changed files with 16 additions and 6 deletions

View File

@ -706,7 +706,9 @@ type OpenstackBlockStorageConfig struct {
IgnoreAZ *bool `json:"ignore-volume-az,omitempty"`
OverrideAZ *string `json:"override-volume-az,omitempty"`
// CreateStorageClass provisions a default class for the Cinder plugin
CreateStorageClass *bool `json:"createStorageClass,omitempty"`
CreateStorageClass *bool `json:"createStorageClass,omitempty"`
CSIPluginImage string `json:"csiPluginImage,omitempty"`
CSITopologySupport *bool `json:"csiTopologySupport,omitempty"`
}
// OpenstackMonitor defines the config for a health monitor

View File

@ -707,7 +707,9 @@ type OpenstackBlockStorageConfig struct {
IgnoreAZ *bool `json:"ignore-volume-az,omitempty"`
OverrideAZ *string `json:"override-volume-az,omitempty"`
// CreateStorageClass provisions a default class for the Cinder plugin
CreateStorageClass *bool `json:"createStorageClass,omitempty"`
CreateStorageClass *bool `json:"createStorageClass,omitempty"`
CSIPluginImage string `json:"csiPluginImage,omitempty"`
CSITopologySupport *bool `json:"csiTopologySupport,omitempty"`
}
// OpenstackMonitor defines the config for a health monitor

View File

@ -15641,6 +15641,9 @@ spec:
args:
- "--csi-address=$(ADDRESS)"
- "--timeout=3m"
{{ if WithDefaultBool .CloudConfig.Openstack.BlockStorage.CSITopologySupport false }}
- --feature-gates=Topology=true
{{ end }}
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
@ -15671,7 +15674,7 @@ spec:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: cinder-csi-plugin
image: docker.io/k8scloudprovider/cinder-csi-plugin:{{ OpenStackCCMTag }}
image: "{{- if .CloudConfig.Openstack.BlockStorage.CSIPluginImage -}} {{ .CloudConfig.Openstack.BlockStorage.CSIPluginImage }} {{- else -}} docker.io/k8scloudprovider/cinder-csi-plugin:{{OpenStackCCMTag}} {{- end -}}"
args:
- /bin/cinder-csi-plugin
- "--nodeid=$(NODE_ID)"
@ -15800,7 +15803,7 @@ spec:
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: docker.io/k8scloudprovider/cinder-csi-plugin:{{ OpenStackCCMTag }}
image: "{{- if .CloudConfig.Openstack.BlockStorage.CSIPluginImage -}} {{ .CloudConfig.Openstack.BlockStorage.CSIPluginImage }} {{- else -}} docker.io/k8scloudprovider/cinder-csi-plugin:{{OpenStackCCMTag}} {{- end -}}"
args :
- /bin/cinder-csi-plugin
- "--nodeid=$(NODE_ID)"

View File

@ -288,6 +288,9 @@ spec:
args:
- "--csi-address=$(ADDRESS)"
- "--timeout=3m"
{{ if WithDefaultBool .CloudConfig.Openstack.BlockStorage.CSITopologySupport false }}
- --feature-gates=Topology=true
{{ end }}
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
@ -318,7 +321,7 @@ spec:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: cinder-csi-plugin
image: docker.io/k8scloudprovider/cinder-csi-plugin:{{ OpenStackCCMTag }}
image: "{{- if .CloudConfig.Openstack.BlockStorage.CSIPluginImage -}} {{ .CloudConfig.Openstack.BlockStorage.CSIPluginImage }} {{- else -}} docker.io/k8scloudprovider/cinder-csi-plugin:{{OpenStackCCMTag}} {{- end -}}"
args:
- /bin/cinder-csi-plugin
- "--nodeid=$(NODE_ID)"
@ -447,7 +450,7 @@ spec:
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: docker.io/k8scloudprovider/cinder-csi-plugin:{{ OpenStackCCMTag }}
image: "{{- if .CloudConfig.Openstack.BlockStorage.CSIPluginImage -}} {{ .CloudConfig.Openstack.BlockStorage.CSIPluginImage }} {{- else -}} docker.io/k8scloudprovider/cinder-csi-plugin:{{OpenStackCCMTag}} {{- end -}}"
args :
- /bin/cinder-csi-plugin
- "--nodeid=$(NODE_ID)"