2020-04-28 18:22:56 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: {{ include "rawfile-csi.fullname" . }}-node
|
|
|
|
labels:
|
|
|
|
{{- include "rawfile-csi.labels" . | nindent 4 }}
|
|
|
|
component: node
|
|
|
|
spec:
|
|
|
|
type: ClusterIP
|
|
|
|
ports:
|
|
|
|
- name: metrics
|
|
|
|
port: 9100
|
|
|
|
targetPort: metrics
|
|
|
|
protocol: TCP
|
|
|
|
selector:
|
|
|
|
{{- include "rawfile-csi.selectorLabels" . | nindent 4 }}
|
|
|
|
component: node
|
|
|
|
---
|
2020-04-23 13:52:01 +00:00
|
|
|
apiVersion: apps/v1
|
2020-04-28 13:22:20 +00:00
|
|
|
kind: DaemonSet
|
2020-04-23 13:52:01 +00:00
|
|
|
metadata:
|
2020-04-28 13:22:20 +00:00
|
|
|
name: {{ include "rawfile-csi.fullname" . }}-node
|
2020-04-23 13:52:01 +00:00
|
|
|
spec:
|
|
|
|
updateStrategy:
|
|
|
|
rollingUpdate:
|
|
|
|
maxUnavailable: "100%"
|
|
|
|
selector:
|
2020-04-28 13:22:20 +00:00
|
|
|
matchLabels: &selectorLabels
|
|
|
|
{{- include "rawfile-csi.selectorLabels" . | nindent 6 }}
|
|
|
|
component: node
|
2020-04-23 13:52:01 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
2020-04-28 13:22:20 +00:00
|
|
|
labels: *selectorLabels
|
2020-04-23 13:52:01 +00:00
|
|
|
spec:
|
2020-04-28 13:22:20 +00:00
|
|
|
serviceAccount: {{ include "rawfile-csi.fullname" . }}-driver
|
2020-04-23 13:52:01 +00:00
|
|
|
priorityClassName: system-node-critical
|
|
|
|
tolerations:
|
|
|
|
- operator: "Exists"
|
|
|
|
volumes:
|
|
|
|
- name: registration-dir
|
|
|
|
hostPath:
|
|
|
|
path: /var/lib/kubelet/plugins_registry
|
|
|
|
type: Directory
|
|
|
|
- name: socket-dir
|
|
|
|
hostPath:
|
|
|
|
path: /var/lib/kubelet/plugins/rawfile-csi
|
|
|
|
type: DirectoryOrCreate
|
|
|
|
- name: mountpoint-dir
|
|
|
|
hostPath:
|
2020-05-29 15:53:26 +00:00
|
|
|
path: /var/lib/kubelet
|
2020-04-23 13:52:01 +00:00
|
|
|
type: DirectoryOrCreate
|
|
|
|
- name: data-dir
|
|
|
|
hostPath:
|
|
|
|
path: /var/csi/rawfile
|
|
|
|
type: DirectoryOrCreate
|
|
|
|
containers:
|
|
|
|
- name: csi-driver
|
2020-04-28 13:22:20 +00:00
|
|
|
image: "{{ .Values.node.image.repository }}:{{ .Values.node.image.tag }}"
|
|
|
|
imagePullPolicy: {{ .Values.node.image.pullPolicy }}
|
|
|
|
securityContext:
|
|
|
|
privileged: true
|
2020-04-23 13:52:01 +00:00
|
|
|
env:
|
|
|
|
- name: CSI_ENDPOINT
|
|
|
|
value: unix:///csi/csi.sock
|
2020-05-29 14:50:03 +00:00
|
|
|
- name: IMAGE_REPOSITORY
|
|
|
|
value: "{{ .Values.node.image.repository }}"
|
2020-04-23 13:52:01 +00:00
|
|
|
- name: NODE_ID
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
apiVersion: v1
|
|
|
|
fieldPath: spec.nodeName
|
2020-04-28 18:22:56 +00:00
|
|
|
ports:
|
|
|
|
- name: metrics
|
|
|
|
containerPort: 9100
|
2020-04-23 13:52:01 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: mountpoint-dir
|
2020-05-29 15:53:26 +00:00
|
|
|
mountPath: /var/lib/kubelet
|
2020-04-23 13:52:01 +00:00
|
|
|
mountPropagation: "Bidirectional"
|
|
|
|
- name: data-dir
|
|
|
|
mountPath: /data
|
2020-04-28 13:22:20 +00:00
|
|
|
resources:
|
|
|
|
{{- toYaml .Values.node.resources | nindent 12 }}
|
2020-04-23 13:52:01 +00:00
|
|
|
- name: node-driver-registrar
|
|
|
|
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
lifecycle:
|
|
|
|
preStop:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- /bin/sh
|
|
|
|
- -c
|
|
|
|
- |
|
|
|
|
rm -rf /registration/rawfile-csi /csi/csi.sock
|
|
|
|
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/rawfile-csi/csi.sock
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: registration-dir
|
|
|
|
mountPath: /registration
|