2019-02-21 04:30:21 +00:00
|
|
|
kind: DaemonSet
|
2019-06-19 09:05:44 +00:00
|
|
|
apiVersion: apps/v1
|
2019-02-21 04:30:21 +00:00
|
|
|
metadata:
|
|
|
|
name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }}
|
|
|
|
labels:
|
|
|
|
app: {{ include "ceph-csi-cephfs.name" . }}
|
|
|
|
chart: {{ include "ceph-csi-cephfs.chart" . }}
|
|
|
|
component: {{ .Values.nodeplugin.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: {{ include "ceph-csi-cephfs.name" . }}
|
|
|
|
component: {{ .Values.nodeplugin.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: {{ include "ceph-csi-cephfs.name" . }}
|
|
|
|
chart: {{ include "ceph-csi-cephfs.chart" . }}
|
|
|
|
component: {{ .Values.nodeplugin.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
spec:
|
|
|
|
serviceAccountName: {{ include "ceph-csi-cephfs.serviceAccountName.nodeplugin" . }}
|
|
|
|
hostNetwork: true
|
2019-05-24 11:03:33 +00:00
|
|
|
hostPID: true
|
2019-02-21 04:30:21 +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"
|
|
|
|
- "--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",
|
|
|
|
'rm -rf /registration/{{ .Values.driverName }}
|
|
|
|
/registration/{{ .Values.driverName }}-reg.sock'
|
|
|
|
]
|
2019-02-21 04:30:21 +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 }}
|
2019-02-21 04:30:21 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: plugin-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: registration-dir
|
|
|
|
mountPath: /registration
|
|
|
|
resources:
|
|
|
|
{{ toYaml .Values.nodeplugin.registrar.resources | indent 12 }}
|
|
|
|
- name: csi-cephfsplugin
|
|
|
|
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=cephfs"
|
2019-02-21 04:30:21 +00:00
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
|
|
- "--v=5"
|
2019-03-13 05:09:58 +00:00
|
|
|
- "--drivername=$(DRIVER_NAME)"
|
2019-02-21 04:30:21 +00:00
|
|
|
- "--metadatastorage=k8s_configmap"
|
2019-03-29 08:12:09 +00:00
|
|
|
- "--mountcachedir=/mount-cache-dir"
|
2019-02-21 04:30:21 +00:00
|
|
|
env:
|
|
|
|
- name: HOST_ROOTFS
|
|
|
|
value: "/rootfs"
|
2019-03-13 05:09:58 +00:00
|
|
|
- name: DRIVER_NAME
|
|
|
|
value: {{ .Values.driverName }}
|
2019-02-21 04:30:21 +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 }}
|
2019-02-21 04:30:21 +00:00
|
|
|
volumeMounts:
|
2019-03-29 08:12:09 +00:00
|
|
|
- name: mount-cache-dir
|
|
|
|
mountPath: /mount-cache-dir
|
2019-02-21 04:30:21 +00:00
|
|
|
- name: plugin-dir
|
|
|
|
mountPath: {{ .Values.socketDir }}
|
|
|
|
- name: pods-mount-dir
|
|
|
|
mountPath: /var/lib/kubelet/pods
|
|
|
|
mountPropagation: "Bidirectional"
|
|
|
|
- name: plugin-mount-dir
|
|
|
|
mountPath: {{ .Values.volumeDevicesDir }}
|
|
|
|
mountPropagation: "Bidirectional"
|
|
|
|
- mountPath: /dev
|
|
|
|
name: host-dev
|
|
|
|
- mountPath: /rootfs
|
2019-05-24 11:03:33 +00:00
|
|
|
name: host-rootfs
|
2019-02-21 04:30:21 +00:00
|
|
|
- mountPath: /sys
|
|
|
|
name: host-sys
|
|
|
|
- mountPath: /lib/modules
|
|
|
|
name: lib-modules
|
|
|
|
readOnly: true
|
2019-05-28 19:03:18 +00:00
|
|
|
- name: ceph-csi-config
|
|
|
|
mountPath: /etc/ceph-csi-config/
|
2019-02-21 04:30:21 +00:00
|
|
|
resources:
|
|
|
|
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
|
|
|
|
volumes:
|
2019-03-29 08:12:09 +00:00
|
|
|
- name: mount-cache-dir
|
|
|
|
emptyDir: {}
|
2019-02-21 04:30:21 +00:00
|
|
|
- name: plugin-dir
|
|
|
|
hostPath:
|
|
|
|
path: {{ .Values.socketDir }}
|
|
|
|
type: DirectoryOrCreate
|
|
|
|
- name: plugin-mount-dir
|
|
|
|
hostPath:
|
|
|
|
path: {{ .Values.volumeDevicesDir }}
|
|
|
|
type: DirectoryOrCreate
|
|
|
|
- name: registration-dir
|
|
|
|
hostPath:
|
|
|
|
path: {{ .Values.registrationDir }}
|
|
|
|
type: Directory
|
|
|
|
- name: pods-mount-dir
|
|
|
|
hostPath:
|
|
|
|
path: /var/lib/kubelet/pods
|
|
|
|
type: Directory
|
|
|
|
- name: host-dev
|
|
|
|
hostPath:
|
|
|
|
path: /dev
|
|
|
|
- name: host-rootfs
|
|
|
|
hostPath:
|
2019-05-24 11:03:33 +00:00
|
|
|
path: /
|
2019-02-21 04:30:21 +00:00
|
|
|
- name: host-sys
|
|
|
|
hostPath:
|
|
|
|
path: /sys
|
|
|
|
- name: lib-modules
|
|
|
|
hostPath:
|
|
|
|
path: /lib/modules
|
2019-05-28 19:03:18 +00:00
|
|
|
- name: ceph-csi-config
|
|
|
|
configMap:
|
|
|
|
name: {{ .Values.configMapName | quote }}
|
2019-02-21 04:30:21 +00:00
|
|
|
{{- if .Values.nodeplugin.affinity -}}
|
|
|
|
affinity:
|
|
|
|
{{ toYaml .Values.nodeplugin.affinity . | indent 8 }}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if .Values.nodeplugin.nodeSelector -}}
|
|
|
|
nodeSelector:
|
|
|
|
{{ toYaml .Values.nodeplugin.nodeSelector | indent 8 }}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if .Values.nodeplugin.tolerations -}}
|
|
|
|
tolerations:
|
|
|
|
{{ toYaml .Values.nodeplugin.tolerations | indent 8 }}
|
|
|
|
{{- end -}}
|