mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-26 16:20:28 +00:00
a1d44056fd
Signed-off-by: Huamin Chen <hchen@redhat.com>
85 lines
1.9 KiB
YAML
85 lines
1.9 KiB
YAML
# 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:
|
|
- 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
|
|
image: docker.io/k8scsi/csi-attacher:latest
|
|
args:
|
|
- "--v=5"
|
|
- "--csi-address=$(ADDRESS)"
|
|
env:
|
|
- name: ADDRESS
|
|
value: /var/lib/kubelet/plugins/rbdplugin/csi.sock
|
|
imagePullPolicy: "IfNotPresent"
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /var/lib/kubelet/plugins/rbdplugin
|
|
volumes:
|
|
- name: socket-dir
|
|
hostPath:
|
|
path: /var/lib/kubelet/plugins/rbdplugin
|
|
type: DirectoryOrCreate
|