129 lines
3.8 KiB
YAML
129 lines
3.8 KiB
YAML
# Copyright 2019 Nutanix Inc
|
|
#
|
|
# example usage: kubectl create -f <this_file>
|
|
|
|
---
|
|
kind: DaemonSet
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
name: csi-node-ntnx-plugin
|
|
namespace: {{ .Release.Namespace }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: csi-node-ntnx-plugin
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: csi-node-ntnx-plugin
|
|
spec:
|
|
serviceAccount: csi-node-ntnx-plugin
|
|
hostNetwork: true
|
|
containers:
|
|
- name: driver-registrar
|
|
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
|
|
args:
|
|
- "--v=5"
|
|
- "--csi-address=$(ADDRESS)"
|
|
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
|
|
env:
|
|
- name: ADDRESS
|
|
value: /csi/csi.sock
|
|
- name: DRIVER_REG_SOCK_PATH
|
|
value: /var/lib/kubelet/plugins/{{ include "nutanix-csi-storage.drivername" . }}/csi.sock
|
|
- name: KUBE_NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
volumeMounts:
|
|
- name: plugin-dir
|
|
mountPath: /csi/
|
|
- name: registration-dir
|
|
mountPath: /registration
|
|
- name: csi-node-ntnx-plugin
|
|
securityContext:
|
|
privileged: true
|
|
allowPrivilegeEscalation: true
|
|
image: quay.io/karbon/ntnx-csi:v2.3.1
|
|
args :
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
- "--nodeid=$(NODE_ID)"
|
|
- "--drivername={{ include "nutanix-csi-storage.drivername" . }}"
|
|
env:
|
|
- name: CSI_ENDPOINT
|
|
value: unix:///csi/csi.sock
|
|
- name: NODE_ID
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
- name: NODE_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.hostIP
|
|
volumeMounts:
|
|
- name: plugin-dir
|
|
mountPath: /csi
|
|
- name: pods-mount-dir
|
|
mountPath: /var/lib/kubelet
|
|
# needed so that any mounts setup inside this container are
|
|
# propagated back to the host machine.
|
|
mountPropagation: "Bidirectional"
|
|
- mountPath: /dev
|
|
name: device-dir
|
|
- mountPath: /etc/iscsi
|
|
name: iscsi-dir
|
|
- mountPath: /host
|
|
name: root-dir
|
|
ports:
|
|
- containerPort: 9808
|
|
name: healthz
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: healthz
|
|
initialDelaySeconds: 10
|
|
timeoutSeconds: 3
|
|
periodSeconds: 2
|
|
failureThreshold: 3
|
|
- name: liveness-probe
|
|
imagePullPolicy: Always
|
|
volumeMounts:
|
|
- mountPath: /csi
|
|
name: plugin-dir
|
|
image: quay.io/k8scsi/livenessprobe:v1.1.0
|
|
args:
|
|
- --csi-address=/csi/csi.sock
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: registration-dir
|
|
hostPath:
|
|
path: /var/lib/kubelet/plugins_registry/
|
|
type: Directory
|
|
- name: plugin-dir
|
|
hostPath:
|
|
path: /var/lib/kubelet/plugins/{{ include "nutanix-csi-storage.drivername" . }}/
|
|
type: DirectoryOrCreate
|
|
- name: pods-mount-dir
|
|
hostPath:
|
|
path: /var/lib/kubelet
|
|
type: Directory
|
|
- name: device-dir
|
|
hostPath:
|
|
path: /dev
|
|
- name: iscsi-dir
|
|
hostPath:
|
|
path: /etc/iscsi
|
|
type: Directory
|
|
- name: root-dir
|
|
hostPath:
|
|
path: /
|
|
type: Directory
|