2018-12-10 11:25:34 -08:00
|
|
|
kind: DaemonSet
|
2019-06-19 14:35:44 +05:30
|
|
|
apiVersion: apps/v1
|
2018-12-10 11:25:34 -08:00
|
|
|
metadata:
|
|
|
|
name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }}
|
2019-07-29 12:36:24 +02:00
|
|
|
namespace: {{ .Release.Namespace }}
|
2018-12-10 11:25:34 -08:00
|
|
|
labels:
|
|
|
|
app: {{ include "ceph-csi-rbd.name" . }}
|
|
|
|
chart: {{ include "ceph-csi-rbd.chart" . }}
|
|
|
|
component: {{ .Values.nodeplugin.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
2022-10-14 16:59:09 +02:00
|
|
|
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
|
2018-12-10 11:25:34 -08:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: {{ include "ceph-csi-rbd.name" . }}
|
|
|
|
component: {{ .Values.nodeplugin.name }}
|
|
|
|
release: {{ .Release.Name }}
|
2019-07-03 15:32:36 +05:30
|
|
|
updateStrategy:
|
2020-01-02 14:18:30 +05:30
|
|
|
type: {{ .Values.nodeplugin.updateStrategy }}
|
2018-12-10 11:25:34 -08: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 }}
|
2022-10-14 16:59:09 +02:00
|
|
|
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 8 }}{{- end }}
|
2018-12-10 11:25:34 -08:00
|
|
|
spec:
|
|
|
|
serviceAccountName: {{ include "ceph-csi-rbd.serviceAccountName.nodeplugin" . }}
|
|
|
|
hostNetwork: true
|
2019-04-22 17:35:39 -04:00
|
|
|
hostPID: true
|
2020-05-05 13:57:38 +05:30
|
|
|
{{- if .Values.nodeplugin.priorityClassName }}
|
|
|
|
priorityClassName: {{ .Values.nodeplugin.priorityClassName }}
|
|
|
|
{{- end }}
|
2018-12-10 11:25:34 -08:00
|
|
|
# to use e.g. Rook orchestrated cluster, and mons' FQDN is
|
|
|
|
# resolved through k8s service, set dns policy to cluster first
|
|
|
|
dnsPolicy: ClusterFirstWithHostNet
|
2023-06-15 16:32:06 +08:00
|
|
|
{{- if .Values.nodeplugin.imagePullSecrets }}
|
|
|
|
imagePullSecrets:
|
|
|
|
{{ toYaml .Values.nodeplugin.imagePullSecrets | indent 8 -}}
|
|
|
|
{{- end }}
|
2018-12-10 11:25:34 -08:00
|
|
|
containers:
|
|
|
|
- name: driver-registrar
|
2020-01-13 09:44:18 +05:30
|
|
|
# This is necessary only for systems with SELinux, where
|
|
|
|
# non-privileged sidecar containers cannot access unix domain socket
|
|
|
|
# created by privileged CSI driver container.
|
|
|
|
securityContext:
|
|
|
|
privileged: true
|
2022-04-06 07:16:28 +02:00
|
|
|
allowPrivilegeEscalation: true
|
2018-12-10 11:25:34 -08:00
|
|
|
image: "{{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}"
|
2019-09-26 11:55:12 +02:00
|
|
|
imagePullPolicy: {{ .Values.nodeplugin.registrar.image.pullPolicy }}
|
2018-12-10 11:25:34 -08:00
|
|
|
args:
|
2020-10-20 12:19:10 +05:30
|
|
|
- "--v={{ .Values.logLevel }}"
|
2019-09-26 11:55:12 +02:00
|
|
|
- "--csi-address=/csi/{{ .Values.pluginSocketFile }}"
|
2021-02-02 13:05:30 +01:00
|
|
|
- "--kubelet-registration-path={{ .Values.kubeletDir }}/plugins/{{ .Values.driverName }}/{{ .Values.pluginSocketFile }}"
|
2018-12-10 11:25:34 -08:00
|
|
|
env:
|
|
|
|
- name: KUBE_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
volumeMounts:
|
2019-07-03 15:32:36 +05:30
|
|
|
- name: socket-dir
|
2019-02-05 13:29:16 -08:00
|
|
|
mountPath: /csi
|
2018-12-10 11:25:34 -08:00
|
|
|
- name: registration-dir
|
|
|
|
mountPath: /registration
|
|
|
|
resources:
|
|
|
|
{{ toYaml .Values.nodeplugin.registrar.resources | indent 12 }}
|
|
|
|
- name: csi-rbdplugin
|
|
|
|
image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}"
|
2019-09-26 11:55:12 +02:00
|
|
|
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
|
|
|
|
args:
|
2018-12-10 11:25:34 -08:00
|
|
|
- "--nodeid=$(NODE_ID)"
|
2021-05-31 16:41:01 +05:30
|
|
|
- "--pluginpath={{ .Values.kubeletDir }}/plugins"
|
2022-06-23 11:31:44 +05:30
|
|
|
- "--stagingpath={{ .Values.kubeletDir }}/plugins/kubernetes.io/csi/"
|
2019-05-24 16:33:33 +05:30
|
|
|
- "--type=rbd"
|
2019-08-14 12:12:17 +05:30
|
|
|
- "--nodeserver=true"
|
2019-09-26 11:55:12 +02:00
|
|
|
- "--pidlimit=-1"
|
2018-12-10 11:25:34 -08:00
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
2021-12-22 08:09:27 +01:00
|
|
|
- "--csi-addons-endpoint=$(CSI_ADDONS_ENDPOINT)"
|
2020-10-20 12:19:10 +05:30
|
|
|
- "--v={{ .Values.logLevel }}"
|
2019-03-13 10:39:58 +05:30
|
|
|
- "--drivername=$(DRIVER_NAME)"
|
2020-03-18 13:38:40 -04:00
|
|
|
{{- if .Values.topology.enabled }}
|
|
|
|
- "--domainlabels={{ .Values.topology.domainLabels | join "," }}"
|
2021-03-25 16:44:46 +05:30
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.nodeplugin.profiling.enabled }}
|
|
|
|
- "--enableprofiling={{ .Values.nodeplugin.profiling.enabled }}"
|
2020-03-18 13:38:40 -04:00
|
|
|
{{- end }}
|
2018-12-10 11:25:34 -08:00
|
|
|
env:
|
2019-08-21 14:58:02 +05:30
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2019-03-13 10:39:58 +05:30
|
|
|
- name: DRIVER_NAME
|
|
|
|
value: {{ .Values.driverName }}
|
2018-12-10 11:25:34 -08:00
|
|
|
- name: NODE_ID
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
- name: CSI_ENDPOINT
|
2019-09-26 11:55:12 +02:00
|
|
|
value: "unix:///csi/{{ .Values.pluginSocketFile }}"
|
2021-12-22 08:09:27 +01:00
|
|
|
- name: CSI_ADDONS_ENDPOINT
|
|
|
|
value: "unix:///csi/csi-addons.sock"
|
2019-09-26 11:55:12 +02:00
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
capabilities:
|
|
|
|
add: ["SYS_ADMIN"]
|
|
|
|
allowPrivilegeEscalation: true
|
2018-12-10 11:25:34 -08:00
|
|
|
volumeMounts:
|
2019-07-03 15:32:36 +05:30
|
|
|
- name: socket-dir
|
2019-09-26 11:55:12 +02:00
|
|
|
mountPath: /csi
|
2018-12-10 11:25:34 -08:00
|
|
|
- mountPath: /dev
|
|
|
|
name: host-dev
|
2020-01-29 15:47:41 +01:00
|
|
|
- mountPath: /run/mount
|
|
|
|
name: host-mount
|
2018-12-10 11:25:34 -08:00
|
|
|
- mountPath: /sys
|
|
|
|
name: host-sys
|
2022-02-16 00:13:39 +01:00
|
|
|
{{- if .Values.selinuxMount }}
|
2021-08-02 16:57:11 +02:00
|
|
|
- mountPath: /etc/selinux
|
|
|
|
name: etc-selinux
|
|
|
|
readOnly: true
|
2022-02-16 00:13:39 +01:00
|
|
|
{{- end }}
|
2018-12-10 11:25:34 -08:00
|
|
|
- mountPath: /lib/modules
|
|
|
|
name: lib-modules
|
|
|
|
readOnly: true
|
2019-04-22 17:35:39 -04:00
|
|
|
- name: ceph-csi-config
|
|
|
|
mountPath: /etc/ceph-csi-config/
|
2021-09-01 20:26:15 +05:30
|
|
|
- name: ceph-config
|
|
|
|
mountPath: /etc/ceph/
|
2020-01-29 11:44:45 +00:00
|
|
|
- name: ceph-csi-encryption-kms-config
|
|
|
|
mountPath: /etc/ceph-csi-encryption-kms-config/
|
2019-09-26 11:55:12 +02:00
|
|
|
- name: plugin-dir
|
2020-11-27 19:53:35 +05:30
|
|
|
mountPath: {{ .Values.kubeletDir }}/plugins
|
2019-09-26 11:55:12 +02:00
|
|
|
mountPropagation: "Bidirectional"
|
|
|
|
- name: mountpoint-dir
|
2020-11-27 19:53:35 +05:30
|
|
|
mountPath: {{ .Values.kubeletDir }}/pods
|
2019-09-26 11:55:12 +02:00
|
|
|
mountPropagation: "Bidirectional"
|
2019-06-25 15:29:17 -04:00
|
|
|
- name: keys-tmp-dir
|
|
|
|
mountPath: /tmp/csi/keys
|
2021-08-12 18:37:54 +05:30
|
|
|
- name: ceph-logdir
|
|
|
|
mountPath: /var/log/ceph
|
2022-03-02 16:00:48 +05:30
|
|
|
- name: oidc-token
|
2022-03-23 11:01:25 +05:30
|
|
|
mountPath: /run/secrets/tokens
|
2022-03-02 16:00:48 +05:30
|
|
|
readOnly: true
|
2018-12-10 11:25:34 -08:00
|
|
|
resources:
|
2019-06-20 15:30:40 -04:00
|
|
|
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
|
2019-09-26 11:55:12 +02:00
|
|
|
{{- if .Values.nodeplugin.httpMetrics.enabled }}
|
2019-06-20 15:30:40 -04:00
|
|
|
- name: liveness-prometheus
|
2020-01-13 09:44:18 +05:30
|
|
|
securityContext:
|
|
|
|
privileged: true
|
2022-04-06 07:16:28 +02:00
|
|
|
allowPrivilegeEscalation: true
|
2019-06-20 15:30:40 -04:00
|
|
|
image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}"
|
2019-09-26 11:55:12 +02:00
|
|
|
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
|
2019-06-20 15:30:40 -04:00
|
|
|
args:
|
|
|
|
- "--type=liveness"
|
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
2019-09-26 11:55:12 +02:00
|
|
|
- "--metricsport={{ .Values.nodeplugin.httpMetrics.containerPort }}"
|
2019-08-21 14:58:02 +05:30
|
|
|
- "--metricspath=/metrics"
|
2019-06-20 15:30:40 -04:00
|
|
|
- "--polltime=60s"
|
|
|
|
- "--timeout=3s"
|
|
|
|
env:
|
|
|
|
- name: CSI_ENDPOINT
|
2019-09-26 11:55:12 +02:00
|
|
|
value: "unix:///csi/{{ .Values.pluginSocketFile }}"
|
2019-06-20 15:30:40 -04:00
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2022-02-04 13:18:59 +02:00
|
|
|
ports:
|
|
|
|
- containerPort: {{ .Values.nodeplugin.httpMetrics.containerPort }}
|
|
|
|
name: metrics
|
|
|
|
protocol: TCP
|
2019-06-20 15:30:40 -04:00
|
|
|
volumeMounts:
|
2019-09-26 11:55:12 +02:00
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
2019-06-20 15:30:40 -04:00
|
|
|
resources:
|
2018-12-10 11:25:34 -08:00
|
|
|
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
|
2019-09-26 11:55:12 +02:00
|
|
|
{{- end }}
|
2018-12-10 11:25:34 -08:00
|
|
|
volumes:
|
2019-07-03 15:32:36 +05:30
|
|
|
- name: socket-dir
|
2018-12-10 11:25:34 -08:00
|
|
|
hostPath:
|
2021-02-02 13:05:30 +01:00
|
|
|
path: "{{ .Values.kubeletDir }}/plugins/{{ .Values.driverName }}"
|
2018-12-10 11:25:34 -08:00
|
|
|
type: DirectoryOrCreate
|
|
|
|
- name: registration-dir
|
|
|
|
hostPath:
|
2020-11-27 19:53:35 +05:30
|
|
|
path: {{ .Values.kubeletDir }}/plugins_registry
|
2018-12-10 11:25:34 -08:00
|
|
|
type: Directory
|
2019-07-03 15:32:36 +05:30
|
|
|
- name: plugin-dir
|
2018-12-10 11:25:34 -08:00
|
|
|
hostPath:
|
2020-11-27 19:53:35 +05:30
|
|
|
path: {{ .Values.kubeletDir }}/plugins
|
2018-12-10 11:25:34 -08:00
|
|
|
type: Directory
|
2019-07-03 15:32:36 +05:30
|
|
|
- name: mountpoint-dir
|
|
|
|
hostPath:
|
2020-11-27 19:53:35 +05:30
|
|
|
path: {{ .Values.kubeletDir }}/pods
|
2019-07-03 15:32:36 +05:30
|
|
|
type: DirectoryOrCreate
|
2021-08-12 18:37:54 +05:30
|
|
|
- name: ceph-logdir
|
|
|
|
hostPath:
|
2021-09-01 17:54:42 +05:30
|
|
|
path: {{ .Values.cephLogDirHostPath }}
|
2021-08-12 18:37:54 +05:30
|
|
|
type: DirectoryOrCreate
|
2018-12-10 11:25:34 -08:00
|
|
|
- name: host-dev
|
|
|
|
hostPath:
|
|
|
|
path: /dev
|
2020-01-23 13:59:53 +05:30
|
|
|
- name: host-mount
|
|
|
|
hostPath:
|
|
|
|
path: /run/mount
|
2018-12-10 11:25:34 -08:00
|
|
|
- name: host-sys
|
|
|
|
hostPath:
|
|
|
|
path: /sys
|
2022-02-16 00:13:39 +01:00
|
|
|
{{- if .Values.selinuxMount }}
|
2021-08-02 16:57:11 +02:00
|
|
|
- name: etc-selinux
|
|
|
|
hostPath:
|
|
|
|
path: /etc/selinux
|
2022-02-16 00:13:39 +01:00
|
|
|
{{- end }}
|
2018-12-10 11:25:34 -08:00
|
|
|
- name: lib-modules
|
|
|
|
hostPath:
|
|
|
|
path: /lib/modules
|
2021-09-01 20:26:15 +05:30
|
|
|
- name: ceph-config
|
|
|
|
configMap:
|
2022-02-12 10:01:10 -07:00
|
|
|
name: {{ .Values.cephConfConfigMapName | quote }}
|
2019-04-22 17:35:39 -04:00
|
|
|
- name: ceph-csi-config
|
|
|
|
configMap:
|
|
|
|
name: {{ .Values.configMapName | quote }}
|
2020-04-10 08:55:21 -07:00
|
|
|
{{- if .Values.configMapKey }}
|
|
|
|
items:
|
|
|
|
- key: {{ .Values.configMapKey | quote }}
|
|
|
|
path: config.json
|
|
|
|
{{- end }}
|
2020-01-29 11:44:45 +00:00
|
|
|
- name: ceph-csi-encryption-kms-config
|
|
|
|
configMap:
|
|
|
|
name: {{ .Values.kmsConfigMapName | quote }}
|
2019-06-25 15:29:17 -04:00
|
|
|
- name: keys-tmp-dir
|
|
|
|
emptyDir: {
|
|
|
|
medium: "Memory"
|
|
|
|
}
|
2022-03-02 16:00:48 +05:30
|
|
|
- name: oidc-token
|
|
|
|
projected:
|
|
|
|
sources:
|
|
|
|
- serviceAccountToken:
|
|
|
|
path: oidc-token
|
|
|
|
expirationSeconds: 3600
|
|
|
|
audience: ceph-csi-kms
|
2019-07-29 12:36:24 +02:00
|
|
|
{{- if .Values.nodeplugin.affinity }}
|
2018-12-10 11:25:34 -08:00
|
|
|
affinity:
|
2019-12-03 09:18:59 +01:00
|
|
|
{{ toYaml .Values.nodeplugin.affinity | indent 8 -}}
|
2019-07-29 12:36:24 +02:00
|
|
|
{{- end -}}
|
|
|
|
{{- if .Values.nodeplugin.nodeSelector }}
|
2018-12-10 11:25:34 -08:00
|
|
|
nodeSelector:
|
2019-07-29 12:36:24 +02:00
|
|
|
{{ toYaml .Values.nodeplugin.nodeSelector | indent 8 -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if .Values.nodeplugin.tolerations }}
|
2018-12-10 11:25:34 -08:00
|
|
|
tolerations:
|
2019-07-29 12:36:24 +02:00
|
|
|
{{ toYaml .Values.nodeplugin.tolerations | indent 8 -}}
|
|
|
|
{{- end -}}
|