mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-03-05 19:40:23 +00:00
route traffic based on headers and weight
This commit is contained in:
@@ -10,7 +10,7 @@ metadata:
|
||||
kind: Mapping
|
||||
name: blue
|
||||
prefix: /
|
||||
host: blue.test
|
||||
host: podinfo.test
|
||||
service: blue.default:9898
|
||||
spec:
|
||||
type: ClusterIP
|
||||
|
||||
@@ -10,8 +10,11 @@ metadata:
|
||||
kind: Mapping
|
||||
name: green
|
||||
prefix: /
|
||||
host: green.test
|
||||
host: podinfo.test
|
||||
service: green.default:9898
|
||||
weight: 50
|
||||
headers:
|
||||
X-Subscription: trial
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
@@ -20,3 +23,27 @@ spec:
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: green
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: blue-trial
|
||||
annotations:
|
||||
getambassador.io/config: |
|
||||
---
|
||||
apiVersion: ambassador/v0
|
||||
kind: Mapping
|
||||
name: blue-trial
|
||||
prefix: /
|
||||
host: podinfo.test
|
||||
service: blue.default:9898
|
||||
headers:
|
||||
X-Subscription: trial
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 9898
|
||||
targetPort: 9898
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: blue
|
||||
|
||||
Reference in New Issue
Block a user