2024-10-16 07:17:47 +00:00
|
|
|
# This YAML file contains driver-registrar & csi driver nodeplugin API objects,
|
|
|
|
# which are necessary to run csi nodeplugin for cinder.
|
|
|
|
|
|
|
|
kind: DaemonSet
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: csi-cinder-nodeplugin
|
|
|
|
namespace: kube-system
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: csi-cinder-nodeplugin
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: csi-cinder-nodeplugin
|
|
|
|
spec:
|
|
|
|
tolerations:
|
|
|
|
- operator: Exists
|
|
|
|
serviceAccount: csi-cinder-node-sa
|
|
|
|
hostNetwork: true
|
|
|
|
containers:
|
|
|
|
- name: node-driver-registrar
|
2024-10-16 11:06:54 +00:00
|
|
|
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.3
|
2024-10-16 07:17:47 +00:00
|
|
|
args:
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
|
|
|
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
|
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: /csi/csi.sock
|
|
|
|
- name: DRIVER_REG_SOCK_PATH
|
2024-10-16 11:20:43 +00:00
|
|
|
value: /var/snap/microk8s/common/var/lib/kubelet/plugins/cinder.csi.openstack.org/csi.sock
|
2024-10-16 07:17:47 +00:00
|
|
|
- name: KUBE_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: registration-dir
|
|
|
|
mountPath: /registration
|
|
|
|
- name: liveness-probe
|
2024-10-16 11:06:54 +00:00
|
|
|
image: registry.k8s.io/sig-storage/livenessprobe:v2.9.0
|
2024-10-16 07:17:47 +00:00
|
|
|
args:
|
|
|
|
- --csi-address=/csi/csi.sock
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: cinder-csi-plugin
|
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
capabilities:
|
|
|
|
add: ["SYS_ADMIN"]
|
|
|
|
allowPrivilegeEscalation: true
|
2024-10-16 11:06:54 +00:00
|
|
|
image: registry.k8s.io/provider-os/cinder-csi-plugin:v1.28.3
|
2024-10-16 07:17:47 +00:00
|
|
|
args:
|
|
|
|
- /bin/cinder-csi-plugin
|
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
|
|
- "--cloud-config=$(CLOUD_CONFIG)"
|
|
|
|
- "--v=1"
|
|
|
|
env:
|
|
|
|
- name: CSI_ENDPOINT
|
|
|
|
value: unix://csi/csi.sock
|
|
|
|
- name: CLOUD_CONFIG
|
|
|
|
value: /etc/config/cloud.conf
|
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
ports:
|
|
|
|
- containerPort: 9808
|
|
|
|
name: healthz
|
|
|
|
protocol: TCP
|
|
|
|
# The probe
|
|
|
|
livenessProbe:
|
|
|
|
failureThreshold: 5
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: healthz
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
timeoutSeconds: 3
|
|
|
|
periodSeconds: 10
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: kubelet-dir
|
2024-10-16 11:20:43 +00:00
|
|
|
mountPath: /var/snap/microk8s/common/var/lib/kubelet
|
2024-10-16 07:17:47 +00:00
|
|
|
mountPropagation: "Bidirectional"
|
|
|
|
- name: pods-probe-dir
|
|
|
|
mountPath: /dev
|
|
|
|
mountPropagation: "HostToContainer"
|
|
|
|
- name: secret-cinderplugin
|
|
|
|
mountPath: /etc/config
|
|
|
|
readOnly: true
|
|
|
|
# - name: cacert
|
|
|
|
# mountPath: /etc/cacert
|
|
|
|
# readOnly: true
|
|
|
|
volumes:
|
|
|
|
- name: socket-dir
|
|
|
|
hostPath:
|
2024-10-16 11:20:43 +00:00
|
|
|
path: /var/snap/microk8s/common/var/lib/kubelet/plugins/cinder.csi.openstack.org
|
2024-10-16 07:17:47 +00:00
|
|
|
type: DirectoryOrCreate
|
|
|
|
- name: registration-dir
|
|
|
|
hostPath:
|
2024-10-16 11:20:43 +00:00
|
|
|
path: /var/snap/microk8s/common/var/lib/kubelet/plugins_registry/
|
2024-10-16 07:17:47 +00:00
|
|
|
type: Directory
|
|
|
|
- name: kubelet-dir
|
|
|
|
hostPath:
|
2024-10-16 11:20:43 +00:00
|
|
|
path: /var/snap/microk8s/common/var/lib/kubelet
|
2024-10-16 07:17:47 +00:00
|
|
|
type: Directory
|
|
|
|
- name: pods-probe-dir
|
|
|
|
hostPath:
|
|
|
|
path: /dev
|
|
|
|
type: Directory
|
|
|
|
- name: secret-cinderplugin
|
|
|
|
secret:
|
|
|
|
secretName: cloud-config
|
|
|
|
# - name: cacert
|
|
|
|
# hostPath:
|
|
|
|
# path: /etc/cacert
|