From 575683dc44d1abc496b784bef04c48012d9c016c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=9C=E6=9D=BE?= Date: Mon, 13 May 2024 21:56:08 +0800 Subject: [PATCH] fix: resolve conflicts --- deploy/chart/templates/plugin.yaml | 22 +++++----------------- deploy/chart/values-edge.yaml | 28 ++++++++++++++++------------ deploy/chart/values.yaml | 7 ++++++- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/deploy/chart/templates/plugin.yaml b/deploy/chart/templates/plugin.yaml index e0e616260..7a6aed263 100644 --- a/deploy/chart/templates/plugin.yaml +++ b/deploy/chart/templates/plugin.yaml @@ -1,6 +1,7 @@ {{- range $key, $nodepool := .Values.nodepools -}} {{- if and $.Values.plugin.enabled (ne $nodepool nil) }} -{{- $nodepool := mergeOverwrite $.Values $nodepool }} +{{- $values := deepCopy $.Values }} +{{- $nodepool := mergeOverwrite $values $nodepool }} kind: DaemonSet apiVersion: apps/v1 metadata: @@ -23,20 +24,7 @@ spec: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - - matchExpressions: - - key: type - operator: NotIn - values: - - virtual-kubelet -{{- if $nodepool.affinity }} - - matchExpressions: - - key: {{ $nodepool.affinity.key }} - operator: {{ $nodepool.affinity.operator }} - values: - {{- range $nodepool.affinity.values }} - - {{ . | quote }} - {{- end -}} -{{- end }} +{{- toYaml $nodepool.nodeSelectorTerms | nindent 12 }} nodeSelector: kubernetes.io/os: linux serviceAccountName: alicloud-csi-node @@ -165,8 +153,8 @@ spec: - "--endpoint=$(CSI_ENDPOINT)" - "--v=2" - "--driver={{ include "enabledPlugins" $nodepool.csi }}" -{{- if .Values.deploy.featureGates }} - - "--feature-gates={{ .Values.deploy.featureGates }}" +{{- if $nodepool.deploy.featureGates }} + - "--feature-gates={{ $nodepool.deploy.featureGates }}" {{- end -}} {{- if not $nodepool.deploy.ecs }} - --nodeid=$(KUBE_NODE_NAME) diff --git a/deploy/chart/values-edge.yaml b/deploy/chart/values-edge.yaml index 27e0223ed..c5099681a 100644 --- a/deploy/chart/values-edge.yaml +++ b/deploy/chart/values-edge.yaml @@ -4,12 +4,16 @@ deploy: nodepools: default: pluginname: csi-plugin - csi: {} - affinity: - key: alibabacloud.com/is-edge-worker - operator: NotIn - values: - val1: "true" + nodeSelectorTerms: + - matchExpressions: + - key: type + operator: NotIn + values: + - virtual-kubelet + - key: alibabacloud.com/is-edge-worker + operator: In + values: + - "false" edge: pluginname: csi-plugin-edge csi: @@ -20,10 +24,10 @@ nodepools: oss: controller: enabled: false - affinity: - key: alibabacloud.com/is-edge-worker - operator: NotIn - values: - val1: "false" - + nodeSelectorTerms: + - matchExpressions: + - key: alibabacloud.com/is-edge-worker + operator: In + values: + - "true" # other nodepools \ No newline at end of file diff --git a/deploy/chart/values.yaml b/deploy/chart/values.yaml index 47491aa3c..e080fb3c8 100644 --- a/deploy/chart/values.yaml +++ b/deploy/chart/values.yaml @@ -26,7 +26,12 @@ csi: nodepools: default: pluginname: csi-plugin - csi: {} + nodeSelectorTerms: + - matchExpressions: + - key: type + operator: NotIn + values: + - virtual-kubelet defaultStorageClass: enabled: true