kind: StatefulSet apiVersion: apps/v1 metadata: name: {{ template "jiva.fullname" . }}-csi-controller {{- with .Values.csiController.annotations }} annotations: {{ toYaml . | nindent 4 }} {{- end }} labels: {{- include "jiva.csiController.labels" . | nindent 4 }} spec: selector: matchLabels: {{- include "jiva.csiController.matchLabels" . | nindent 6 }} serviceName: "openebs-csi" replicas: {{ .Values.csiController.replicas }} template: metadata: labels: {{- include "jiva.csiController.labels" . | nindent 8 }} {{- if .Values.csiController.podLabels }} {{ toYaml .Values.csiController.podLabels | nindent 8 }} {{- end }} spec: priorityClassName: {{ template "jiva.csiController.priorityClassName" . }} serviceAccountName: {{ .Values.serviceAccount.csiController.name }} containers: - name: {{ .Values.csiController.resizer.name }} image: "{{ .Values.csiController.resizer.image.registry }}{{ .Values.csiController.resizer.image.repository }}:{{ .Values.csiController.resizer.image.tag }}" resources: {{ toYaml .Values.csiController.resources | indent 12 }} args: - "--v={{ .Values.csiController.resizer.logLevel | default .Values.csiController.logLevel }}" - "--csi-address=$(ADDRESS)" - "--leader-election" env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock imagePullPolicy: {{ .Values.csiController.resizer.image.pullPolicy }} volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - name: {{ .Values.csiController.provisioner.name }} image: "{{ .Values.csiController.provisioner.image.registry }}{{ .Values.csiController.provisioner.image.repository }}:{{ .Values.csiController.provisioner.image.tag }}" imagePullPolicy: {{ .Values.csiController.provisioner.image.pullPolicy }} args: - "--csi-address=$(ADDRESS)" - "--v={{ .Values.csiController.provisioner.logLevel | default .Values.csiController.logLevel }}" - "--feature-gates=Topology=true" - "--extra-create-metadata=true" - "--metrics-address=:22011" - "--timeout=250s" - "--default-fstype=ext4" env: - name: MY_NAME valueFrom: fieldRef: fieldPath: metadata.name - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - name: {{ .Values.csiController.attacher.name }} image: "{{ .Values.csiController.attacher.image.registry }}{{ .Values.csiController.attacher.image.repository }}:{{ .Values.csiController.attacher.image.tag }}" imagePullPolicy: {{ .Values.csiController.attacher.image.pullPolicy }} args: - "--v={{ .Values.csiController.attacher.logLevel | default .Values.csiController.logLevel }}" - "--csi-address=$(ADDRESS)" env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - name: {{ .Values.jivaCSIPlugin.name }} image: "{{ .Values.jivaCSIPlugin.image.registry }}{{ .Values.jivaCSIPlugin.image.repository }}:{{ .Values.jivaCSIPlugin.image.tag }}" imagePullPolicy: {{ .Values.jivaCSIPlugin.image.pullPolicy }} env: - name: OPENEBS_JIVA_CSI_CONTROLLER value: controller - name: OPENEBS_JIVA_CSI_ENDPOINT value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock - name: OPENEBS_CSI_API_URL value: https://openebs.io - name: OPENEBS_NODEID valueFrom: fieldRef: apiVersion: v1 fieldPath: spec.nodeName # OpenEBS namespace where the openebs jiva operator components # has been installed - name: OPENEBS_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: OPENEBS_IO_INSTALLER_TYPE value: "jiva-helm" - name: OPENEBS_IO_ENABLE_ANALYTICS value: "{{ .Values.analytics.enabled }}" args : - "--endpoint=$(OPENEBS_JIVA_CSI_ENDPOINT)" - "--plugin=$(OPENEBS_JIVA_CSI_CONTROLLER)" - "--name=jiva.csi.openebs.io" - "--nodeid=$(OPENEBS_NODEID)" volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - name: {{ .Values.csiController.livenessprobe.name }} image: "{{ .Values.csiController.livenessprobe.image.registry }}{{ .Values.csiController.livenessprobe.image.repository }}:{{ .Values.csiController.livenessprobe.image.tag }}" imagePullPolicy: {{ .Values.csiController.livenessprobe.image.pullPolicy }} args: - "--csi-address=/csi/csi.sock" volumeMounts: - mountPath: /csi name: socket-dir volumes: - name: socket-dir emptyDir: {} {{- if .Values.imagePullSecrets }} imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }} {{- end }} {{- if .Values.csiController.nodeSelector }} nodeSelector: {{ toYaml .Values.csiController.nodeSelector | indent 8 }} {{- end }} {{- if .Values.csiController.securityContext }} securityContext: {{ toYaml .Values.csiController.securityContext | indent 8 }} {{- end }} {{- if .Values.csiController.tolerations }} tolerations: {{ toYaml .Values.csiController.tolerations | indent 8 }} {{- end }}