2018-12-10 19:25:34 +00:00
|
|
|
kind: StatefulSet
|
|
|
|
apiVersion: apps/v1beta1
|
|
|
|
metadata:
|
|
|
|
name: {{ include "ceph-csi-rbd.provisioner.fullname" . }}
|
|
|
|
labels:
|
|
|
|
app: {{ include "ceph-csi-rbd.name" . }}
|
|
|
|
chart: {{ include "ceph-csi-rbd.chart" . }}
|
|
|
|
component: {{ .Values.provisioner.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
spec:
|
|
|
|
serviceName: {{ include "ceph-csi-rbd.provisioner.fullname" . }}
|
|
|
|
replicas: {{ .Values.provisioner.replicas }}
|
2019-01-19 01:06:32 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: {{ include "ceph-csi-rbd.name" . }}
|
|
|
|
component: {{ .Values.provisioner.name }}
|
|
|
|
release: {{ .Release.Name }}
|
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.provisioner.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
spec:
|
|
|
|
serviceAccountName: {{ include "ceph-csi-rbd.serviceAccountName.provisioner" . }}
|
|
|
|
containers:
|
|
|
|
- name: csi-provisioner
|
|
|
|
image: "{{ .Values.provisioner.image.repository }}:{{ .Values.provisioner.image.tag }}"
|
|
|
|
args:
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
|
|
|
- "--v=5"
|
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}"
|
|
|
|
imagePullPolicy: {{ .Values.provisioner.image.pullPolicy }}
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: {{ .Values.socketDir }}
|
|
|
|
resources:
|
|
|
|
{{ toYaml .Values.provisioner.resources | indent 12 }}
|
2019-02-05 21:29:16 +00:00
|
|
|
- name: csi-snapshotter
|
|
|
|
image: {{ .Values.snapshotter.image.repository }}:{{ .Values.snapshotter.image.tag }}
|
2019-04-25 04:03:44 +00:00
|
|
|
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
|
2019-02-05 21:29:16 +00:00
|
|
|
args:
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
|
|
|
- "--connection-timeout=15s"
|
|
|
|
- "--v=5"
|
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}"
|
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: {{ .Values.socketDir }}
|
|
|
|
resources:
|
|
|
|
{{ toYaml .Values.snapshotter.resources | indent 12 }}
|
2019-04-02 11:21:42 +00:00
|
|
|
{{ if .Values.attacher.enabled }}
|
2019-03-27 06:03:09 +00:00
|
|
|
- name: csi-attacher
|
|
|
|
image: "{{ .Values.attacher.image.repository }}:{{ .Values.attacher.image.tag }}"
|
|
|
|
args:
|
|
|
|
- "--v=5"
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}"
|
|
|
|
imagePullPolicy: {{ .Values.attacher.image.pullPolicy }}
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: {{ .Values.socketDir }}
|
2019-04-02 11:21:42 +00:00
|
|
|
{{ end }}
|
2019-01-19 01:06:32 +00:00
|
|
|
- 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)"
|
|
|
|
- "--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"
|
|
|
|
- "--metadatastorage=k8s_configmap"
|
|
|
|
env:
|
|
|
|
- name: HOST_ROOTFS
|
|
|
|
value: "/rootfs"
|
2019-03-13 05:09:58 +00:00
|
|
|
- name: DRIVER_NAME
|
|
|
|
value: {{ .Values.driverName }}
|
2019-01-19 01:06:32 +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-01-19 01:06:32 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: {{ .Values.socketDir }}
|
|
|
|
- name: host-rootfs
|
|
|
|
mountPath: "/rootfs"
|
|
|
|
resources:
|
|
|
|
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
|
2018-12-10 19:25:34 +00:00
|
|
|
volumes:
|
|
|
|
- name: socket-dir
|
2019-01-19 01:06:32 +00:00
|
|
|
emptyDir: {}
|
|
|
|
#FIXME this seems way too much. Why is it needed at all for this?
|
|
|
|
- name: host-rootfs
|
2018-12-10 19:25:34 +00:00
|
|
|
hostPath:
|
2019-03-27 06:03:09 +00:00
|
|
|
path: /
|
2018-12-10 19:25:34 +00:00
|
|
|
{{- if .Values.provisioner.affinity -}}
|
|
|
|
affinity:
|
|
|
|
{{ toYaml .Values.provisioner.affinity . | indent 8 }}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if .Values.provisioner.nodeSelector -}}
|
|
|
|
nodeSelector:
|
|
|
|
{{ toYaml .Values.provisioner.nodeSelector | indent 8 }}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if .Values.provisioner.tolerations -}}
|
|
|
|
tolerations:
|
|
|
|
{{ toYaml .Values.provisioner.tolerations | indent 8 }}
|
|
|
|
{{- end -}}
|