streams-manifests/cinder/cinder-csi-nodeplugin.yaml

120 lines
3.8 KiB
YAML
Raw Normal View History

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:05:25 +00:00
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.9.2
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
value: /var/snap/microk8s/common/var/lib/kubelet/plugins/cinder.csi.openstack.org/csi.sock
- 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:05:25 +00:00
image: registry.k8s.io/sig-storage/livenessprobe:v2.11.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:05:25 +00:00
image: registry.k8s.io/provider-os/cinder-csi-plugin:v1.31.0
2024-10-16 07:17:47 +00:00
args:
- /bin/cinder-csi-plugin
- "--endpoint=$(CSI_ENDPOINT)"
2024-10-16 11:05:25 +00:00
- "--provide-controller-service=false"
2024-10-16 07:17:47 +00:00
- "--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
mountPath: /var/snap/microk8s/common/var/lib/kubelet
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:
path: /var/snap/microk8s/common/var/lib/kubelet/plugins/cinder.csi.openstack.org
type: DirectoryOrCreate
- name: registration-dir
hostPath:
path: /var/snap/microk8s/common/var/lib/kubelet/plugins_registry/
type: Directory
- name: kubelet-dir
hostPath:
path: /var/snap/microk8s/common/var/lib/kubelet
type: Directory
- name: pods-probe-dir
hostPath:
path: /dev
type: Directory
- name: secret-cinderplugin
secret:
secretName: cloud-config
# - name: cacert
# hostPath:
# path: /etc/cacert