2019-07-25 12:19:44 +05:30
|
|
|
kind: Deployment
|
2019-06-19 14:35:44 +05:30
|
|
|
apiVersion: apps/v1
|
2019-02-21 10:00:21 +05:30
|
|
|
metadata:
|
|
|
|
name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}
|
2019-07-29 12:36:24 +02:00
|
|
|
namespace: {{ .Release.Namespace }}
|
2019-02-21 10:00:21 +05:30
|
|
|
labels:
|
|
|
|
app: {{ include "ceph-csi-cephfs.name" . }}
|
|
|
|
chart: {{ include "ceph-csi-cephfs.chart" . }}
|
|
|
|
component: {{ .Values.provisioner.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
2022-10-14 16:59:09 +02:00
|
|
|
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
|
2019-02-21 10:00:21 +05:30
|
|
|
spec:
|
2019-07-29 12:36:24 +02:00
|
|
|
replicas: {{ .Values.provisioner.replicaCount }}
|
2021-08-03 16:44:26 +05:30
|
|
|
strategy:
|
|
|
|
type: {{ .Values.provisioner.strategy.type }}
|
|
|
|
{{- if eq .Values.provisioner.strategy.type "RollingUpdate" }}
|
|
|
|
rollingUpdate:
|
|
|
|
maxUnavailable: {{ .Values.provisioner.strategy.rollingUpdate.maxUnavailable }}
|
|
|
|
{{- end }}
|
2019-02-21 10:00:21 +05:30
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: {{ include "ceph-csi-cephfs.name" . }}
|
|
|
|
component: {{ .Values.provisioner.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: {{ include "ceph-csi-cephfs.name" . }}
|
|
|
|
chart: {{ include "ceph-csi-cephfs.chart" . }}
|
|
|
|
component: {{ .Values.provisioner.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
2022-10-14 16:59:09 +02:00
|
|
|
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 8 }}{{- end }}
|
2019-02-21 10:00:21 +05:30
|
|
|
spec:
|
2020-09-20 03:00:51 +02:00
|
|
|
{{- if gt (int .Values.provisioner.replicaCount) 1 }}
|
|
|
|
affinity:
|
|
|
|
podAntiAffinity:
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
- labelSelector:
|
|
|
|
matchExpressions:
|
|
|
|
- key: app
|
|
|
|
operator: In
|
|
|
|
values:
|
|
|
|
- {{ include "ceph-csi-cephfs.name" . }}
|
|
|
|
- key: component
|
|
|
|
operator: In
|
|
|
|
values:
|
|
|
|
- {{ .Values.provisioner.name }}
|
|
|
|
topologyKey: "kubernetes.io/hostname"
|
|
|
|
{{- end }}
|
2019-02-21 10:00:21 +05:30
|
|
|
serviceAccountName: {{ include "ceph-csi-cephfs.serviceAccountName.provisioner" . }}
|
2022-06-13 15:31:38 +02:00
|
|
|
hostNetwork: {{ .Values.provisioner.enableHostNetwork }}
|
2020-05-05 13:58:39 +05:30
|
|
|
{{- if .Values.provisioner.priorityClassName }}
|
|
|
|
priorityClassName: {{ .Values.provisioner.priorityClassName }}
|
|
|
|
{{- end }}
|
2019-02-21 10:00:21 +05:30
|
|
|
containers:
|
|
|
|
- name: csi-provisioner
|
2019-07-29 12:36:24 +02:00
|
|
|
image: "{{ .Values.provisioner.provisioner.image.repository }}:{{ .Values.provisioner.provisioner.image.tag }}"
|
2019-09-26 11:55:12 +02:00
|
|
|
imagePullPolicy: {{ .Values.provisioner.provisioner.image.pullPolicy }}
|
2019-02-21 10:00:21 +05:30
|
|
|
args:
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
2022-07-26 10:22:19 +05:30
|
|
|
- "--v={{ .Values.sidecarLogLevel }}"
|
2019-09-26 11:55:12 +02:00
|
|
|
- "--timeout={{ .Values.provisioner.timeout }}"
|
2020-09-30 10:28:08 +05:30
|
|
|
- "--leader-election=true"
|
Move locks to more granular locking than CPU count based
As detailed in issue #279, current lock scheme has hash
buckets that are count of CPUs. This causes a lot of contention
when parallel requests are made to the CSI plugin. To reduce
lock contention, this commit introduces granular locks per
identifier.
The commit also changes the timeout for gRPC requests to Create
and Delete volumes, as the current timeout is 10s (kubernetes
documentation says 15s but code defaults are 10s). A virtual
setup takes about 12-15s to complete a request at times, that leads
to unwanted retries of the same request, hence the increased
timeout to enable operation completion with minimal retries.
Tests to create PVCs before and after these changes look like so,
Before:
Default master code + sidecar provisioner --timeout option set
to 30 seconds
20 PVCs
Creation: 3 runs, 396/391/400 seconds
Deletion: 3 runs, 218/271/118 seconds
- Once was stalled for more than 8 minutes and cancelled the run
After:
Current commit + sidecar provisioner --timeout option set to 30 sec
20 PVCs
Creation: 3 runs, 42/59/65 seconds
Deletion: 3 runs, 32/32/31 seconds
Fixes: #279
Signed-off-by: ShyamsundarR <srangana@redhat.com>
2019-06-22 12:43:28 -04:00
|
|
|
- "--retry-interval-start=500ms"
|
2020-10-22 10:37:05 +05:30
|
|
|
- "--extra-create-metadata=true"
|
2022-06-15 12:44:49 +05:30
|
|
|
- "--feature-gates=HonorPVReclaimPolicy=true"
|
|
|
|
- "--prevent-volume-mode-conversion=true"
|
2023-01-05 11:59:43 +01:00
|
|
|
{{- range .Values.provisioner.provisioner.extraArgs }}
|
|
|
|
- "--{{ . }}"
|
|
|
|
{{- end }}
|
2019-02-21 10:00:21 +05:30
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
2019-09-26 11:55:12 +02:00
|
|
|
value: "unix:///csi/{{ .Values.provisionerSocketFile }}"
|
2019-02-21 10:00:21 +05:30
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
2019-09-26 11:55:12 +02:00
|
|
|
mountPath: /csi
|
2019-02-21 10:00:21 +05:30
|
|
|
resources:
|
2019-09-26 11:55:12 +02:00
|
|
|
{{ toYaml .Values.provisioner.provisioner.resources | indent 12 }}
|
2020-08-03 15:18:08 +05:30
|
|
|
- name: csi-snapshotter
|
|
|
|
image: {{ .Values.provisioner.snapshotter.image.repository }}:{{ .Values.provisioner.snapshotter.image.tag }}
|
|
|
|
imagePullPolicy: {{ .Values.provisioner.snapshotter.image.pullPolicy }}
|
|
|
|
args:
|
|
|
|
- "--csi-address=$(ADDRESS)"
|
2022-07-26 10:22:19 +05:30
|
|
|
- "--v={{ .Values.sidecarLogLevel }}"
|
2020-08-03 15:18:08 +05:30
|
|
|
- "--timeout={{ .Values.provisioner.timeout }}"
|
|
|
|
- "--leader-election=true"
|
2022-06-08 12:41:41 +05:30
|
|
|
- "--extra-create-metadata=true"
|
2023-01-05 11:59:43 +01:00
|
|
|
{{- range .Values.provisioner.snapshotter.extraArgs }}
|
|
|
|
- "--{{ . }}"
|
|
|
|
{{- end }}
|
2020-08-03 15:18:08 +05:30
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: "unix:///csi/{{ .Values.provisionerSocketFile }}"
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
resources:
|
|
|
|
{{ toYaml .Values.provisioner.snapshotter.resources | indent 12 }}
|
2019-11-25 16:39:24 +05:30
|
|
|
{{- if .Values.provisioner.resizer.enabled }}
|
|
|
|
- name: csi-resizer
|
|
|
|
image: "{{ .Values.provisioner.resizer.image.repository }}:{{ .Values.provisioner.resizer.image.tag }}"
|
|
|
|
imagePullPolicy: {{ .Values.provisioner.resizer.image.pullPolicy }}
|
|
|
|
args:
|
2022-07-26 10:22:19 +05:30
|
|
|
- "--v={{ .Values.sidecarLogLevel }}"
|
2019-11-25 16:39:24 +05:30
|
|
|
- "--csi-address=$(ADDRESS)"
|
2020-09-30 10:28:08 +05:30
|
|
|
- "--timeout={{ .Values.provisioner.timeout }}"
|
2019-11-25 16:39:24 +05:30
|
|
|
- "--leader-election"
|
2020-05-27 16:32:08 +05:30
|
|
|
- "--retry-interval-start=500ms"
|
2020-09-30 10:28:08 +05:30
|
|
|
- "--handle-volume-inuse-error=false"
|
2022-05-10 15:03:49 +05:30
|
|
|
- "--feature-gates=RecoverVolumeExpansionFailure=true"
|
2023-01-05 11:59:43 +01:00
|
|
|
{{- range .Values.provisioner.resizer.extraArgs }}
|
|
|
|
- "--{{ . }}"
|
|
|
|
{{- end }}
|
2019-11-25 16:39:24 +05:30
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: "unix:///csi/{{ .Values.provisionerSocketFile }}"
|
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
|
|
|
mountPath: /csi
|
|
|
|
resources:
|
|
|
|
{{ toYaml .Values.provisioner.resizer.resources | indent 12 }}
|
2019-07-29 12:36:24 +02:00
|
|
|
{{- end }}
|
2019-02-21 10:00:21 +05:30
|
|
|
- name: csi-cephfsplugin
|
|
|
|
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:
|
2019-02-21 10:00:21 +05:30
|
|
|
- "--nodeid=$(NODE_ID)"
|
2019-05-24 16:33:33 +05:30
|
|
|
- "--type=cephfs"
|
2019-08-14 12:12:17 +05:30
|
|
|
- "--controllerserver=true"
|
2019-09-26 11:55:12 +02:00
|
|
|
- "--pidlimit=-1"
|
2019-02-21 10:00:21 +05:30
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
2020-10-20 12:19:10 +05:30
|
|
|
- "--v={{ .Values.logLevel }}"
|
2019-03-13 10:39:58 +05:30
|
|
|
- "--drivername=$(DRIVER_NAME)"
|
2021-03-25 16:44:46 +05:30
|
|
|
{{- if .Values.provisioner.profiling.enabled }}
|
|
|
|
- "--enableprofiling={{ .Values.provisioner.profiling.enabled }}"
|
2022-06-14 18:57:40 +05:30
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.provisioner.clustername }}
|
|
|
|
- "--clustername={{ .Values.provisioner.clustername }}"
|
2021-03-25 16:44:46 +05:30
|
|
|
{{- end }}
|
2022-07-29 10:58:34 +05:30
|
|
|
- "--setmetadata={{ .Values.provisioner.setmetadata }}"
|
2019-02-21 10:00:21 +05:30
|
|
|
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 }}
|
2019-02-21 10:00:21 +05:30
|
|
|
- name: NODE_ID
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
- name: CSI_ENDPOINT
|
2019-09-26 11:55:12 +02:00
|
|
|
value: "unix:///csi/{{ .Values.provisionerSocketFile }}"
|
2019-02-21 10:00:21 +05:30
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
2019-09-26 11:55:12 +02:00
|
|
|
mountPath: /csi
|
|
|
|
- name: host-sys
|
|
|
|
mountPath: /sys
|
|
|
|
- name: lib-modules
|
|
|
|
mountPath: /lib/modules
|
|
|
|
readOnly: true
|
|
|
|
- name: host-dev
|
|
|
|
mountPath: /dev
|
2021-09-01 20:26:15 +05:30
|
|
|
- name: ceph-config
|
|
|
|
mountPath: /etc/ceph/
|
2019-05-28 15:03:18 -04:00
|
|
|
- name: ceph-csi-config
|
|
|
|
mountPath: /etc/ceph-csi-config/
|
2019-06-25 15:29:17 -04:00
|
|
|
- name: keys-tmp-dir
|
|
|
|
mountPath: /tmp/csi/keys
|
2019-02-21 10:00:21 +05:30
|
|
|
resources:
|
2019-08-15 10:00:25 +02:00
|
|
|
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
|
2019-09-26 11:55:12 +02:00
|
|
|
{{- if .Values.provisioner.httpMetrics.enabled }}
|
2019-08-15 10:00:25 +02:00
|
|
|
- name: liveness-prometheus
|
|
|
|
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-08-15 10:00:25 +02:00
|
|
|
args:
|
|
|
|
- "--type=liveness"
|
|
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
2019-09-26 11:55:12 +02:00
|
|
|
- "--metricsport={{ .Values.provisioner.httpMetrics.containerPort }}"
|
2019-08-21 14:58:02 +05:30
|
|
|
- "--metricspath=/metrics"
|
2019-08-15 10:00:25 +02:00
|
|
|
- "--polltime=60s"
|
|
|
|
- "--timeout=3s"
|
|
|
|
env:
|
|
|
|
- name: CSI_ENDPOINT
|
2019-09-26 11:55:12 +02:00
|
|
|
value: "unix:///csi/{{ .Values.provisionerSocketFile }}"
|
2019-08-15 10:00:25 +02:00
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2022-02-04 13:18:59 +02:00
|
|
|
ports:
|
|
|
|
- containerPort: {{ .Values.provisioner.httpMetrics.containerPort }}
|
|
|
|
name: metrics
|
|
|
|
protocol: TCP
|
2019-08-15 10:00:25 +02:00
|
|
|
volumeMounts:
|
|
|
|
- name: socket-dir
|
2019-09-26 11:55:12 +02:00
|
|
|
mountPath: /csi
|
2019-08-15 10:00:25 +02:00
|
|
|
resources:
|
2019-02-21 10:00:21 +05:30
|
|
|
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
|
2019-09-26 11:55:12 +02:00
|
|
|
{{- end }}
|
2019-02-21 10:00:21 +05:30
|
|
|
volumes:
|
|
|
|
- name: socket-dir
|
2020-01-13 09:35:50 +05:30
|
|
|
emptyDir: {
|
|
|
|
medium: "Memory"
|
|
|
|
}
|
2019-09-26 11:55:12 +02:00
|
|
|
- name: host-sys
|
|
|
|
hostPath:
|
|
|
|
path: /sys
|
|
|
|
- name: lib-modules
|
|
|
|
hostPath:
|
|
|
|
path: /lib/modules
|
|
|
|
- name: host-dev
|
|
|
|
hostPath:
|
|
|
|
path: /dev
|
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-05-28 15:03:18 -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 }}
|
2019-06-25 15:29:17 -04:00
|
|
|
- name: keys-tmp-dir
|
|
|
|
emptyDir: {
|
|
|
|
medium: "Memory"
|
|
|
|
}
|
2019-07-29 12:36:24 +02:00
|
|
|
{{- if .Values.provisioner.affinity }}
|
2019-02-21 10:00:21 +05:30
|
|
|
affinity:
|
2019-12-03 09:18:59 +01:00
|
|
|
{{ toYaml .Values.provisioner.affinity | indent 8 -}}
|
2019-07-29 12:36:24 +02:00
|
|
|
{{- end -}}
|
|
|
|
{{- if .Values.provisioner.nodeSelector }}
|
2019-02-21 10:00:21 +05:30
|
|
|
nodeSelector:
|
2019-07-29 12:36:24 +02:00
|
|
|
{{ toYaml .Values.provisioner.nodeSelector | indent 8 -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- if .Values.provisioner.tolerations }}
|
2019-02-21 10:00:21 +05:30
|
|
|
tolerations:
|
2019-07-29 12:36:24 +02:00
|
|
|
{{ toYaml .Values.provisioner.tolerations | indent 8 -}}
|
|
|
|
{{- end -}}
|