2018-01-18 22:02:52 +00:00
|
|
|
# This YAML file contains RBAC API objects,
|
|
|
|
# which are necessary to run external csi attacher for cinder.
|
|
|
|
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: csi-attacher
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: ClusterRole
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: external-attacher-runner
|
|
|
|
rules:
|
2018-03-18 14:08:39 +00:00
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["get", "list", "watch", "update"]
|
2018-01-18 22:02:52 +00:00
|
|
|
- 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
|
|
|
|
namespace: default
|
|
|
|
roleRef:
|
|
|
|
kind: ClusterRole
|
|
|
|
name: external-attacher-runner
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
---
|
|
|
|
|
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: csi-attacher
|
|
|
|
labels:
|
|
|
|
app: csi-attacher
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: csi-attacher
|
|
|
|
ports:
|
|
|
|
- name: dummy
|
|
|
|
port: 12345
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: StatefulSet
|
|
|
|
apiVersion: apps/v1beta1
|
|
|
|
metadata:
|
|
|
|
name: csi-attacher
|
|
|
|
spec:
|
|
|
|
serviceName: "csi-attacher"
|
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: csi-attacher
|
|
|
|
spec:
|
|
|
|
serviceAccount: csi-attacher
|
|
|
|
containers:
|
|
|
|
- name: csi-attacher
|
2018-03-13 09:25:50 +00:00
|
|
|
image: quay.io/k8scsi/csi-attacher:v0.2.0
|
2018-01-18 22:02:52 +00:00
|
|
|
args:
|
|
|
|
- "--v=5"
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
2018-03-18 14:08:39 +00:00
|
|
|
value: /var/lib/kubelet/plugins/csi-cephfsplugin/csi.sock
|
2018-01-18 22:02:52 +00:00
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
2018-03-18 14:08:39 +00:00
|
|
|
mountPath: /var/lib/kubelet/plugins/csi-cephfsplugin
|
2018-01-18 22:02:52 +00:00
|
|
|
volumes:
|
|
|
|
- name: socket-dir
|
|
|
|
hostPath:
|
2018-03-18 14:08:39 +00:00
|
|
|
path: /var/lib/kubelet/plugins/csi-cephfsplugin
|
2018-02-06 13:23:51 +00:00
|
|
|
type: DirectoryOrCreate
|