diff --git a/svc-deploy b/svc-deploy index 8962985d8..01bd2cda7 100755 --- a/svc-deploy +++ b/svc-deploy @@ -1,10 +1,21 @@ #!/bin/bash +# deploy a service to a cluster +# ./svc-deploy +# this script expects the to contain a Makefile.tmpl.mk template that can +# be processed with ./templatized according to config/config.yml + cd $(dirname "$(realpath "${BASH_SOURCE[0]}")") export DEPLOY_ENV=$1 export DIR=$2 export CLUSTER=$3 + +if [[ "$CLUSTER" != "svc" && "$CLUSTER" != "mgmt" ]]; then + echo "Error: CLUSTER must be either 'svc' or 'mgmt'." + exit 1 +fi + export KUBECONFIG=$(./dev-infrastructure/make $DEPLOY_ENV $CLUSTER.aks.kubeconfigfile) ./templatize $DEPLOY_ENV $DIR/Makefile.tmpl.mk $DIR/Makefile