86 lines
2 KiB
YAML
86 lines
2 KiB
YAML
|
---
|
||
|
apiVersion: v1
|
||
|
kind: ServiceAccount
|
||
|
metadata:
|
||
|
name: csi-attacher-sa
|
||
|
---
|
||
|
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"]
|
||
|
- apiGroups: ["storage.k8s.io"]
|
||
|
resources: ["volumeattachments"]
|
||
|
verbs: ["get", "list", "watch", "update"]
|
||
|
---
|
||
|
kind: ClusterRoleBinding
|
||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||
|
metadata:
|
||
|
name: csi-attacher-role
|
||
|
subjects:
|
||
|
- kind: ServiceAccount
|
||
|
name: csi-attacher-sa
|
||
|
namespace: default
|
||
|
roleRef:
|
||
|
kind: ClusterRole
|
||
|
name: external-attacher-runner
|
||
|
apiGroup: rbac.authorization.k8s.io
|
||
|
---
|
||
|
# needed for StatefulSet
|
||
|
kind: Service
|
||
|
apiVersion: v1
|
||
|
metadata:
|
||
|
name: csi-attacher-s3
|
||
|
labels:
|
||
|
app: csi-attacher-s3
|
||
|
spec:
|
||
|
selector:
|
||
|
app: csi-attacher-s3
|
||
|
ports:
|
||
|
- name: dummy
|
||
|
port: 12345
|
||
|
---
|
||
|
kind: StatefulSet
|
||
|
apiVersion: apps/v1beta1
|
||
|
metadata:
|
||
|
name: csi-attacher-s3
|
||
|
spec:
|
||
|
serviceName: "csi-attacher-s3"
|
||
|
replicas: 1
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: csi-attacher-s3
|
||
|
spec:
|
||
|
serviceAccount: csi-attacher-sa
|
||
|
containers:
|
||
|
- name: csi-attacher
|
||
|
image: quay.io/k8scsi/csi-attacher:v0.2.0
|
||
|
args:
|
||
|
- "--v=4"
|
||
|
- "--csi-address=$(ADDRESS)"
|
||
|
env:
|
||
|
- name: ADDRESS
|
||
|
value: /var/lib/kubelet/plugins/ch.ctrox.csi.s3-driver/csi.sock
|
||
|
imagePullPolicy: "IfNotPresent"
|
||
|
volumeMounts:
|
||
|
- name: socket-dir
|
||
|
mountPath: /var/lib/kubelet/plugins/ch.ctrox.csi.s3-driver
|
||
|
volumes:
|
||
|
- name: socket-dir
|
||
|
hostPath:
|
||
|
path: /var/lib/kubelet/plugins/ch.ctrox.csi.s3-driver
|
||
|
type: DirectoryOrCreate
|