stages: - deploy - inject - teardown variables: KUBECTL: "transit/kubectl-plus:v1.19.4" CLUSTER: "rig.th-luebeck.dev" yelb: stage: deploy image: $KUBECTL script: - NS=$(kubectl config view --minify --output 'jsonpath={..namespace}') - VHOST=yelb.$NS.$CLUSTER mo deploy/yelb.yaml | kubectl apply -f - istio: stage: inject image: $KUBECTL when: manual script: - NS=$(kubectl config view --minify --output 'jsonpath={..namespace}') - kubectl label ns $NS istio-injection=enabled --overwrite - VHOST=yelb.$NS.$CLUSTER mo deploy/yelb.yaml | kubectl delete -f - - sleep 5 - VHOST=yelb.$NS.$CLUSTER mo deploy/yelb.yaml | kubectl apply -f - shutdown: stage: teardown image: $KUBECTL when: manual script: - NS=$(kubectl config view --minify --output 'jsonpath={..namespace}') - kubectl label ns $NS istio-injection=disabled --overwrite - VHOST=yelb.$NS.$CLUSTER mo deploy/yelb.yaml | kubectl delete -f -