diff --git a/chart/templates/deployment-recovery-backend.yaml b/chart/templates/deployment-recovery-backend.yaml index 57720bd..81c8aba 100644 --- a/chart/templates/deployment-recovery-backend.yaml +++ b/chart/templates/deployment-recovery-backend.yaml @@ -6,7 +6,7 @@ metadata: name: longhorn-recovery-backend namespace: {{ include "release_namespace" . }} spec: - replicas: 2 + replicas: {{ .Values.longhornRecoveryBackend.replicas }} selector: matchLabels: app: longhorn-recovery-backend @@ -59,15 +59,25 @@ spec: imagePullSecrets: - name: {{ .Values.privateRegistry.registrySecret }} {{- end }} - {{- if .Values.longhornDriver.priorityClass }} - priorityClassName: {{ .Values.longhornDriver.priorityClass | quote}} + {{- if .Values.longhornRecoveryBackend.priorityClass }} + priorityClassName: {{ .Values.longhornRecoveryBackend.priorityClass | quote }} {{- end }} - {{- if .Values.longhornDriver.tolerations }} + {{- if or .Values.longhornRecoveryBackend.tolerations .Values.global.cattle.windowsCluster.enabled }} tolerations: -{{ toYaml .Values.longhornDriver.tolerations | indent 6 }} + {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.tolerations }} +{{ toYaml .Values.global.cattle.windowsCluster.tolerations | indent 6 }} + {{- end }} + {{- if .Values.longhornRecoveryBackend.tolerations }} +{{ toYaml .Values.longhornRecoveryBackend.tolerations | indent 6 }} + {{- end }} {{- end }} - {{- if .Values.longhornDriver.nodeSelector }} + {{- if or .Values.longhornRecoveryBackend.nodeSelector .Values.global.cattle.windowsCluster.enabled }} nodeSelector: -{{ toYaml .Values.longhornDriver.nodeSelector | indent 8 }} + {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.nodeSelector }} +{{ toYaml .Values.global.cattle.windowsCluster.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.longhornRecoveryBackend.nodeSelector }} +{{ toYaml .Values.longhornRecoveryBackend.nodeSelector | indent 8 }} + {{- end }} {{- end }} serviceAccountName: longhorn-service-account diff --git a/chart/templates/deployment-webhook.yaml b/chart/templates/deployment-webhook.yaml index 3b32b1b..6a94897 100644 --- a/chart/templates/deployment-webhook.yaml +++ b/chart/templates/deployment-webhook.yaml @@ -6,7 +6,7 @@ metadata: name: longhorn-conversion-webhook namespace: {{ include "release_namespace" . }} spec: - replicas: 2 + replicas: {{ .Values.longhornConversionWebhook.replicas }} selector: matchLabels: app: longhorn-conversion-webhook @@ -53,25 +53,25 @@ spec: imagePullSecrets: - name: {{ .Values.privateRegistry.registrySecret }} {{- end }} - {{- if .Values.longhornDriver.priorityClass }} - priorityClassName: {{ .Values.longhornDriver.priorityClass | quote }} + {{- if .Values.longhornConversionWebhook.priorityClass }} + priorityClassName: {{ .Values.longhornConversionWebhook.priorityClass | quote }} {{- end }} - {{- if or .Values.longhornDriver.tolerations .Values.global.cattle.windowsCluster.enabled }} + {{- if or .Values.longhornConversionWebhook.tolerations .Values.global.cattle.windowsCluster.enabled }} tolerations: {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.tolerations }} {{ toYaml .Values.global.cattle.windowsCluster.tolerations | indent 6 }} {{- end }} - {{- if .Values.longhornDriver.tolerations }} -{{ toYaml .Values.longhornDriver.tolerations | indent 6 }} + {{- if .Values.longhornConversionWebhook.tolerations }} +{{ toYaml .Values.longhornConversionWebhook.tolerations | indent 6 }} {{- end }} {{- end }} - {{- if or .Values.longhornDriver.nodeSelector .Values.global.cattle.windowsCluster.enabled }} + {{- if or .Values.longhornConversionWebhook.nodeSelector .Values.global.cattle.windowsCluster.enabled }} nodeSelector: {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.nodeSelector }} {{ toYaml .Values.global.cattle.windowsCluster.nodeSelector | indent 8 }} {{- end }} - {{- if .Values.longhornDriver.nodeSelector }} -{{ toYaml .Values.longhornDriver.nodeSelector | indent 8 }} + {{- if .Values.longhornConversionWebhook.nodeSelector }} +{{ toYaml .Values.longhornConversionWebhook.nodeSelector | indent 8 }} {{- end }} {{- end }} serviceAccountName: longhorn-service-account @@ -84,7 +84,7 @@ metadata: name: longhorn-admission-webhook namespace: {{ include "release_namespace" . }} spec: - replicas: 2 + replicas: {{ .Values.longhornAdmissionWebhook.replicas }} selector: matchLabels: app: longhorn-admission-webhook @@ -142,25 +142,25 @@ spec: imagePullSecrets: - name: {{ .Values.privateRegistry.registrySecret }} {{- end }} - {{- if .Values.longhornDriver.priorityClass }} - priorityClassName: {{ .Values.longhornDriver.priorityClass | quote }} + {{- if .Values.longhornAdmissionWebhook.priorityClass }} + priorityClassName: {{ .Values.longhornAdmissionWebhook.priorityClass | quote }} {{- end }} - {{- if or .Values.longhornDriver.tolerations .Values.global.cattle.windowsCluster.enabled }} + {{- if or .Values.longhornAdmissionWebhook.tolerations .Values.global.cattle.windowsCluster.enabled }} tolerations: {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.tolerations }} {{ toYaml .Values.global.cattle.windowsCluster.tolerations | indent 6 }} {{- end }} - {{- if .Values.longhornDriver.tolerations }} -{{ toYaml .Values.longhornDriver.tolerations | indent 6 }} + {{- if .Values.longhornAdmissionWebhook.tolerations }} +{{ toYaml .Values.longhornAdmissionWebhook.tolerations | indent 6 }} {{- end }} {{- end }} - {{- if or .Values.longhornDriver.nodeSelector .Values.global.cattle.windowsCluster.enabled }} + {{- if or .Values.longhornAdmissionWebhook.nodeSelector .Values.global.cattle.windowsCluster.enabled }} nodeSelector: {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.nodeSelector }} {{ toYaml .Values.global.cattle.windowsCluster.nodeSelector | indent 8 }} {{- end }} - {{- if or .Values.longhornDriver.nodeSelector }} -{{ toYaml .Values.longhornDriver.nodeSelector | indent 8 }} + {{- if .Values.longhornAdmissionWebhook.nodeSelector }} +{{ toYaml .Values.longhornAdmissionWebhook.nodeSelector | indent 8 }} {{- end }} {{- end }} serviceAccountName: longhorn-service-account diff --git a/chart/values.yaml b/chart/values.yaml index 0aa0c8f..d1ada46 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -218,6 +218,54 @@ longhornUI: # label-key1: "label-value1" # label-key2: "label-value2" +longhornConversionWebhook: + replicas: 2 + priorityClass: ~ + tolerations: [] + ## If you want to set tolerations for Longhorn conversion webhook Deployment, delete the `[]` in the line above + ## and uncomment this example block + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + nodeSelector: {} + ## If you want to set node selector for Longhorn conversion webhook Deployment, delete the `{}` in the line above + ## and uncomment this example block + # label-key1: "label-value1" + # label-key2: "label-value2" + +longhornAdmissionWebhook: + replicas: 2 + priorityClass: ~ + tolerations: [] + ## If you want to set tolerations for Longhorn admission webhook Deployment, delete the `[]` in the line above + ## and uncomment this example block + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + nodeSelector: {} + ## If you want to set node selector for Longhorn admission webhook Deployment, delete the `{}` in the line above + ## and uncomment this example block + # label-key1: "label-value1" + # label-key2: "label-value2" + +longhornRecoveryBackend: + replicas: 2 + priorityClass: ~ + tolerations: [] + ## If you want to set tolerations for Longhorn recovery backend Deployment, delete the `[]` in the line above + ## and uncomment this example block + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + nodeSelector: {} + ## If you want to set node selector for Longhorn recovery backend Deployment, delete the `{}` in the line above + ## and uncomment this example block + # label-key1: "label-value1" + # label-key2: "label-value2" + ingress: ## Set to true to enable ingress record generation enabled: false