2018-07-14 08:48:22 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: csi-attacher-sa
|
2019-05-18 09:43:12 +00:00
|
|
|
namespace: kube-system
|
2018-07-14 08:48:22 +00:00
|
|
|
---
|
|
|
|
kind: ClusterRole
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: external-attacher-runner
|
|
|
|
rules:
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
verbs: ["get", "list"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["get", "list", "watch", "update"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["persistentvolumes"]
|
|
|
|
verbs: ["get", "list", "watch", "update"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["nodes"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
2022-06-22 12:42:51 +00:00
|
|
|
- apiGroups: ["storage.k8s.io"]
|
|
|
|
resources: ["csinodes"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
2018-07-14 08:48:22 +00:00
|
|
|
- apiGroups: ["storage.k8s.io"]
|
|
|
|
resources: ["volumeattachments"]
|
2020-06-03 05:54:08 +00:00
|
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
2022-06-22 12:42:51 +00:00
|
|
|
- apiGroups: ["storage.k8s.io"]
|
|
|
|
resources: ["volumeattachments/status"]
|
|
|
|
verbs: ["patch"]
|
2018-07-14 08:48:22 +00:00
|
|
|
---
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: csi-attacher-role
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: csi-attacher-sa
|
2019-02-28 18:34:03 +00:00
|
|
|
namespace: kube-system
|
2018-07-14 08:48:22 +00:00
|
|
|
roleRef:
|
|
|
|
kind: ClusterRole
|
|
|
|
name: external-attacher-runner
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
---
|
|
|
|
# needed for StatefulSet
|
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: csi-attacher-s3
|
2019-05-18 09:43:12 +00:00
|
|
|
namespace: kube-system
|
2018-07-14 08:48:22 +00:00
|
|
|
labels:
|
|
|
|
app: csi-attacher-s3
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: csi-attacher-s3
|
|
|
|
ports:
|
2021-04-06 14:17:01 +00:00
|
|
|
- name: csi-s3-dummy
|
|
|
|
port: 65535
|
2018-07-14 08:48:22 +00:00
|
|
|
---
|
|
|
|
kind: StatefulSet
|
2021-02-05 03:42:49 +00:00
|
|
|
apiVersion: apps/v1
|
2018-07-14 08:48:22 +00:00
|
|
|
metadata:
|
|
|
|
name: csi-attacher-s3
|
2019-05-18 09:43:12 +00:00
|
|
|
namespace: kube-system
|
2018-07-14 08:48:22 +00:00
|
|
|
spec:
|
|
|
|
serviceName: "csi-attacher-s3"
|
|
|
|
replicas: 1
|
2020-06-03 03:55:31 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: csi-attacher-s3
|
2018-07-14 08:48:22 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: csi-attacher-s3
|
|
|
|
spec:
|
|
|
|
serviceAccount: csi-attacher-sa
|
2021-04-06 14:17:01 +00:00
|
|
|
tolerations:
|
2022-08-05 10:56:26 +00:00
|
|
|
- key: node-role.kubernetes.io/master
|
|
|
|
operator: Exists
|
|
|
|
- key: CriticalAddonsOnly
|
|
|
|
operator: Exists
|
|
|
|
- operator: Exists
|
|
|
|
effect: NoExecute
|
|
|
|
tolerationSeconds: 300
|
2018-07-14 08:48:22 +00:00
|
|
|
containers:
|
|
|
|
- name: csi-attacher
|
2022-06-22 12:42:51 +00:00
|
|
|
image: quay.io/k8scsi/csi-attacher:v3.0.1
|
2018-07-14 08:48:22 +00:00
|
|
|
args:
|
|
|
|
- "--v=4"
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
2021-07-27 10:05:32 +00:00
|
|
|
value: /var/lib/kubelet/plugins/ru.yandex.s3.csi/csi.sock
|
2018-07-14 08:48:22 +00:00
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
2021-07-27 10:05:32 +00:00
|
|
|
mountPath: /var/lib/kubelet/plugins/ru.yandex.s3.csi
|
2018-07-14 08:48:22 +00:00
|
|
|
volumes:
|
|
|
|
- name: socket-dir
|
|
|
|
hostPath:
|
2021-07-27 10:05:32 +00:00
|
|
|
path: /var/lib/kubelet/plugins/ru.yandex.s3.csi
|
2018-07-14 08:48:22 +00:00
|
|
|
type: DirectoryOrCreate
|