NG: app-of-apps CORE
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 24s
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 24s
This commit is contained in:
1 parent
cf88753ff5
commit
99e1818572
34 files changed
+224
-124
No files matched your search
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# Brings the whole core state up on an empty cluster:
|
||||
# k8s-ng/bootstrap/bootstrap.sh <kube-context>
|
||||
# Installs Argo CD (the only thing that cannot install itself) and applies the
|
||||
# root application; Argo CD then pulls every core application in wave order.
|
||||
set -euo pipefail
|
||||
|
||||
ctx=${1:?usage: bootstrap.sh <kube-context>}
|
||||
here=$(cd "$(dirname "$0")" && pwd)
|
||||
k="kubectl --context $ctx"
|
||||
|
||||
# Render in a scratch copy so kustomize does not leave downloaded charts in the repo.
|
||||
tmp=$(mktemp -d)
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
cp -r "$here/../core/argocd" "$tmp/argocd"
|
||||
kubectl kustomize --enable-helm "$tmp/argocd" > "$tmp/argocd.yaml"
|
||||
|
||||
$k create namespace argocd --dry-run=client -o yaml | $k apply -f -
|
||||
# CRDs must exist before the Argo CD objects that use them: apply twice.
|
||||
$k apply --server-side --force-conflicts -f "$tmp/argocd.yaml" >/dev/null 2>&1 || true
|
||||
sleep 8
|
||||
$k apply --server-side --force-conflicts -f "$tmp/argocd.yaml"
|
||||
$k -n argocd rollout status deploy --timeout=300s
|
||||
$k -n argocd rollout status statefulset --timeout=300s
|
||||
|
||||
$k apply --server-side --force-conflicts -f "$here/root.yaml"
|
||||
echo "Core state requested. Watch it with: $k -n argocd get app"
|
||||
Reference in new issue
Block a user