171d2ce59c
* make cinder csi topology aware * change feature description do better reflect whats being done * remove sameas true since it isn't required
119 lines
4 KiB
Django/Jinja
119 lines
4 KiB
Django/Jinja
# This YAML file contains CSI Controller Plugin Sidecars
|
|
# external-attacher, external-provisioner, external-snapshotter
|
|
|
|
---
|
|
kind: Deployment
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
name: csi-cinder-controllerplugin
|
|
namespace: kube-system
|
|
spec:
|
|
replicas: {{ cinder_csi_controller_replicas }}
|
|
selector:
|
|
matchLabels:
|
|
app: csi-cinder-controllerplugin
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: csi-cinder-controllerplugin
|
|
spec:
|
|
serviceAccount: csi-cinder-controller-sa
|
|
containers:
|
|
- name: csi-attacher
|
|
image: {{ cinder_csi_attacher_image_repo }}:{{ cinder_csi_attacher_image_tag }}
|
|
args:
|
|
- "--v=5"
|
|
- "--csi-address=$(ADDRESS)"
|
|
env:
|
|
- name: ADDRESS
|
|
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
|
imagePullPolicy: "IfNotPresent"
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /var/lib/csi/sockets/pluginproxy/
|
|
- name: csi-provisioner
|
|
image: {{ cinder_csi_provisioner_image_repo }}:{{ cinder_csi_provisioner_image_tag }}
|
|
args:
|
|
- "--csi-address=$(ADDRESS)"
|
|
{% if cinder_topology is defined and cinder_topology %}
|
|
- --feature-gates=Topology=true
|
|
{% endif %}
|
|
env:
|
|
- name: ADDRESS
|
|
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
|
imagePullPolicy: "IfNotPresent"
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /var/lib/csi/sockets/pluginproxy/
|
|
- name: csi-snapshotter
|
|
image: {{ cinder_csi_snapshotter_image_repo }}:{{ cinder_csi_snapshotter_image_tag }}
|
|
args:
|
|
- "--csi-address=$(ADDRESS)"
|
|
env:
|
|
- name: ADDRESS
|
|
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
volumeMounts:
|
|
- mountPath: /var/lib/csi/sockets/pluginproxy/
|
|
name: socket-dir
|
|
- name: csi-resizer
|
|
image: {{ cinder_csi_resizer_image_repo }}:{{ cinder_csi_resizer_image_tag }}
|
|
args:
|
|
- "--csi-address=$(ADDRESS)"
|
|
env:
|
|
- name: ADDRESS
|
|
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
|
imagePullPolicy: "IfNotPresent"
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /var/lib/csi/sockets/pluginproxy/
|
|
- name: cinder-csi-plugin
|
|
image: {{ cinder_csi_plugin_image_repo }}:{{ cinder_csi_plugin_image_tag }}
|
|
args :
|
|
- /bin/cinder-csi-plugin
|
|
- "--nodeid=$(NODE_ID)"
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
- "--cloud-config=$(CLOUD_CONFIG)"
|
|
- "--cluster=$(CLUSTER_NAME)"
|
|
env:
|
|
- name: NODE_ID
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
- name: CSI_ENDPOINT
|
|
value: unix://csi/csi.sock
|
|
- name: CLOUD_CONFIG
|
|
value: /etc/config/cloud.conf
|
|
- name: CLUSTER_NAME
|
|
value: kubernetes
|
|
imagePullPolicy: "IfNotPresent"
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /csi
|
|
- name: secret-cinderplugin
|
|
mountPath: /etc/config
|
|
readOnly: true
|
|
- name: ca-certs
|
|
mountPath: /etc/ssl/certs
|
|
readOnly: true
|
|
{% if cinder_cacert is defined and cinder_cacert != "" %}
|
|
- name: cinder-cacert
|
|
mountPath: {{ kube_config_dir }}/cinder-cacert.pem
|
|
readOnly: true
|
|
{% endif %}
|
|
volumes:
|
|
- name: socket-dir
|
|
emptyDir:
|
|
- name: secret-cinderplugin
|
|
secret:
|
|
secretName: cloud-config
|
|
- name: ca-certs
|
|
hostPath:
|
|
path: /etc/ssl/certs
|
|
type: DirectoryOrCreate
|
|
{% if cinder_cacert is defined and cinder_cacert != "" %}
|
|
- name: cinder-cacert
|
|
hostPath:
|
|
path: {{ kube_config_dir }}/cinder-cacert.pem
|
|
type: FileOrCreate
|
|
{% endif %}
|