multi cluster
This commit is contained in:
17
bootstrap.sh
17
bootstrap.sh
@@ -2,7 +2,14 @@
|
||||
# in case of $'\r': command not found error, run command below first
|
||||
# sed -i 's/\r$//' ./bootstrap.sh
|
||||
|
||||
echo "running $0..."
|
||||
CLUSTER="${1:?Usage: ./bootstrap.sh <cluster> (eu|us)}"
|
||||
|
||||
echo "running $0 for cluster: ${CLUSTER}..."
|
||||
|
||||
# Source cluster config
|
||||
eval $(yq e 'to_entries | .[] | "export " + .key + "=\"" + .value + "\""' "clusters/${CLUSTER}.yaml")
|
||||
|
||||
echo "Bootstrapping cluster: ${clusterName} (${CLUSTER})..."
|
||||
|
||||
############################################################
|
||||
# Bootstrap #
|
||||
@@ -31,15 +38,15 @@ ArgoCd()
|
||||
{
|
||||
# install argocd
|
||||
echo "Installing ArgoCD..."
|
||||
CLUSTER_NAME="${CLUSTER_NAME:-dev-fd-no-svg1}"
|
||||
helm upgrade --install argocd argo-cd \
|
||||
--repo https://argoproj.github.io/argo-helm \
|
||||
--namespace argocd --create-namespace \
|
||||
--values infra/values/argocd-values.yaml \
|
||||
--set notifications.context.clusterName="$CLUSTER_NAME" \
|
||||
--values infra/values/base/argocd-values.yaml \
|
||||
--values "infra/values/${CLUSTER}/argocd-values.yaml" \
|
||||
--set notifications.context.clusterName="${clusterName}" \
|
||||
--timeout 60s --atomic
|
||||
|
||||
kubectl apply -f _app-of-apps.yaml -n argocd
|
||||
kubectl apply -f "_app-of-apps-${CLUSTER}.yaml" -n argocd
|
||||
}
|
||||
|
||||
Bootstrap
|
||||
|
||||
Reference in New Issue
Block a user