2018-12-10 19:25:34 +00:00
|
|
|
kind: DaemonSet
|
2019-06-19 09:05:44 +00:00
|
|
|
apiVersion: apps/v1
|
2018-12-10 19:25:34 +00:00
|
|
|
metadata:
|
|
|
|
name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }}
|
2019-07-29 10:36:24 +00:00
|
|
|
namespace: {{ .Release.Namespace }}
|
2018-12-10 19:25:34 +00:00
|
|
|
labels:
|
|
|
|
app: {{ include "ceph-csi-rbd.name" . }}
|
|
|
|
chart: {{ include "ceph-csi-rbd.chart" . }}
|
|
|
|
component: {{ .Values.nodeplugin.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: {{ include "ceph-csi-rbd.name" . }}
|
|
|
|
component: {{ .Values.nodeplugin.name }}
|
|
|
|
release: {{ .Release.Name }}
|
2019-07-03 10:02:36 +00:00
|
|
|
updateStrategy:
|
|
|
|
type: OnDelete
|
2018-12-10 19:25:34 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: {{ include "ceph-csi-rbd.name" . }}
|
|
|
|
chart: {{ include "ceph-csi-rbd.chart" . }}
|
|
|
|
component: {{ .Values.nodeplugin.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
spec:
|
|
|
|
serviceAccountName: {{ include "ceph-csi-rbd.serviceAccountName.nodeplugin" . }}
|
|
|
|
hostNetwork: true
|
2019-04-22 21:35:39 +00:00
|
|
|
hostPID: true
|
2018-12-10 19:25:34 +00:00
|
|
|
# to use e.g. Rook orchestrated cluster, and mons' FQDN is
|
|
|
|
# resolved through k8s service, set dns policy to cluster first
|
|
|
|
dnsPolicy: ClusterFirstWithHostNet
|
|
|
|
containers:
|
|
|
|
- name: driver-registrar
|
|
|
|
image: "{{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}"
|
|
|
|
args:
|
|
|
|
- "--v=5"
|
2019-02-05 21:29:16 +00:00
|
|
|
- "--csi-address=/csi/{{ .Values.socketFile }}"
|
|
|
|
- "--kubelet-registration-path={{ .Values.socketDir }}/{{ .Values.socketFile }}"
|
|
|
|
lifecycle:
|
|
|
|
preStop:
|
|
|
|
exec:
|
2019-03-13 05:09:58 +00:00
|
|
|
command: [
|
|
|
|
"/bin/sh", "-c",
|
2019-07-29 10:36:24 +00:00
|
|
|
'rm -rf /registration/{{ .Values.driverName }}
|
2019-03-13 05:09:58 +00:00
|
|
|
/registration/{{ .Values.driverName }}-reg.sock'
|
|
|
|
]
|
2018-12-10 19:25:34 +00:00
|
|
|
env:
|
|
|
|
- name: KUBE_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
2019-04-25 04:03:44 +00:00
|
|
|
imagePullPolicy: {{ .Values.nodeplugin.registrar.image.pullPolicy }}
|
2018-12-10 19:25:34 +00:00
|
|
|
volumeMounts:
|
2019-07-03 10:02:36 +00:00
|
|
|
- name: socket-dir
|
2019-02-05 21:29:16 +00:00
|
|
|
mountPath: /csi
|
2018-12-10 19:25:34 +00:00
|
|
|
- name: registration-dir
|
|
|
|
mountPath: /registration
|
|
|
|
resources:
|
|
|
|
{{ toYaml .Values.nodeplugin.registrar.resources | indent 12 }}
|
|
|
|
- name: csi-rbdplugin
|
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
capabilities:
|
|
|
|
add: ["SYS_ADMIN"]
|
|
|
|
allowPrivilegeEscalation: true
|
|
|
|
image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}"
|
|
|
|
args :
|
|
|
|
- "--nodeid=$(NODE_ID)"
|
2019-05-24 11:03:33 +00:00
|
|
|
- "--type=rbd"
|
2019-08-14 06:42:17 +00:00
|
|
|
- "--nodeserver=true"
|
2018-12-10 19:25:34 +00:00
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
|
|
- "--v=5"
|
2019-03-13 05:09:58 +00:00
|
|
|
- "--drivername=$(DRIVER_NAME)"
|
2019-01-19 01:06:32 +00:00
|
|
|
- "--containerized=true"
|
2019-08-21 09:28:02 +00:00
|
|
|
- "--metricsport=8090"
|
|
|
|
- "--metricspath=/metrics"
|
|
|
|
- "--enablegrpcmetrics=false"
|
2018-12-10 19:25:34 +00:00
|
|
|
env:
|
2019-08-21 09:28:02 +00:00
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2019-03-13 05:09:58 +00:00
|
|
|
- name: DRIVER_NAME
|
|
|
|
value: {{ .Values.driverName }}
|
2018-12-10 19:25:34 +00:00
|
|
|
- name: NODE_ID
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
- name: CSI_ENDPOINT
|
|
|
|
value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}"
|
2019-04-25 04:03:44 +00:00
|
|
|
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
|
2018-12-10 19:25:34 +00:00
|
|
|
volumeMounts:
|
2019-07-03 10:02:36 +00:00
|
|
|
- name: socket-dir
|
2018-12-10 19:25:34 +00:00
|
|
|
mountPath: {{ .Values.socketDir }}
|
2019-07-03 10:02:36 +00:00
|
|
|
- name: plugin-dir
|
|
|
|
mountPath: {{ .Values.pluginDir }}
|
2018-12-10 19:25:34 +00:00
|
|
|
mountPropagation: "Bidirectional"
|
2019-07-29 10:36:24 +00:00
|
|
|
- name: mountpoint-dir
|
2019-07-03 10:02:36 +00:00
|
|
|
mountPath: /var/lib/kubelet/pods
|
2019-01-19 01:06:32 +00:00
|
|
|
mountPropagation: "Bidirectional"
|
2018-12-10 19:25:34 +00:00
|
|
|
- mountPath: /dev
|
|
|
|
name: host-dev
|
|
|
|
- mountPath: /rootfs
|
2019-04-22 21:35:39 +00:00
|
|
|
name: host-rootfs
|
2018-12-10 19:25:34 +00:00
|
|
|
- mountPath: /sys
|
|
|
|
name: host-sys
|
|
|
|
- mountPath: /lib/modules
|
|
|
|
name: lib-modules
|
|
|
|
readOnly: true
|
2019-04-22 21:35:39 +00:00
|
|
|
- name: ceph-csi-config
|
|
|
|
mountPath: /etc/ceph-csi-config/
|
2019-06-25 19:29:17 +00:00
|
|
|
- name: keys-tmp-dir
|
|
|
|
mountPath: /tmp/csi/keys
|
2018-12-10 19:25:34 +00:00
|
|
|
resources:
|
2019-06-20 19:30:40 +00:00
|
|
|
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
|
|
|
|
- name: liveness-prometheus
|
|
|
|
image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}"
|
|
|
|
args:
|
|
|
|
- "--type=liveness"
|
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
2019-08-21 09:28:02 +00:00
|
|
|
- "--metricsport=8080"
|
|
|
|
- "--metricspath=/metrics"
|
2019-06-20 19:30:40 +00:00
|
|
|
- "--polltime=60s"
|
|
|
|
- "--timeout=3s"
|
|
|
|
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
|
|
|
|
env:
|
|
|
|
- name: CSI_ENDPOINT
|
|
|
|
value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}"
|
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
|
|
|
volumeMounts:
|
|
|
|
- name: plugin-dir
|
|
|
|
mountPath: {{ .Values.socketDir }}
|
|
|
|
resources:
|
2018-12-10 19:25:34 +00:00
|
|
|
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
|
|
|
|
volumes:
|
2019-07-03 10:02:36 +00:00
|
|
|
- name: socket-dir
|
2018-12-10 19:25:34 +00:00
|
|
|
hostPath:
|
|
|
|
path: {{ .Values.socketDir }}
|
|
|
|
type: DirectoryOrCreate
|
|
|
|
- name: registration-dir
|
|
|
|
hostPath:
|
2019-01-19 01:06:32 +00:00
|
|
|
path: {{ .Values.registrationDir }}
|
2018-12-10 19:25:34 +00:00
|
|
|
type: Directory
|
2019-07-03 10:02:36 +00:00
|
|
|
- name: plugin-dir
|
2018-12-10 19:25:34 +00:00
|
|
|
hostPath:
|
2019-07-03 10:02:36 +00:00
|
|
|
path: {{ .Values.pluginDir }}
|
2018-12-10 19:25:34 +00:00
|
|
|
type: Directory
|
2019-07-03 10:02:36 +00:00
|
|
|
- name: mountpoint-dir
|
|
|
|
hostPath:
|
|
|
|
path: /var/lib/kubelet/pods
|
|
|
|
type: DirectoryOrCreate
|
2018-12-10 19:25:34 +00:00
|
|
|
- name: host-dev
|
|
|
|
hostPath:
|
|
|
|
path: /dev
|
|
|
|
- name: host-rootfs
|
|
|
|
hostPath:
|
2019-04-22 21:35:39 +00:00
|
|
|
path: /
|
2018-12-10 19:25:34 +00:00
|
|
|
- name: host-sys
|
|
|
|
hostPath:
|
|
|
|
path: /sys
|
|
|
|
- name: lib-modules
|
|
|
|
hostPath:
|
|
|
|
path: /lib/modules
|
2019-04-22 21:35:39 +00:00
|
|
|
- name: ceph-csi-config
|
|
|
|
configMap:
|
|
|
|
name: {{ .Values.configMapName | quote }}
|
2019-06-25 19:29:17 +00:00
|
|
|
- name: keys-tmp-dir
|
|
|
|
emptyDir: {
|
|
|
|
medium: "Memory"
|
|
|
|
}
|
2019-07-29 10:36:24 +00:00
|
|
|
{{- if .Values.nodeplugin.affinity }}
|
2018-12-10 19:25:34 +00:00
|
|
|
affinity:
|
2019-07-29 10:36:24 +00:00
|
|
|
{{ toYaml .Values.nodeplugin.affinity . | indent 8 -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if .Values.nodeplugin.nodeSelector }}
|
2018-12-10 19:25:34 +00:00
|
|
|
nodeSelector:
|
2019-07-29 10:36:24 +00:00
|
|
|
{{ toYaml .Values.nodeplugin.nodeSelector | indent 8 -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if .Values.nodeplugin.tolerations }}
|
2018-12-10 19:25:34 +00:00
|
|
|
tolerations:
|
2019-07-29 10:36:24 +00:00
|
|
|
{{ toYaml .Values.nodeplugin.tolerations | indent 8 -}}
|
|
|
|
{{- end -}}
|