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

124 lines
3.4 KiB
YAML
Raw Permalink 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
---
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:
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- operator: Exists
effect: NoExecute
tolerationSeconds: 300
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
2023-05-23 11:59:44 +00:00
image: cr.yandex/crp9ftr22d26age3hulg/csi-s3:0.35.5
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: stage-dir
mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi
mountPropagation: "Bidirectional"
2018-07-14 08:48:22 +00:00
- 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
- name: systemd-control
mountPath: /run/systemd
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: stage-dir
hostPath:
path: /var/lib/kubelet/plugins/kubernetes.io/csi
type: DirectoryOrCreate
2018-07-14 08:48:22 +00:00
- 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
- name: systemd-control
hostPath:
path: /run/systemd
type: DirectoryOrCreate