diff --git a/_argoapp_patch.yaml b/_argoapp_patch.yaml new file mode 100644 index 00000000..4a1ceffe --- /dev/null +++ b/_argoapp_patch.yaml @@ -0,0 +1,7 @@ +spec: + syncWindows: + - kind: deny + schedule: '0 * * * *' + duration: 24h + namespaces: + - '*' diff --git a/admin/dev_apply.sh b/admin/dev_apply.sh index 91cd4b64..399d1758 100755 --- a/admin/dev_apply.sh +++ b/admin/dev_apply.sh @@ -45,6 +45,7 @@ helm template $CHARTS/kubezero -f $WORKDIR/kubezero-values.yaml --kube-version $ # Root KubeZero apply directly and exit if [ ${ARTIFACTS[0]} == "kubezero" ]; then + [ -f $CHARTS/kubezero/hooks.d/pre-install.sh ] && . $CHARTS/kubezero/hooks.d/pre-install.sh kubectl replace -f $WORKDIR/kubezero/templates $(field_manager $ARGOCD) exit $? diff --git a/admin/upgrade_cluster.sh b/admin/upgrade_cluster.sh index 9a53cc35..8dc0dda3 100755 --- a/admin/upgrade_cluster.sh +++ b/admin/upgrade_cluster.sh @@ -47,6 +47,9 @@ echo "Applying remaining KubeZero modules..." control_plane_upgrade "apply_cert-manager, apply_istio, apply_istio-ingress, apply_istio-private-ingress, apply_logging, apply_metrics, apply_telemetry, apply_argo" +# we replace the project during v1.31 so disable again +[ "$ARGOCD" == "true" ] && disable_argo + # Final step is to commit the new argocd kubezero app kubectl get app kubezero -n argocd -o yaml | yq 'del(.status) | del(.metadata) | del(.operation) | .metadata.name="kubezero" | .metadata.namespace="argocd"' | yq 'sort_keys(..)' > $ARGO_APP diff --git a/charts/kubezero/hooks.d/pre-install.sh b/charts/kubezero/hooks.d/pre-install.sh index 050c5538..c18b31f0 100644 --- a/charts/kubezero/hooks.d/pre-install.sh +++ b/charts/kubezero/hooks.d/pre-install.sh @@ -2,7 +2,5 @@ kubectl get secret kubezero-secrets -n kubezero && rc=$? || rc=$? if [ $rc != 0 ]; then - kubectl create secret generic kubezero-secrets -n kubezero \ - --from-literal=argo-cd.adminPassword="geheim" \ - --from-literal=argo-cd.kubezero.sshPrivateKey="--GEHEIM---" + kubectl create secret generic kubezero-secrets -n kubezero fi diff --git a/charts/kubezero/templates/_app.tpl b/charts/kubezero/templates/_app.tpl index 6554f40f..ae125385 100644 --- a/charts/kubezero/templates/_app.tpl +++ b/charts/kubezero/templates/_app.tpl @@ -25,7 +25,7 @@ spec: repoURL: {{ default "https://cdn.zero-downtime.net/charts" (index .Values $name "repository") }} targetRevision: {{ default "HEAD" ( index .Values $name "targetRevision" ) | quote }} helm: - skipTests: true + #skipTests: true valuesObject: {{- include (print $name "-values") $ | nindent 8 }}