fix: various tweaks for 1.31

This commit is contained in:
Stefan Reimer 2025-02-18 20:08:53 +00:00
parent 06ee2841f1
commit bcc3bb338e
7 changed files with 16 additions and 39 deletions

View File

@ -134,9 +134,6 @@ control_plane_upgrade() {
yq ".spec.source.helm.valuesObject |= load(\"$WORKDIR/kubezero-values.yaml\") | .spec.source.targetRevision = strenv(kubezero_chart_version)" \
> $WORKDIR/new-argocd-app.yaml
kubectl replace -f $WORKDIR/new-argocd-app.yaml
# finally remove annotation to allow argo to sync again
kubectl patch app kubezero -n argocd --type json -p='[{"op": "remove", "path": "/metadata/annotations"}]' || true
fi
pre_kubeadm

View File

@ -8,6 +8,13 @@ import yaml
def migrate(values):
"""Actual changes here"""
# remove syncOptions from root app
try:
if values["kubezero"]["syncPolicy"]:
values["kubezero"].pop("syncPolicy")
except KeyError:
pass
return values

View File

@ -1,3 +1,4 @@
{{- if index .Values "cloudnative-pg" "enabled" }}
apiVersion: postgresql.cnpg.io/v1
kind: ClusterImageCatalog
metadata:
@ -14,3 +15,4 @@ spec:
image: ghcr.io/cloudnative-pg/postgresql:16.6-33-bookworm@sha256:7dfda49485274b61ada9bb347caffac01dee442ffd119eb19317a2692347657b
- major: 17
image: ghcr.io/cloudnative-pg/postgresql:17.2-33-bookworm@sha256:52b78e8e4a297e268be168c7e107a2117072dc38f4a11d9d056ff0cc13d4007f
{{- end }}

View File

@ -1,30 +0,0 @@
# Skeleton template to put into each cluster git folder
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: kubezero
namespace: argocd
spec:
project: kubezero
source:
repoURL: https://cdn.zero-downtime.net/charts
chart: kubezero
targetRevision: {{ .Values.kubezero.version }}
helm:
parameters:
# We use this to detect if we are called from ArgoCD
- name: argocdAppName
value: $ARGOCD_APP_NAME
# This breaks the recursion, otherwise we install another kubezero project and app
- name: installKubeZero
value: "false"
values: |
{{- toYaml .Values | nindent 8 }}
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true

View File

@ -33,14 +33,14 @@ spec:
server: {{ .Values.kubezero.server }}
namespace: {{ default "kube-system" ( index .Values $name "namespace" ) }}
revisionHistoryLimit: 2
syncPolicy:
automated:
prune: true
syncOptions:
- ServerSideApply=true
- CreateNamespace=true
{{- with .Values.kubezero.syncPolicy }}
{{- toYaml . | nindent 4 }}
{{- end }}
- ApplyOutOfSyncOnly=true
{{- include (print $name "-argo") $ }}
{{- end }}

View File

@ -61,7 +61,8 @@ argocd-apps:
namespace: argocd
syncPolicy:
{{- toYaml (default dict .Values.kubezero.syncPolicy) | nindent 8 }}
automated:
prune: true
argocd-image-updater:
enabled: {{ default "false" (index .Values "argo" "argocd-image-updater" "enabled") }}

View File

@ -49,7 +49,7 @@ cert-manager:
{{- if eq .Values.global.platform "gke" }}
serviceAccount:
annotations:
iam.gke.io/gcp-service-account: "dns01-solver@{{ .Values.global.gcp.projectId }}.iam.gserviceaccount.com"
iam.gke.io/gcp-service-account: "dns01-solver-cert-manager@{{ .Values.global.gcp.projectId }}.iam.gserviceaccount.com"
{{- end }}
prometheus: