diff --git a/charts/kubezero-storage/Chart.yaml b/charts/kubezero-storage/Chart.yaml index fbe43fb4..2733645a 100644 --- a/charts/kubezero-storage/Chart.yaml +++ b/charts/kubezero-storage/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: kubezero-storage description: KubeZero umbrella chart for all things storage incl. AWS EBS/EFS, openEBS-lvm, gemini type: application -version: 0.6.3 +version: 0.6.4 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png keywords: diff --git a/charts/kubezero-storage/charts/aws-efs-csi-driver/templates/controller-deployment.yaml b/charts/kubezero-storage/charts/aws-efs-csi-driver/templates/controller-deployment.yaml index bb766002..c27e1deb 100644 --- a/charts/kubezero-storage/charts/aws-efs-csi-driver/templates/controller-deployment.yaml +++ b/charts/kubezero-storage/charts/aws-efs-csi-driver/templates/controller-deployment.yaml @@ -13,6 +13,10 @@ spec: app: efs-csi-controller app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} + {{- with .Values.controller.updateStrategy }} + strategy: + type: {{ . }} + {{- end }} template: metadata: labels: @@ -58,7 +62,7 @@ spec: - name: CSI_ENDPOINT value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock {{- if .Values.controller.extraEnv }} -{{ toYaml .Values.controller.extraEnv | indent 12 }} + {{- toYaml .Values.controller.extraEnv | nindent 12 }} {{- end }} volumeMounts: - name: socket-dir diff --git a/charts/kubezero-storage/efs.patch b/charts/kubezero-storage/efs.patch index 24dadc5d..d6d98f24 100644 --- a/charts/kubezero-storage/efs.patch +++ b/charts/kubezero-storage/efs.patch @@ -1,12 +1,23 @@ -diff -tubNr charts/aws-efs-csi-driver/templates/controller-deployment.yaml charts/aws-efs-csi-driver.zdt/templates/controller-deployment.yaml ---- charts/aws-efs-csi-driver/templates/controller-deployment.yaml 2021-06-25 22:43:06.000000000 +0200 -+++ charts/aws-efs-csi-driver.zdt/templates/controller-deployment.yaml 2021-07-15 00:37:28.960305011 +0200 -@@ -57,9 +56,14 @@ +diff -tuNr charts/aws-efs-csi-driver.orig/templates/controller-deployment.yaml charts/aws-efs-csi-driver/templates/controller-deployment.yaml +--- charts/aws-efs-csi-driver.orig/templates/controller-deployment.yaml 2022-04-28 01:41:15.000000000 +0200 ++++ charts/aws-efs-csi-driver/templates/controller-deployment.yaml 2022-05-05 17:10:49.708746126 +0200 +@@ -13,6 +13,10 @@ + app: efs-csi-controller + app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} ++ {{- with .Values.controller.updateStrategy }} ++ strategy: ++ type: {{ . }} ++ {{- end }} + template: + metadata: + labels: +@@ -57,9 +61,14 @@ env: - name: CSI_ENDPOINT value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock + {{- if .Values.controller.extraEnv }} -+{{ toYaml .Values.controller.extraEnv | indent 12 }} ++ {{- toYaml .Values.controller.extraEnv | nindent 12 }} + {{- end }} volumeMounts: - name: socket-dir @@ -15,8 +26,8 @@ diff -tubNr charts/aws-efs-csi-driver/templates/controller-deployment.yaml chart + mountPath: "/var/run/secrets/sts.amazonaws.com/serviceaccount/" ports: - name: healthz - containerPort: 9909 -@@ -110,6 +114,13 @@ + containerPort: {{ .Values.controller.healthPort }} +@@ -110,6 +119,13 @@ volumes: - name: socket-dir emptyDir: {} @@ -30,9 +41,9 @@ diff -tubNr charts/aws-efs-csi-driver/templates/controller-deployment.yaml chart {{- with .Values.controller.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} -diff -tubNr charts/aws-efs-csi-driver/templates/node-daemonset.yaml charts/aws-efs-csi-driver.zdt/templates/node-daemonset.yaml ---- charts/aws-efs-csi-driver/templates/node-daemonset.yaml 2021-06-25 22:43:06.000000000 +0200 -+++ charts/aws-efs-csi-driver.zdt/templates/node-daemonset.yaml 2021-07-15 00:14:58.680295564 +0200 +diff -tuNr charts/aws-efs-csi-driver.orig/templates/node-daemonset.yaml charts/aws-efs-csi-driver/templates/node-daemonset.yaml +--- charts/aws-efs-csi-driver.orig/templates/node-daemonset.yaml 2022-04-28 01:41:15.000000000 +0200 ++++ charts/aws-efs-csi-driver/templates/node-daemonset.yaml 2022-05-05 17:09:28.361227665 +0200 @@ -40,15 +40,10 @@ {{- with .Values.node.nodeSelector }} {{- toYaml . | nindent 8 }} diff --git a/charts/kubezero-storage/jsonnet/jsonnetfile.lock.json b/charts/kubezero-storage/jsonnet/jsonnetfile.lock.json index 645f5acc..586b369a 100644 --- a/charts/kubezero-storage/jsonnet/jsonnetfile.lock.json +++ b/charts/kubezero-storage/jsonnet/jsonnetfile.lock.json @@ -18,7 +18,7 @@ "subdir": "contrib/mixin" } }, - "version": "08407ff7600eb16c4445d5f21c4fafaf19412e24", + "version": "8453b10e580cc8f44922d8aa89ededba08d6089c", "sum": "W/Azptf1PoqjyMwJON96UY69MFugDA4IAYiKURscryc=" }, { diff --git a/charts/kubezero/Chart.yaml b/charts/kubezero/Chart.yaml index f5cafbf3..b1019c46 100644 --- a/charts/kubezero/Chart.yaml +++ b/charts/kubezero/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: kubezero description: KubeZero - Root App of Apps chart type: application -version: 1.22.8-6 +version: 1.22.8-7 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png keywords: diff --git a/charts/kubezero/templates/storage.yaml b/charts/kubezero/templates/storage.yaml index af957209..3ab7be1b 100644 --- a/charts/kubezero/templates/storage.yaml +++ b/charts/kubezero/templates/storage.yaml @@ -25,8 +25,22 @@ aws-ebs-csi-driver: - name: AWS_STS_REGIONAL_ENDPOINTS value: regional + {{- if .Values.HighAvailableControlplane }} + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - ebs-csi-controller + topologyKey: "kubernetes.io/hostname" + {{- end }} + aws-efs-csi-driver: enabled: {{ default false (index .Values "storage" "aws-efs-csi-driver" "enabled")}} + replicaCount: {{ ternary 2 1 .Values.HighAvailableControlplane }} controller: extraEnv: - name: AWS_ROLE_ARN @@ -35,6 +49,23 @@ aws-efs-csi-driver: value: "/var/run/secrets/sts.amazonaws.com/serviceaccount/token" - name: AWS_STS_REGIONAL_ENDPOINTS value: regional + + # The EFS controller steel needs hostnetwork and cannot update on single node control planes otherwise + {{- if not .Values.HighAvailableControlplane }} + updateStrategy: Recreate + {{- else }} + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - efs-csi-controller + topologyKey: "kubernetes.io/hostname" + {{- end }} + # Dynamic Provisioning {{- with index .Values "storage" "aws-efs-csi-driver" "storageClasses" }} storageClasses: diff --git a/charts/kubezero/values.yaml b/charts/kubezero/values.yaml index 6072f71f..95d0de2b 100644 --- a/charts/kubezero/values.yaml +++ b/charts/kubezero/values.yaml @@ -22,7 +22,7 @@ cert-manager: storage: enabled: false - targetRevision: 0.6.3 + targetRevision: 0.6.4 aws-ebs-csi-driver: enabled: false aws-efs-csi-driver: