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

istio virtual service

parent 5f0a587b
......@@ -4,6 +4,7 @@ stages:
- prepare
- build
- deploy
- traffic
- teardown
labeling:
......@@ -58,6 +59,17 @@ space-services:
ROLE=position VERSION=$V mo deploy/space-svc.yaml | kubectl apply -f -
done
space-traffic:
stage: traffic
when: manual
script:
- |
for R in data astros destination
do
ROLE=$R mo deploy/space-istio.yaml | kubectl delete -f - || true
ROLE=$R mo deploy/space-istio.yaml | kubectl apply -f -
done
shutdown:
stage: teardown
when: manual
......@@ -73,4 +85,9 @@ shutdown:
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
done
- |
for R in data astros destination
do
ROLE=$R mo deploy/space-istio.yaml | kubectl delete -f - || true
done
\ No newline at end of file
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: space-{{ROLE}}-rule
spec:
host: space-{{ROLE}}-svc
subsets:
- name: v1
labels:
version: v1
- name: v2
labels:
version: v2
- name: v3
labels:
version: v3
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: space-{{ROLE}}-vsvc
spec:
hosts:
- space-{{ROLE}}-svc
http:
- name: "default"
route:
- weight: 70
destination:
host: space-{{ROLE}}-svc
subset: v1
- weight: 20
destination:
host: space-{{ROLE}}-svc
subset: v2
- weight: 10
destination:
host: space-{{ROLE}}-svc
subset: v3
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