-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathcsi-beegfs-controller.yaml
94 lines (94 loc) · 3.46 KB
/
csi-beegfs-controller.yaml
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
# Copyright 2021 NetApp, Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0.
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: csi-beegfs-controller
spec:
serviceName: "csi-beegfs-controller"
replicas: 1
selector:
matchLabels:
app: csi-beegfs-controller
template:
metadata:
labels:
app: csi-beegfs-controller
spec:
serviceAccountName: csi-beegfs-controller-sa
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
hostNetwork: true # required to find an available connClientPortUDP on the host.
containers:
- name: csi-provisioner
image: csi-provisioner # kustomized
args:
- -v=5
- --csi-address=/csi/csi.sock
- --volume-name-uuid-length=8
volumeMounts:
- mountPath: /csi
name: socket-dir
- name: beegfs
image: beegfs-csi-driver # kustomized
args:
- --driver-name=beegfs.csi.netapp.com
- --node-id=$(KUBE_NODE_NAME)
- --endpoint=unix://csi/csi.sock
- --client-conf-template-path=/host/etc/beegfs/beegfs-client.conf # The host filesystem is mounted at /host.
- --cs-data-dir=/var/lib/kubelet/plugins/beegfs.csi.netapp.com
- --config-path=/csi/config/csi-beegfs-config.yaml
- --connauth-path=/csi/connauth/csi-beegfs-connauth.yaml
- $(LOG_LEVEL_ARG)
securityContext:
# Privileged is required for bidirectional mount propagation and to run the mount command.
# Adding the SYS_ADMIN capability is insufficient in certain environments (e.g. when AppArmor is enabled).
privileged: true
env:
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: LOG_LEVEL_ARG
value: -v=3
volumeMounts:
- mountPath: /csi
name: socket-dir
- mountPath: /csi/config
name: config-dir
- mountPath: /csi/connauth
name: connauth-dir
- mountPath: /host
name: host-dir
readOnly: true # We should NOT write arbitrarily to the host filesystem.
- mountPath: /var/lib/kubelet/plugins/beegfs.csi.netapp.com
name: plugin-dir
volumes:
# The plugin uses host-dir and chwrap to execute binaries installed on the host itself.
- hostPath:
path: /
type: Directory
name: host-dir
# The controller service stores client configuration files in this directory. This is the same directory the
# node service (csi-beegfs-node.yaml) creates its socket inside.
- hostPath:
path: /var/lib/kubelet/plugins/beegfs.csi.netapp.com
type: DirectoryOrCreate
name: plugin-dir
- emptyDir: { }
name: socket-dir
- configMap:
name: csi-beegfs-config # kustomized
name: config-dir
- secret:
secretName: csi-beegfs-connauth # kustomized
name: connauth-dir