.gitlab-ci.yml 965 Bytes
Newer Older
Nane Kratzke's avatar
Nane Kratzke committed
1
2
stages:
    - deploy
Nane Kratzke's avatar
Nane Kratzke committed
3
    - inject
Nane Kratzke's avatar
Nane Kratzke committed
4
5
6
7
8
9
10
    - teardown

variables:
  KUBECTL: "transit/kubectl-plus:v1.19.4"
  CLUSTER: "rig.th-luebeck.dev"

yelb:
Nane Kratzke's avatar
Nane Kratzke committed
11
12
13
14
  stage: deploy
  image: $KUBECTL
  script:
    - NS=$(kubectl config view --minify --output 'jsonpath={..namespace}')
Nane Kratzke's avatar
Nane Kratzke committed
15
    - VHOST=yelb.$NS.$CLUSTER
Nane Kratzke's avatar
Nane Kratzke committed
16
17
18
19
20
21
22
23
    - mo deploy/yelb.yaml | kubectl apply -f -

istio:
  stage: inject
  image: $KUBECTL
  when: manual
  script:
    - NS=$(kubectl config view --minify --output 'jsonpath={..namespace}')
Nane Kratzke's avatar
Nane Kratzke committed
24
    - VHOST=yelb.$NS.$CLUSTER
Nane Kratzke's avatar
Nane Kratzke committed
25
26
27
28
29
30
31
32
33
34
35
    - 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:
    - NS=$(kubectl config view --minify --output 'jsonpath={..namespace}')
Nane Kratzke's avatar
Nane Kratzke committed
36
    - VHOST=yelb.$NS.$CLUSTER
Nane Kratzke's avatar
Nane Kratzke committed
37
38
    - kubectl label ns $NS istio-inject=disabled --overwrite
    - mo deploy/yelb.yaml | kubectl delete -f -