rawfile-localpv/deploy/charts/rawfile-csi/templates/01-node-plugin.yaml

126 lines
3.8 KiB
YAML
Raw Normal View History

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:
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: PROVISIONER_NAME
value: "{{ .Values.provisionerName }}"
2020-04-23 13:52:01 +00:00
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: IMAGE_REPOSITORY
value: "{{ .Values.node.image.repository }}"
{{- if regexMatch "^.*-ci$" .Values.node.image.tag }}
- name: IMAGE_TAG
value: "{{ .Values.node.image.tag }}"
{{- end }}
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-09-11 16:14:29 +00:00
- name: csi-probe
containerPort: 9808
2020-04-23 13:52:01 +00:00
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: mountpoint-dir
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
2020-09-11 16:14:29 +00:00
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.0.1
2020-04-23 13:52:01 +00:00
imagePullPolicy: IfNotPresent
args:
- --csi-address=$(ADDRESS)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
2020-09-11 16:14:29 +00:00
- --health-port=9809
2020-04-23 13:52:01 +00:00
env:
- name: ADDRESS
value: /csi/csi.sock
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/rawfile-csi/csi.sock
2020-09-11 16:14:29 +00:00
ports:
- containerPort: 9809
name: healthz
livenessProbe:
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 5
timeoutSeconds: 5
2020-04-23 13:52:01 +00:00
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration
2021-01-30 14:03:37 +00:00
resources:
limits:
cpu: 500m
memory: 100Mi
requests:
cpu: 10m
memory: 100Mi