From 1058ec1a1dd1ba9ba4082af46ed47ee2073b2dc4 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Sat, 24 Aug 2024 09:53:25 +0000 Subject: [PATCH 1/2] fix: switch default platform to aws for easy migrate --- charts/kubezero/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/kubezero/values.yaml b/charts/kubezero/values.yaml index 65d10005..26ba9218 100644 --- a/charts/kubezero/values.yaml +++ b/charts/kubezero/values.yaml @@ -7,8 +7,8 @@ kubezero: global: clusterName: zdt-trial-cluster - # platform: aws (kubeadm), gke, or nocloud ( default ) - platform: "nocloud" + # platform: aws (kubeadm, default), gke, or nocloud + platform: "aws" highAvailable: false From 6dc5e43c246b9c8419b6247dca38637ebb8ec721 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Sat, 24 Aug 2024 10:19:39 +0000 Subject: [PATCH 2/2] fix: set Istio attributes properly again --- charts/kubezero/templates/cert-manager.yaml | 4 +++- charts/kubezero/templates/istio-ingress.yaml | 2 +- charts/kubezero/templates/istio-private-ingress.yaml | 6 +++++- charts/kubezero/templates/istio.yaml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/charts/kubezero/templates/cert-manager.yaml b/charts/kubezero/templates/cert-manager.yaml index e0083796..270ced7d 100644 --- a/charts/kubezero/templates/cert-manager.yaml +++ b/charts/kubezero/templates/cert-manager.yaml @@ -31,8 +31,10 @@ cert-manager: nodeSelector: node-role.kubernetes.io/control-plane: "" - {{ with index .Values "cert-manager" "IamArn" }} extraEnv: + - name: AWS_REGION + value: {{ .Values.global.aws.region }} + {{ with index .Values "cert-manager" "IamArn" }} - name: AWS_ROLE_ARN value: "{{ . }}" - name: AWS_WEB_IDENTITY_TOKEN_FILE diff --git a/charts/kubezero/templates/istio-ingress.yaml b/charts/kubezero/templates/istio-ingress.yaml index cdfa3e45..6d373f3e 100644 --- a/charts/kubezero/templates/istio-ingress.yaml +++ b/charts/kubezero/templates/istio-ingress.yaml @@ -4,7 +4,7 @@ gateway: name: istio-ingressgateway {{- if ne .Values.global.platform "gke" }} - priorityClassName: "system-cluster-critical" + priorityClassName: "system-cluster-critical" {{- end }} {{- with index .Values "istio-ingress" "gateway" "replicaCount" }} diff --git a/charts/kubezero/templates/istio-private-ingress.yaml b/charts/kubezero/templates/istio-private-ingress.yaml index 60376a9b..8f3d5ea9 100644 --- a/charts/kubezero/templates/istio-private-ingress.yaml +++ b/charts/kubezero/templates/istio-private-ingress.yaml @@ -3,6 +3,10 @@ gateway: name: istio-private-ingressgateway + {{- if ne .Values.global.platform "gke" }} + priorityClassName: "system-cluster-critical" + {{- end }} + {{- with index .Values "istio-private-ingress" "gateway" "replicaCount" }} replicaCount: {{ . }} {{- if gt (int .) 1 }} @@ -11,7 +15,7 @@ gateway: {{- end }} {{- end }} - {{- if not (index .Values "istio-private-ingress" "gateway" "affinity") }} + {{- if eq .Values.global.platform "aws" }} # Only nodes who are fronted with matching LB affinity: nodeAffinity: diff --git a/charts/kubezero/templates/istio.yaml b/charts/kubezero/templates/istio.yaml index 9705bf96..dad5c830 100644 --- a/charts/kubezero/templates/istio.yaml +++ b/charts/kubezero/templates/istio.yaml @@ -5,7 +5,7 @@ global: defaultPodDisruptionBudget: enabled: true {{- if ne .Values.global.platform "gke" }} - priorityClassName: "system-cluster-critical" + priorityClassName: "system-cluster-critical" {{- end }} {{- end }}