k8s-csi-s3/deploy/kubernetes/csi-s3.yaml

121 lines
3.2 KiB
YAML
Raw Normal View History

2018-07-14 08:48:22 +00:00
apiVersion: v1
kind: ServiceAccount
metadata:
2018-07-29 12:49:35 +00:00
name: csi-s3
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:
2018-07-29 12:49:35 +00:00
name: csi-s3
2018-07-14 08:48:22 +00:00
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "update"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch", "update"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
2018-07-29 12:49:35 +00:00
name: csi-s3
2018-07-14 08:48:22 +00:00
subjects:
- kind: ServiceAccount
2018-07-29 12:49:35 +00:00
name: csi-s3
namespace: kube-system
2018-07-14 08:48:22 +00:00
roleRef:
kind: ClusterRole
2018-07-29 12:49:35 +00:00
name: csi-s3
2018-07-14 08:48:22 +00:00
apiGroup: rbac.authorization.k8s.io
---
kind: DaemonSet
apiVersion: apps/v1
2018-07-14 08:48:22 +00:00
metadata:
2018-07-29 12:49:35 +00:00
name: csi-s3
2019-05-18 09:43:12 +00:00
namespace: kube-system
2018-07-14 08:48:22 +00:00
spec:
selector:
matchLabels:
2018-07-29 12:49:35 +00:00
app: csi-s3
2018-07-14 08:48:22 +00:00
template:
metadata:
labels:
2018-07-29 12:49:35 +00:00
app: csi-s3
2018-07-14 08:48:22 +00:00
spec:
2018-07-29 12:49:35 +00:00
serviceAccount: csi-s3
2018-07-14 08:48:22 +00:00
hostNetwork: true
containers:
- name: driver-registrar
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
2018-07-14 08:48:22 +00:00
args:
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
2018-07-14 08:48:22 +00:00
- "--v=4"
- "--csi-address=$(ADDRESS)"
env:
- name: ADDRESS
value: /csi/csi.sock
- name: DRIVER_REG_SOCK_PATH
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
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: plugin-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration/
2018-07-29 12:49:35 +00:00
- name: csi-s3
2018-07-14 08:48:22 +00:00
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: cr.yandex/crp9ftr22d26age3hulg/csi-s3:0.29.0
2021-07-19 12:59:56 +00:00
imagePullPolicy: IfNotPresent
2018-07-14 08:48:22 +00:00
args:
- "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(NODE_ID)"
- "--v=4"
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: plugin-dir
mountPath: /csi
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: "Bidirectional"
2018-07-26 20:47:36 +00:00
- name: fuse-device
mountPath: /dev/fuse
2018-07-14 08:48:22 +00:00
volumes:
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/
type: DirectoryOrCreate
2018-07-14 08:48:22 +00:00
- name: plugin-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
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
type: Directory
2018-07-26 20:47:36 +00:00
- name: fuse-device
2018-07-14 08:48:22 +00:00
hostPath:
2018-07-26 20:47:36 +00:00
path: /dev/fuse