Commit 8ca64354 authored by Nane Kratzke's avatar Nane Kratzke
Browse files

versioned apps

parent 00377424
......@@ -41,18 +41,21 @@ space-container:
space-services:
stage: deploy
script:
- ROLE=data mo deploy/space-dep.yaml | kubectl delete -f - || true
- ROLE=astros mo deploy/space-dep.yaml | kubectl delete -f - || true
- ROLE=position mo deploy/space-dep.yaml | kubectl delete -f - || true
- ROLE=data mo deploy/space-svc.yaml | kubectl delete -f - || true
- ROLE=astros mo deploy/space-svc.yaml | kubectl delete -f - || true
- ROLE=position mo deploy/space-svc.yaml | kubectl delete -f - || true
- ROLE=data mo deploy/space-dep.yaml | kubectl apply -f -
- ROLE=astros mo deploy/space-dep.yaml | kubectl apply -f -
- ROLE=position mo deploy/space-dep.yaml | kubectl apply -f -
- ROLE=data mo deploy/space-svc.yaml | kubectl apply -f -
- ROLE=astros mo deploy/space-svc.yaml | kubectl apply -f -
- ROLE=position mo deploy/space-svc.yaml | kubectl apply -f -
- |
for V in "V1 V2 V3"; do
ROLE=data VERSION=$V mo deploy/space-dep.yaml | kubectl delete -f - || true
ROLE=astros VERSION=$V mo deploy/space-dep.yaml | kubectl delete -f - || true
ROLE=position VERSION=$V mo deploy/space-dep.yaml | kubectl delete -f - || true
ROLE=data VERSION=$V mo deploy/space-svc.yaml | kubectl delete -f - || true
ROLE=astros VERSION=$V mo deploy/space-svc.yaml | kubectl delete -f - || true
ROLE=position VERSION=$V mo deploy/space-svc.yaml | kubectl delete -f - || true
ROLE=data VERSION=$V mo deploy/space-dep.yaml | kubectl apply -f -
ROLE=astros VERSION=$V mo deploy/space-dep.yaml | kubectl apply -f -
ROLE=position VERSION=$V mo deploy/space-dep.yaml | kubectl apply -f -
ROLE=data VERSION=$V mo deploy/space-svc.yaml | kubectl apply -f -
ROLE=astros VERSION=$V mo deploy/space-svc.yaml | kubectl apply -f -
ROLE=position VERSION=$V mo deploy/space-svc.yaml | kubectl apply -f -
done
shutdown:
stage: teardown
......
apiVersion: apps/v1
kind: Deployment
metadata:
name: space-{{ROLE}}-deployment
name: space-{{ROLE}}-{{VERSION}}-deployment
labels:
app: {{ ROLE }}
app: {{ROLE}}
version: {{VERSION}}
spec:
replicas: 1
selector:
matchLabels:
app: {{ ROLE }}
app: {{ROLE}}
version: {{VERSION}}
template:
metadata:
labels:
app: {{ ROLE }}
app: {{ROLE}}
version: {{VERSION}}
spec:
imagePullSecrets:
- name: gitlab-registry-credentials
......
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