forked from kubernetes/cloud-provider-openstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcsi-nodeplugin.yaml
More file actions
98 lines (97 loc) · 3.48 KB
/
csi-nodeplugin.yaml
File metadata and controls
98 lines (97 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: openstack-manila-csi-nodeplugin
labels:
app: openstack-manila-csi
component: nodeplugin
spec:
selector:
matchLabels:
app: openstack-manila-csi
component: nodeplugin
template:
metadata:
labels:
app: openstack-manila-csi
component: nodeplugin
spec:
serviceAccountName: openstack-manila-csi-nodeplugin
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: registrar
image: "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.4.0"
args:
- "--csi-address=/csi/csi.sock"
- "--kubelet-registration-path=/var/lib/kubelet/plugins/manila.csi.openstack.org/csi.sock"
lifecycle:
preStop:
exec:
command: [
"/bin/sh", "-c",
'rm -rf /registration/manila.csi.openstack.org
/registration/manila.csi.openstack.org-reg.sock'
]
env:
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
imagePullPolicy: IfNotPresent
volumeMounts:
- name: plugin-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration
- name: nodeplugin
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: registry.k8s.io/provider-os/manila-csi-plugin:v1.31.2
command: ["/bin/sh", "-c",
'/bin/manila-csi-plugin
--nodeid=$(NODE_ID)
--endpoint=$(CSI_ENDPOINT)
--drivername=$(DRIVER_NAME)
--share-protocol-selector=$(MANILA_SHARE_PROTO)
--fwdendpoint=$(FWD_CSI_ENDPOINT)'
# To enable topology awareness and retrieve compute node AZs from the OpenStack Metadata Service, add the following flags:
# --with-topology
# --nodeaz=$(curl http://169.254.169.254/openstack/latest/meta_data.json | jq -r .availability_zone)
# Those flags need to be added to csi-controllerplugin.yaml as well.
]
env:
- name: DRIVER_NAME
value: manila.csi.openstack.org
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: "unix:///var/lib/kubelet/plugins/manila.csi.openstack.org/csi.sock"
- name: FWD_CSI_ENDPOINT
value: "unix:///var/lib/kubelet/plugins/FWD-NODEPLUGIN/csi.sock"
- name: MANILA_SHARE_PROTO
value: "SHARE-PROTOCOL"
imagePullPolicy: IfNotPresent
volumeMounts:
- name: plugin-dir
mountPath: /var/lib/kubelet/plugins/manila.csi.openstack.org
- name: fwd-plugin-dir
mountPath: /var/lib/kubelet/plugins/FWD-NODEPLUGIN
volumes:
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry
type: Directory
- name: plugin-dir
hostPath:
path: /var/lib/kubelet/plugins/manila.csi.openstack.org
type: DirectoryOrCreate
- name: fwd-plugin-dir
hostPath:
path: /var/lib/kubelet/plugins/FWD-NODEPLUGIN
type: DirectoryOrCreate