refactor istio case to include queryParams and path
Signed-off-by: Megrez Lu <lujiajing1126@gmail.com>
This commit is contained in:
parent
d0fad8d974
commit
bed81a6f55
File diff suppressed because it is too large
Load Diff
|
|
@ -1,35 +1,34 @@
|
|||
apiVersion: rollouts.kruise.io/v1beta1
|
||||
kind: Rollout
|
||||
metadata:
|
||||
name: rollouts-demo
|
||||
annotations:
|
||||
rollouts.kruise.io/rolling-style: canary
|
||||
spec:
|
||||
disabled: false
|
||||
workloadRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: echoserver
|
||||
strategy:
|
||||
canary:
|
||||
steps:
|
||||
apiVersion: rollouts.kruise.io/v1beta1
|
||||
kind: Rollout
|
||||
metadata:
|
||||
name: rollouts-demo
|
||||
spec:
|
||||
disabled: false
|
||||
workloadRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: echoserver
|
||||
strategy:
|
||||
canary:
|
||||
enableExtraWorkloadForCanary: true
|
||||
steps:
|
||||
- replicas: 1
|
||||
matches:
|
||||
- headers:
|
||||
- type: Exact
|
||||
name: user-agent
|
||||
value: pc
|
||||
- queryParams:
|
||||
- type: Exact
|
||||
name: user-agent
|
||||
value: pc
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /v2
|
||||
- headers:
|
||||
- type: Exact
|
||||
name: user-agent
|
||||
value: pc
|
||||
- queryParams:
|
||||
- type: Exact
|
||||
name: user-agent
|
||||
value: pc
|
||||
- path:
|
||||
value: /pc
|
||||
- replicas: "50%"
|
||||
trafficRoutings:
|
||||
traffic: "50%"
|
||||
trafficRoutings:
|
||||
- service: echoserver
|
||||
customNetworkRefs:
|
||||
- apiVersion: networking.istio.io/v1alpha3
|
||||
kind: VirtualService
|
||||
name: vs-demo
|
||||
- apiVersion: networking.istio.io/v1alpha3
|
||||
kind: VirtualService
|
||||
name: vs-demo
|
||||
|
|
@ -1,17 +1,18 @@
|
|||
apiVersion: rollouts.kruise.io/v1beta1
|
||||
kind: Rollout
|
||||
metadata:
|
||||
name: rollouts-demo
|
||||
annotations:
|
||||
rollouts.kruise.io/rolling-style: canary
|
||||
rollouts.kruise.io/trafficrouting: tr-demo
|
||||
spec:
|
||||
disabled: false
|
||||
workloadRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: echoserver
|
||||
strategy:
|
||||
canary:
|
||||
steps:
|
||||
- replicas: 1
|
||||
apiVersion: rollouts.kruise.io/v1alpha1
|
||||
kind: Rollout
|
||||
metadata:
|
||||
name: rollouts-demo
|
||||
annotations:
|
||||
rollouts.kruise.io/rolling-style: canary
|
||||
rollouts.kruise.io/trafficrouting: tr-demo
|
||||
spec:
|
||||
disabled: false
|
||||
objectRef:
|
||||
workloadRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: echoserver
|
||||
strategy:
|
||||
canary:
|
||||
steps:
|
||||
- replicas: 1
|
||||
|
|
@ -17,7 +17,7 @@ spec:
|
|||
spec:
|
||||
containers:
|
||||
- name: echoserver
|
||||
image: cilium/echoserver:latest
|
||||
image: jmalloc/echo-server:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
|
|
|
|||
|
|
@ -1,29 +1,25 @@
|
|||
apiVersion: rollouts.kruise.io/v1beta1
|
||||
apiVersion: rollouts.kruise.io/v1alpha1
|
||||
kind: Rollout
|
||||
metadata:
|
||||
name: rollouts-demo
|
||||
spec:
|
||||
workloadRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: echoserver
|
||||
objectRef:
|
||||
workloadRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: echoserver
|
||||
strategy:
|
||||
canary:
|
||||
steps:
|
||||
- replicas: "20%"
|
||||
weight: "20%"
|
||||
- weight: 20
|
||||
pause: {}
|
||||
- replicas: "40%"
|
||||
weight: "40%"
|
||||
- weight: 40
|
||||
pause: {duration: 10}
|
||||
- replicas: "60%"
|
||||
weight: "60%"
|
||||
- weight: 60
|
||||
pause: {duration: 10}
|
||||
- replicas: "80%"
|
||||
weight: "80%"
|
||||
- weight: 80
|
||||
pause: {duration: 10}
|
||||
- replicas: "100%"
|
||||
weight: "100%"
|
||||
- weight: 100
|
||||
pause: {duration: 0}
|
||||
trafficRoutings:
|
||||
- service: echoserver
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
apiVersion: rollouts.kruise.io/v1beta1
|
||||
apiVersion: rollouts.kruise.io/v1alpha1
|
||||
kind: Rollout
|
||||
metadata:
|
||||
name: rollouts-test
|
||||
|
|
@ -8,13 +8,14 @@ metadata:
|
|||
annotations:
|
||||
rollouts.kruise.io/rolling-style: partition
|
||||
spec:
|
||||
# rollout of published workloads, currently only supports Deployment, CloneSet, StatefulSet, Advanced StatefulSet
|
||||
workloadRef:
|
||||
apiVersion: apps.kruise.io/v1alpha1
|
||||
kind: DaemonSet
|
||||
name: fluentd-elasticsearch
|
||||
objectRef:
|
||||
# rollout of published workloads, currently only supports Deployment, CloneSet, StatefulSet, Advanced StatefulSet
|
||||
workloadRef:
|
||||
apiVersion: apps.kruise.io/v1alpha1
|
||||
kind: DaemonSet
|
||||
name: fluentd-elasticsearch
|
||||
strategy:
|
||||
canary:
|
||||
steps:
|
||||
- replicas: 1
|
||||
- replicas: "100%"
|
||||
- replicas: 100%
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
apiVersion: rollouts.kruise.io/v1beta1
|
||||
apiVersion: rollouts.kruise.io/v1alpha1
|
||||
kind: Rollout
|
||||
metadata:
|
||||
name: rollouts-test
|
||||
|
|
@ -8,14 +8,15 @@ metadata:
|
|||
annotations:
|
||||
rollouts.kruise.io/rolling-style: partition
|
||||
spec:
|
||||
# rollout of published workloads, currently only supports Deployment, CloneSet, StatefulSet, Advanced StatefulSet
|
||||
workloadRef:
|
||||
apiVersion: apps.kruise.io/v1alpha1
|
||||
kind: DaemonSet
|
||||
name: fluentd-elasticsearch
|
||||
objectRef:
|
||||
# rollout of published workloads, currently only supports Deployment, CloneSet, StatefulSet, Advanced StatefulSet
|
||||
workloadRef:
|
||||
apiVersion: apps.kruise.io/v1alpha1
|
||||
kind: DaemonSet
|
||||
name: fluentd-elasticsearch
|
||||
strategy:
|
||||
canary:
|
||||
steps:
|
||||
- replicas: 1
|
||||
- replicas: 2
|
||||
- replicas: "100%"
|
||||
- replicas: 100%
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
apiVersion: rollouts.kruise.io/v1beta1
|
||||
apiVersion: rollouts.kruise.io/v1alpha1
|
||||
kind: Rollout
|
||||
metadata:
|
||||
name: rollouts-demo
|
||||
|
|
@ -7,12 +7,13 @@ metadata:
|
|||
rollouts.kruise.io/rolling-style: partition
|
||||
spec:
|
||||
disabled: false
|
||||
workloadRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: workload-demo
|
||||
objectRef:
|
||||
workloadRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: workload-demo
|
||||
strategy:
|
||||
canary:
|
||||
steps:
|
||||
- replicas: 2
|
||||
- replicas: "50%"
|
||||
- replicas: 50%
|
||||
|
|
|
|||
Loading…
Reference in New Issue