Commit ba728974 authored by Nane Kratzke's avatar Nane Kratzke
Browse files

interactive istio injection

parent 6fc1cb20
stages:
- deploy
- inject
- teardown
variables:
......@@ -7,9 +8,31 @@ variables:
CLUSTER: "rig.th-luebeck.dev"
yelb:
stage: deploy
image: $KUBECTL
script:
- NS=$(kubectl config view --minify --output 'jsonpath={..namespace}')
- VHOST=yelb.$NS.$CLUSTER VHOST2=yelb.$NS.$CLUSTER mo deploy/yelb.yaml
- VHOST=yelb.$NS.$CLUSTER VHOST2=yelb.$NS.$CLUSTER mo deploy/yelb.yaml | kubectl apply -f -
stage: deploy
image: $KUBECTL
script:
- VHOST=yelb.$NS.$CLUSTER
- NS=$(kubectl config view --minify --output 'jsonpath={..namespace}')
- mo deploy/yelb.yaml | kubectl apply -f -
istio:
stage: inject
image: $KUBECTL
when: manual
script:
- VHOST=yelb.$NS.$CLUSTER
- NS=$(kubectl config view --minify --output 'jsonpath={..namespace}')
- kubectl label ns $NS istio-inject=enabled --overwrite
- mo deploy/yelb.yaml | kubectl delete -f -
- sleep 5
- mo deploy/yelb.yaml | kubectl apply -f -
shutdown:
stage: teardown
image: $KUBECTL
when: manual
script:
- VHOST=yelb.$NS.$CLUSTER
- NS=$(kubectl config view --minify --output 'jsonpath={..namespace}')
- kubectl label ns $NS istio-inject=disabled --overwrite
- mo deploy/yelb.yaml | kubectl delete -f -
......@@ -78,8 +78,7 @@ spec:
number: 80
tls:
- secretName: yelb-ingress-cert
hosts:
- {{ VHOST2 }}
hosts: ["{{ VHOST }}"]
---
apiVersion: apps/v1
kind: Deployment
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment