fix: various upgrade fixes
This commit is contained in:
parent
cb582cf14e
commit
048b113b1e
@ -13,15 +13,27 @@ def migrate(values):
|
|||||||
values["clusterName"] = values["ClusterName"]
|
values["clusterName"] = values["ClusterName"]
|
||||||
values.pop("ClusterName")
|
values.pop("ClusterName")
|
||||||
|
|
||||||
# Create new clusterwide cloudprovider data if possible
|
# Remove HighAvailableControlplane
|
||||||
try:
|
try:
|
||||||
if values["cert-manager"]["clusterIssuer"]["solvers"][0]["dns01"]["route53"]["regions"]:
|
values["global"]["highAvailable"] = values["HighAvailableControlplane"]
|
||||||
|
values.pop("HighAvailableControlplane")
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Create new clusterwide cloudprovider data if possible
|
||||||
|
# IamArn: arn:aws:iam::<ACCOUNT_ID>:role/<REGION>.<CLUSTERNAME>.cert-manager
|
||||||
|
try:
|
||||||
|
if values["cert-manager"]["IamArn"]:
|
||||||
|
account_id = values["cert-manager"]["IamArn"].split(":")[4]
|
||||||
|
region = values["cert-manager"]["IamArn"].split(":")[5].split('.')[0].split('/')[1]
|
||||||
if "global" not in values:
|
if "global" not in values:
|
||||||
values["global"] = {}
|
values["global"] = {}
|
||||||
if "aws" not in values["global"]:
|
if "aws" not in values["global"]:
|
||||||
values["global"]["aws"] = {}
|
values["global"]["aws"] = {}
|
||||||
|
|
||||||
values["global"]["aws"]["region"] = values["cert-manager"]["clusterIssuer"]["solvers"][0]["dns01"]["route53"]["region"]
|
values["global"]["aws"]["region"] = region
|
||||||
|
values["global"]["aws"]["accountId"] = account_id
|
||||||
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -128,9 +128,8 @@ all_nodes_upgrade "mount --make-shared /host/sys/fs/cgroup; mount --make-shared
|
|||||||
|
|
||||||
control_plane_upgrade kubeadm_upgrade
|
control_plane_upgrade kubeadm_upgrade
|
||||||
|
|
||||||
echo "Adjust kubezero-values as needed: (eg. set cilium cluster id etc)"
|
echo "Adjust kubezero-values as needed: (eg. set cilium cluster id etc):"
|
||||||
echo "kubectl edit cm kubezero-values -n kube-system"
|
kubectl edit cm kubezero-values -n kube-system
|
||||||
read
|
|
||||||
|
|
||||||
# Remove multus DS due to label changes, if this fails:
|
# Remove multus DS due to label changes, if this fails:
|
||||||
# kubezero-network $ helm template . --set multus.enabled=true | kubectl apply -f -
|
# kubezero-network $ helm template . --set multus.enabled=true | kubectl apply -f -
|
||||||
|
@ -1,19 +1,6 @@
|
|||||||
diff -tuNr charts/aws-node-termination-handler.orig/templates/deployment.yaml charts/aws-node-termination-handler/templates/deployment.yaml
|
diff -tuNr charts/aws-node-termination-handler.orig/templates/deployment.yaml charts/aws-node-termination-handler/templates/deployment.yaml
|
||||||
--- charts/aws-node-termination-handler.orig/templates/deployment.yaml 2022-01-26 18:01:36.123482217 +0100
|
--- charts/aws-node-termination-handler.orig/templates/deployment.yaml 2022-01-26 18:01:36.123482217 +0100
|
||||||
+++ charts/aws-node-termination-handler/templates/deployment.yaml 2022-01-26 18:08:21.464304621 +0100
|
+++ charts/aws-node-termination-handler/templates/deployment.yaml 2022-01-26 18:08:21.464304621 +0100
|
||||||
@@ -161,9 +161,9 @@
|
|
||||||
{{- toYaml . | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
ports:
|
|
||||||
- - name: liveness-probe
|
|
||||||
- protocol: TCP
|
|
||||||
- containerPort: {{ .Values.probes.httpGet.port }}
|
|
||||||
+ - name: liveness-probe
|
|
||||||
+ protocol: TCP
|
|
||||||
+ containerPort: {{ .Values.probes.httpGet.port }}
|
|
||||||
{{- if .Values.enablePrometheusServer }}
|
|
||||||
- name: http-metrics
|
|
||||||
protocol: TCP
|
|
||||||
@@ -175,13 +175,23 @@
|
@@ -175,13 +175,23 @@
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml . | nindent 12 }}
|
{{- toYaml . | nindent 12 }}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# kubezero
|
# kubezero
|
||||||
|
|
||||||
![Version: 1.23.10-3](https://img.shields.io/badge/Version-1.23.10--3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
|
![Version: 1.23.11](https://img.shields.io/badge/Version-1.23.11-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
|
||||||
|
|
||||||
KubeZero - Root App of Apps chart
|
KubeZero - Root App of Apps chart
|
||||||
|
|
||||||
@ -24,8 +24,11 @@ Kubernetes: `>= 1.20.0`
|
|||||||
|
|
||||||
| Key | Type | Default | Description |
|
| Key | Type | Default | Description |
|
||||||
|-----|------|---------|-------------|
|
|-----|------|---------|-------------|
|
||||||
| HighAvailableControlplane | bool | `false` | |
|
| addons.aws-node-termination-handler | object | `{}` | |
|
||||||
|
| addons.clusterBackup | object | `{}` | |
|
||||||
| addons.enabled | bool | `true` | |
|
| addons.enabled | bool | `true` | |
|
||||||
|
| addons.external-dns | object | `{}` | |
|
||||||
|
| addons.forseti | object | `{}` | |
|
||||||
| addons.targetRevision | string | `"0.6.2"` | |
|
| addons.targetRevision | string | `"0.6.2"` | |
|
||||||
| argocd.enabled | bool | `false` | |
|
| argocd.enabled | bool | `false` | |
|
||||||
| argocd.istio.enabled | bool | `false` | |
|
| argocd.istio.enabled | bool | `false` | |
|
||||||
@ -34,6 +37,8 @@ Kubernetes: `>= 1.20.0`
|
|||||||
| cert-manager.enabled | bool | `false` | |
|
| cert-manager.enabled | bool | `false` | |
|
||||||
| cert-manager.namespace | string | `"cert-manager"` | |
|
| cert-manager.namespace | string | `"cert-manager"` | |
|
||||||
| cert-manager.targetRevision | string | `"0.9.2"` | |
|
| cert-manager.targetRevision | string | `"0.9.2"` | |
|
||||||
|
| global.clusterName | string | `"zdt-trial-cluster"` | |
|
||||||
|
| global.highAvailable | bool | `false` | |
|
||||||
| istio-ingress.chart | string | `"kubezero-istio-gateway"` | |
|
| istio-ingress.chart | string | `"kubezero-istio-gateway"` | |
|
||||||
| istio-ingress.enabled | bool | `false` | |
|
| istio-ingress.enabled | bool | `false` | |
|
||||||
| istio-ingress.gateway.service | object | `{}` | |
|
| istio-ingress.gateway.service | object | `{}` | |
|
||||||
@ -58,14 +63,15 @@ Kubernetes: `>= 1.20.0`
|
|||||||
| metrics.istio.grafana | object | `{}` | |
|
| metrics.istio.grafana | object | `{}` | |
|
||||||
| metrics.istio.prometheus | object | `{}` | |
|
| metrics.istio.prometheus | object | `{}` | |
|
||||||
| metrics.namespace | string | `"monitoring"` | |
|
| metrics.namespace | string | `"monitoring"` | |
|
||||||
| metrics.targetRevision | string | `"0.8.1"` | |
|
| metrics.targetRevision | string | `"0.8.5"` | |
|
||||||
|
| network.cilium.cluster | object | `{}` | |
|
||||||
| network.enabled | bool | `true` | |
|
| network.enabled | bool | `true` | |
|
||||||
| network.retain | bool | `true` | |
|
| network.retain | bool | `true` | |
|
||||||
| network.targetRevision | string | `"0.3.3"` | |
|
| network.targetRevision | string | `"0.3.3"` | |
|
||||||
| storage.aws-ebs-csi-driver.enabled | bool | `false` | |
|
| storage.aws-ebs-csi-driver.enabled | bool | `false` | |
|
||||||
| storage.aws-efs-csi-driver.enabled | bool | `false` | |
|
| storage.aws-efs-csi-driver.enabled | bool | `false` | |
|
||||||
| storage.enabled | bool | `false` | |
|
| storage.enabled | bool | `false` | |
|
||||||
| storage.targetRevision | string | `"0.7.0"` | |
|
| storage.targetRevision | string | `"0.7.1"` | |
|
||||||
|
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
|
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
|
||||||
|
@ -7,8 +7,8 @@ clusterBackup:
|
|||||||
{{- toYaml . | nindent 2 }}
|
{{- toYaml . | nindent 2 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
# AWS
|
|
||||||
{{- if .Values.global.aws }}
|
{{- if .Values.global.aws }}
|
||||||
|
# AWS
|
||||||
extraEnv:
|
extraEnv:
|
||||||
- name: AWS_DEFAULT_REGION
|
- name: AWS_DEFAULT_REGION
|
||||||
value: {{ .Values.global.aws.region }}
|
value: {{ .Values.global.aws.region }}
|
||||||
@ -21,8 +21,8 @@ forseti:
|
|||||||
{{- toYaml . | nindent 2 }}
|
{{- toYaml . | nindent 2 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
# AWS
|
|
||||||
{{- if .Values.global.aws }}
|
{{- if .Values.global.aws }}
|
||||||
|
# AWS
|
||||||
aws:
|
aws:
|
||||||
region: {{ $.Values.global.aws.region }}
|
region: {{ $.Values.global.aws.region }}
|
||||||
iamRoleArn: "arn:aws:iam::{{ .Values.global.aws.accountId }}:role/{{ .Values.global.aws.region }}.{{ .Values.global.clusterName }}.kubezeroForseti"
|
iamRoleArn: "arn:aws:iam::{{ .Values.global.aws.accountId }}:role/{{ .Values.global.aws.region }}.{{ .Values.global.clusterName }}.kubezeroForseti"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
istiod:
|
istiod:
|
||||||
telemetry:
|
telemetry:
|
||||||
enabled: {{ $.Values.metrics.enabled }}
|
enabled: {{ $.Values.metrics.enabled }}
|
||||||
{{- if .Values.HighAvailableControlplane }}
|
{{- if .Values.global.highAvailable }}
|
||||||
pilot:
|
pilot:
|
||||||
replicaCount: 2
|
replicaCount: 2
|
||||||
global:
|
global:
|
||||||
|
@ -15,13 +15,17 @@ cilium:
|
|||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
cluster:
|
cluster:
|
||||||
|
name: {{ .Values.global.clusterName }}
|
||||||
{{- with .Values.network.cilium.cluster.id }}
|
{{- with .Values.network.cilium.cluster.id }}
|
||||||
id: {{ . }}
|
id: {{ . }}
|
||||||
|
ipam:
|
||||||
|
operator:
|
||||||
|
clusterPoolIPv4PodCIDRList:
|
||||||
|
- 10.{{ . }}.0.0/16
|
||||||
{{- end }}
|
{{- end }}
|
||||||
name: {{ $.Values.global.clusterName }}
|
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
enabled: {{ $.Values.metrics.enabled }}
|
enabled: {{ .Values.metrics.enabled }}
|
||||||
|
|
||||||
{{- with index .Values "network" "metallb" }}
|
{{- with index .Values "network" "metallb" }}
|
||||||
metallb:
|
metallb:
|
||||||
|
@ -15,7 +15,7 @@ gemini:
|
|||||||
aws-ebs-csi-driver:
|
aws-ebs-csi-driver:
|
||||||
enabled: {{ default false (index .Values "storage" "aws-ebs-csi-driver" "enabled")}}
|
enabled: {{ default false (index .Values "storage" "aws-ebs-csi-driver" "enabled")}}
|
||||||
controller:
|
controller:
|
||||||
replicaCount: {{ ternary 2 1 .Values.HighAvailableControlplane }}
|
replicaCount: {{ ternary 2 1 .Values.global.highAvailable }}
|
||||||
k8sTagClusterId: {{ .Values.global.clusterName }}
|
k8sTagClusterId: {{ .Values.global.clusterName }}
|
||||||
env:
|
env:
|
||||||
- name: AWS_ROLE_ARN
|
- name: AWS_ROLE_ARN
|
||||||
@ -25,7 +25,7 @@ aws-ebs-csi-driver:
|
|||||||
- name: AWS_STS_REGIONAL_ENDPOINTS
|
- name: AWS_STS_REGIONAL_ENDPOINTS
|
||||||
value: regional
|
value: regional
|
||||||
|
|
||||||
{{- if .Values.HighAvailableControlplane }}
|
{{- if .Values.global.highAvailable }}
|
||||||
affinity:
|
affinity:
|
||||||
podAntiAffinity:
|
podAntiAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
@ -40,7 +40,7 @@ aws-ebs-csi-driver:
|
|||||||
|
|
||||||
aws-efs-csi-driver:
|
aws-efs-csi-driver:
|
||||||
enabled: {{ default false (index .Values "storage" "aws-efs-csi-driver" "enabled")}}
|
enabled: {{ default false (index .Values "storage" "aws-efs-csi-driver" "enabled")}}
|
||||||
replicaCount: {{ ternary 2 1 .Values.HighAvailableControlplane }}
|
replicaCount: {{ ternary 2 1 .Values.global.highAvailable }}
|
||||||
controller:
|
controller:
|
||||||
extraEnv:
|
extraEnv:
|
||||||
- name: AWS_ROLE_ARN
|
- name: AWS_ROLE_ARN
|
||||||
@ -51,7 +51,7 @@ aws-efs-csi-driver:
|
|||||||
value: regional
|
value: regional
|
||||||
|
|
||||||
# The EFS controller steel needs hostnetwork and cannot update on single node control planes otherwise
|
# The EFS controller steel needs hostnetwork and cannot update on single node control planes otherwise
|
||||||
{{- if not .Values.HighAvailableControlplane }}
|
{{- if not .Values.global.highAvailable }}
|
||||||
updateStrategy: Recreate
|
updateStrategy: Recreate
|
||||||
{{- else }}
|
{{- else }}
|
||||||
affinity:
|
affinity:
|
||||||
|
@ -4,15 +4,21 @@ kubezero:
|
|||||||
defaultTargetRevision: '*'
|
defaultTargetRevision: '*'
|
||||||
gitSync: {}
|
gitSync: {}
|
||||||
|
|
||||||
HighAvailableControlplane: false
|
global:
|
||||||
|
highAvailable: false
|
||||||
|
clusterName: zdt-trial-cluster
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
enabled: true
|
enabled: true
|
||||||
targetRevision: 0.6.2
|
targetRevision: 0.6.2
|
||||||
external-dns: {}
|
external-dns:
|
||||||
forseti: {}
|
enabled: false
|
||||||
clusterBackup: {}
|
forseti:
|
||||||
aws-node-termination-handler: {}
|
enabled: false
|
||||||
|
clusterBackup:
|
||||||
|
enabled: false
|
||||||
|
aws-node-termination-handler:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
network:
|
network:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
Loading…
Reference in New Issue
Block a user