2021-12-08 18:17:39 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: csi-provisioner-sa
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
---
|
|
|
|
kind: ClusterRole
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: external-provisioner-runner
|
|
|
|
rules:
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
verbs: ["get", "list"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["persistentvolumes"]
|
|
|
|
verbs: ["get", "list", "watch", "create", "delete"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["persistentvolumeclaims"]
|
|
|
|
verbs: ["get", "list", "watch", "update"]
|
|
|
|
- apiGroups: ["storage.k8s.io"]
|
|
|
|
resources: ["storageclasses"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["list", "watch", "create", "update", "patch"]
|
|
|
|
---
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: csi-provisioner-role
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: csi-provisioner-sa
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
roleRef:
|
|
|
|
kind: ClusterRole
|
|
|
|
name: external-provisioner-runner
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
---
|
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: csi-provisioner-s3
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
labels:
|
|
|
|
app: csi-provisioner-s3
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: csi-provisioner-s3
|
|
|
|
ports:
|
|
|
|
- name: csi-s3-dummy
|
|
|
|
port: 65535
|
|
|
|
---
|
|
|
|
kind: StatefulSet
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: csi-provisioner-s3
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
spec:
|
|
|
|
serviceName: "csi-provisioner-s3"
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: csi-provisioner-s3
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: csi-provisioner-s3
|
|
|
|
spec:
|
|
|
|
serviceAccount: csi-provisioner-sa
|
|
|
|
tolerations:
|
2022-08-05 10:56:26 +00:00
|
|
|
- key: node-role.kubernetes.io/master
|
|
|
|
operator: Exists
|
2022-11-16 22:21:59 +00:00
|
|
|
- key: CriticalAddonsOnly
|
|
|
|
operator: Exists
|
2022-08-05 10:56:26 +00:00
|
|
|
{{- with .Values.tolerations.controller }}
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2021-12-08 18:17:39 +00:00
|
|
|
containers:
|
|
|
|
- name: csi-provisioner
|
|
|
|
image: {{ .Values.images.provisioner }}
|
|
|
|
args:
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
|
|
|
- "--v=4"
|
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
2023-05-18 09:40:51 +00:00
|
|
|
value: {{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi/csi.sock
|
2021-12-08 18:17:39 +00:00
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
2023-05-18 09:40:51 +00:00
|
|
|
mountPath: {{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi
|
2021-12-08 18:17:39 +00:00
|
|
|
- name: csi-s3
|
|
|
|
image: {{ .Values.images.csi }}
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
args:
|
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
|
|
- "--nodeid=$(NODE_ID)"
|
|
|
|
- "--v=4"
|
|
|
|
env:
|
|
|
|
- name: CSI_ENDPOINT
|
2023-05-18 09:40:51 +00:00
|
|
|
value: unix://{{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi/csi.sock
|
2021-12-08 18:17:39 +00:00
|
|
|
- name: NODE_ID
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
2023-05-18 09:40:51 +00:00
|
|
|
mountPath: {{ .Values.kubeletPath }}/plugins/ru.yandex.s3.csi
|
2021-12-08 18:17:39 +00:00
|
|
|
volumes:
|
|
|
|
- name: socket-dir
|
|
|
|
emptyDir: {}
|