rawfile-localpv/deploy/charts/rawfile-csi/templates/01-controller-plugin.yaml

78 lines
2.4 KiB
YAML
Raw Permalink Normal View History

apiVersion: v1
kind: Service
metadata:
name: {{ include "rawfile-csi.fullname" . }}-controller
labels:
{{- include "rawfile-csi.labels" . | nindent 4 }}
component: controller
spec:
type: ClusterIP
selector:
{{- include "rawfile-csi.selectorLabels" . | nindent 4 }}
component: controller
clusterIP: None
---
2020-04-23 13:52:01 +00:00
apiVersion: apps/v1
kind: StatefulSet
2020-04-23 13:52:01 +00:00
metadata:
2020-04-28 13:22:20 +00:00
name: {{ include "rawfile-csi.fullname" . }}-controller
2020-04-23 13:52:01 +00:00
spec:
replicas: 1
serviceName: {{ include "rawfile-csi.fullname" . }}
2020-04-23 13:52:01 +00:00
selector:
2020-04-28 13:22:20 +00:00
matchLabels: &selectorLabels
{{- include "rawfile-csi.selectorLabels" . | nindent 6 }}
component: controller
2020-04-23 13:52:01 +00:00
template:
metadata:
2020-04-28 13:22:20 +00:00
labels: *selectorLabels
2020-04-23 13:52:01 +00:00
spec:
2020-04-28 13:22:20 +00:00
serviceAccount: {{ include "rawfile-csi.fullname" . }}-driver
2020-04-23 13:52:01 +00:00
priorityClassName: system-cluster-critical
tolerations:
- key: "node-role.kubernetes.io/master"
operator: Equal
value: "true"
effect: NoSchedule
volumes:
- name: socket-dir
emptyDir: {}
containers:
- name: csi-driver
2020-04-28 13:22:20 +00:00
image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}"
imagePullPolicy: {{ .Values.controller.image.pullPolicy }}
args:
- csi-driver
- --disable-metrics
2020-04-23 13:52:01 +00:00
env:
- name: PROVISIONER_NAME
value: "{{ .Values.provisionerName }}"
2020-04-23 13:52:01 +00:00
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: IMAGE_REPOSITORY
value: "{{ .Values.controller.image.repository }}"
{{- if regexMatch "^.*-ci$" .Values.controller.image.tag }}
- name: IMAGE_TAG
value: "{{ .Values.controller.image.tag }}"
{{- end }}
2020-04-23 13:52:01 +00:00
volumeMounts:
- name: socket-dir
mountPath: /csi
2020-09-11 16:14:29 +00:00
ports:
- name: csi-probe
containerPort: 9808
2020-04-28 13:22:20 +00:00
resources:
{{- toYaml .Values.controller.resources | nindent 12 }}
2020-09-11 16:14:29 +00:00
- name: external-resizer
image: k8s.gcr.io/sig-storage/csi-resizer:v1.2.0
imagePullPolicy: IfNotPresent
args:
- "--csi-address=$(ADDRESS)"
2020-09-11 16:14:29 +00:00
- "--handle-volume-inuse-error=false"
env:
- name: ADDRESS
value: /csi/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /csi