rancher-partner-charts/charts/hpe/hpe-csi-driver/templates/hpe-csi-controller.yaml

241 lines
8.9 KiB
YAML

---
#############################################
############ Controller driver ############
#############################################
kind: Deployment
apiVersion: apps/v1
metadata:
name: hpe-csi-controller
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: hpe-csi-controller
template:
metadata:
labels:
app: hpe-csi-controller
role: hpe-csi
{{- if .Values.controller.labels }}
{{ toYaml .Values.controller.labels | indent 8 }}
{{- end }}
spec:
serviceAccountName: hpe-csi-controller-sa
{{- if and (eq .Capabilities.KubeVersion.Major "1") ( ge ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "17") }}
priorityClassName: system-cluster-critical
{{- end }}
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
dnsConfig:
options:
- name: ndots
value: "1"
containers:
- name: csi-provisioner
{{- if and (.Values.registry) (eq .Values.registry "quay.io") }}
image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0
{{- else if .Values.registry }}
image: {{ .Values.registry }}/sig-storage/csi-provisioner:v3.3.0
{{- else }}
image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0
{{- end }}
args:
- "--csi-address=$(ADDRESS)"
- "--v=5"
{{- if and (eq .Capabilities.KubeVersion.Major "1") ( ge ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "13") }}
- "--timeout=30s"
- "--worker-threads=16"
{{- end }}
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy
- name: csi-attacher
{{- if and (.Values.registry) (eq .Values.registry "quay.io") }}
image: registry.k8s.io/sig-storage/csi-attacher:v3.5.1
{{- else if .Values.registry }}
image: {{ .Values.registry }}/sig-storage/csi-attacher:v3.5.1
{{- else }}
image: registry.k8s.io/sig-storage/csi-attacher:v3.5.1
{{- end }}
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
{{- if and ( or (eq .Values.disable.primera false) (eq .Values.disable.alletra9000 false) ) ( or (eq .Values.disable.nimble true) (eq .Values.disable.alletra6000 true) ) }}
- "--timeout=180s"
{{- end }}
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy
- name: csi-snapshotter
{{- if and (eq .Capabilities.KubeVersion.Major "1") ( ge ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "20") }}
{{- if and (.Values.registry) (eq .Values.registry "quay.io") }}
image: registry.k8s.io/sig-storage/csi-snapshotter:v5.0.1
{{- else if .Values.registry }}
image: {{ .Values.registry }}/sig-storage/csi-snapshotter:v5.0.1
{{- else }}
image: registry.k8s.io/sig-storage/csi-snapshotter:v5.0.1
{{- end }}
{{- end }}
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
{{- if and (eq .Capabilities.KubeVersion.Major "1") ( ge ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "15") }}
- name: csi-resizer
{{- if and (.Values.registry) (eq .Values.registry "quay.io") }}
image: registry.k8s.io/sig-storage/csi-resizer:v1.6.0
{{- else if .Values.registry }}
image: {{ .Values.registry }}/sig-storage/csi-resizer:v1.6.0
{{- else }}
image: registry.k8s.io/sig-storage/csi-resizer:v1.6.0
{{- end }}
args:
- "--csi-address=$(ADDRESS)"
- "--v=5"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy
{{- end }}
- name: hpe-csi-driver
{{- if .Values.registry }}
image: {{ .Values.registry }}/hpestorage/csi-driver:v2.3.0
{{- else }}
image: quay.io/hpestorage/csi-driver:v2.3.0
{{- end }}
args :
- "--endpoint=$(CSI_ENDPOINT)"
- "--flavor=kubernetes"
- "--pod-monitor"
- "--pod-monitor-interval=30"
env:
- name: CSI_ENDPOINT
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
- name: LOG_LEVEL
value: {{ .Values.logLevel }}
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy
- name: log-dir
mountPath: /var/log
- name: k8s
mountPath: /etc/kubernetes
- name: hpeconfig
mountPath: /etc/hpe-storage
- name: root-dir
mountPath: /host
- name: csi-volume-mutator
{{- if .Values.registry }}
image: {{ .Values.registry }}/hpestorage/volume-mutator:v1.3.3
{{- else }}
image: quay.io/hpestorage/volume-mutator:v1.3.3
{{- end }}
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi-extensions.sock
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: csi-volume-group-snapshotter
{{- if .Values.registry }}
image: {{ .Values.registry }}/hpestorage/volume-group-snapshotter:v1.0.3
{{- else }}
image: quay.io/hpestorage/volume-group-snapshotter:v1.0.3
{{- end }}
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi-extensions.sock
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: csi-volume-group-provisioner
{{- if .Values.registry }}
image: {{ .Values.registry }}/hpestorage/volume-group-provisioner:v1.0.3
{{- else }}
image: quay.io/hpestorage/volume-group-provisioner:v1.0.3
{{- end }}
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi-extensions.sock
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: csi-extensions
{{- if .Values.registry }}
image: {{ .Values.registry }}/hpestorage/csi-extensions:v1.2.4
{{- else }}
image: quay.io/hpestorage/csi-extensions:v1.2.4
{{- end }}
args:
- "--v=5"
- "--endpoint=$(CSI_ENDPOINT)"
env:
- name: CSI_ENDPOINT
value: unix:///var/lib/csi/sockets/pluginproxy/csi-extensions.sock
- name: LOG_LEVEL
value: {{ .Values.logLevel }}
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
volumes:
- name: socket-dir
emptyDir: {}
- name: log-dir
hostPath:
path: /var/log
- name: k8s
hostPath:
path: /etc/kubernetes
- name: hpeconfig
hostPath:
path: /etc/hpe-storage
- name: root-dir
hostPath:
path: /
{{- if .Values.controller.nodeSelector }}
nodeSelector:
{{ toYaml .Values.controller.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.controller.tolerations }}
tolerations:
{{ toYaml .Values.controller.tolerations | indent 8 }}
{{- end }}
{{- if .Values.controller.affinity }}
affinity:
{{ toYaml .Values.controller.affinity | indent 8 }}
{{- end }}