feat: add helmified and argofied vcluster setup
This commit is contained in:
Executable
+51
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
|
||||
if [ $# != 1 ]; then
|
||||
echo "usage: $0 cluster"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d chart ]; then
|
||||
echo "error: must be run from toplevel directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cluster=$1
|
||||
ns=$cluster-vcluster
|
||||
|
||||
kubectl get ns $ns 2>&1 > /dev/null || kubectl create ns $ns
|
||||
|
||||
helm template -n $ns $1 ./chart --set persistence=false | kubectl --context oceanbox apply -f -
|
||||
|
||||
# configure_cluster_files () {
|
||||
# mkdir -p _$cluster/host _$cluster/vcluster
|
||||
|
||||
# cd templates
|
||||
# for i in values.yaml host/*.yaml vcluster/*.yaml; do
|
||||
# sed "s/<x>/$cluster/g" $i > ../_$cluster/$i
|
||||
# done
|
||||
# cd ..
|
||||
# }
|
||||
|
||||
# configure_cluster_files
|
||||
|
||||
# kubectl apply -n $ns -f _$cluster/host/cnpg.yaml
|
||||
# echo "Waiting for databases to become ready..."
|
||||
# kubectl wait -n $ns --for=condition=ready=true cluster $ns-db --timeout=60s
|
||||
|
||||
# kubectl apply -n $ns -f _$cluster/host/generate-cnp-rules.yaml
|
||||
# kubectl apply -n $ns -f _$cluster/host/rbac.yaml
|
||||
# kubectl apply -n $ns -f _$cluster/host/jaeger.yaml
|
||||
|
||||
# vcluster create $cluster -n $ns --distro k3s --connect=false -f _$cluster/values.yaml
|
||||
# # helm template $cluster -n $ns -f _$cluster/values.yaml > k11n/_manifest.sh
|
||||
# # kubectl kustomize k11n > _$cluster/manifest.yaml
|
||||
# # kubectl apply -f _$cluster/manifest.yaml
|
||||
|
||||
# vcluster connect $cluster -- kubectl apply -f _$cluster/vcluster/rbac.yaml
|
||||
|
||||
# vcluster connect $cluster -- dapr init -k
|
||||
# vcluster connect $cluster -- kubectl apply -f _$cluster/vcluster/tracing.yaml
|
||||
|
||||
# ./update-kubeconfig.sh $cluster
|
||||
Reference in New Issue
Block a user