From d5a34b20ad9f5bfb5f3145c6a613a8554f17a92e Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Wed, 8 May 2019 10:27:43 -0700 Subject: [PATCH] chart: csi attacher and provisioner replica count became configurable --- chart/questions.yml | 14 ++++++++++++++ chart/templates/deployment-driver.yaml | 8 ++++++++ chart/values.yaml | 2 ++ 3 files changed, 24 insertions(+) diff --git a/chart/questions.yml b/chart/questions.yml index 7ae1c6f..08b7379 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -42,6 +42,20 @@ questions: description: "Specify kubelet root-dir. Leave blank to autodetect." type: string label: Kubelet Root Directory + - variable: csi.attacherReplicaCount + type: int + default: + min: 1 + max: 10 + description: "Specify number of CSI Attacher replica. By default 3." + label: Longhorn CSI Attacher replica count + - variable: csi.provisionerReplicaCount + type: int + default: + min: 1 + max: 10 + description: "Specify number of CSI Provisioner replica. By default 3." + label: Longhorn CSI Provisioner replica count - variable: persistence.defaultClass default: "true" description: "Set as default StorageClass" diff --git a/chart/templates/deployment-driver.yaml b/chart/templates/deployment-driver.yaml index 25eb381..1d21924 100644 --- a/chart/templates/deployment-driver.yaml +++ b/chart/templates/deployment-driver.yaml @@ -62,4 +62,12 @@ spec: - name: CSI_DRIVER_REGISTRAR_IMAGE value: {{ .Values.csi.driverRegistrarImage }} {{- end }} + {{- if .Values.csi.attacherReplicaCount }} + - name: CSI_ATTACHER_REPLICA_COUNT + value: "{{ .Values.csi.attacherReplicaCount }}" + {{- end }} + {{- if .Values.csi.provisionerReplicaCount }} + - name: CSI_PROVISIONER_REPLICA_COUNT + value: "{{ .Values.csi.provisionerReplicaCount }}" + {{- end }} serviceAccountName: longhorn-service-account diff --git a/chart/values.yaml b/chart/values.yaml index 8c61b25..9661fb3 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -33,6 +33,8 @@ csi: provisionerImage: driverRegistrarImage: kubeletRootDir: + attacherReplicaCount: + provisionerReplicaCount: resources: {} # We usually recommend not to specify default resources and to leave this as a conscious