Created
November 5, 2021 15:58
-
-
Save xeviknal/9ab154d6e34c9101b54e076a16645adb to your computer and use it in GitHub Desktop.
Argo Rollouts - istio Subset traffic level splitting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: argoproj.io/v1alpha1 | |
kind: Rollout | |
metadata: | |
name: rollouts-demo | |
spec: | |
replicas: 1 | |
strategy: | |
canary: | |
steps: | |
- setWeight: 5 | |
- pause: {} | |
- setWeight: 15 | |
- pause: | |
duration: 10 | |
- setWeight: 25 | |
- pause: {} | |
- setWeight: 55 | |
- pause: | |
duration: 10 | |
- setWeight: 75 | |
- pause: {} | |
trafficRouting: | |
istio: | |
destinationRule: | |
canarySubsetName: canary | |
name: rollout-destrule | |
stableSubsetName: stable | |
virtualService: | |
name: rollout-vsvc | |
routes: | |
- primary | |
revisionHistoryLimit: 2 | |
selector: | |
matchLabels: | |
app: rollouts-demo | |
template: | |
metadata: | |
labels: | |
app: rollouts-demo | |
istio-injection: enabled | |
spec: | |
containers: | |
- name: rollouts-demo | |
image: argoproj/rollouts-demo:blue | |
ports: | |
- name: http | |
containerPort: 8080 | |
protocol: TCP | |
resources: | |
requests: | |
memory: 32Mi | |
cpu: 5m | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: rollouts-demo | |
spec: | |
ports: | |
- port: 80 | |
targetPort: http | |
protocol: TCP | |
name: http | |
selector: | |
app: rollouts-demo | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: rollout-vsvc | |
spec: | |
gateways: | |
- rollouts-demo-gateway | |
hosts: | |
- istio-rollout.dev.argoproj.io | |
http: | |
- name: primary # referenced in canary.trafficRouting.istio.virtualService.routes | |
route: | |
- destination: | |
host: rollouts-demo | |
subset: stable # referenced in canary.trafficRouting.istio.destinationRule.stableSubsetName | |
weight: 100 | |
- destination: | |
host: rollouts-demo | |
subset: canary # referenced in canary.trafficRouting.istio.destinationRule.canarySubsetName | |
weight: 0 | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: DestinationRule | |
metadata: | |
name: rollout-destrule | |
spec: | |
host: rollouts-demo | |
subsets: | |
- name: canary # referenced in canary.trafficRouting.istio.destinationRule.canarySubsetName | |
labels: # labels will be injected with canary rollouts-pod-template-hash value | |
app: rollouts-demo | |
- name: stable # referenced in canary.trafficRouting.istio.destinationRule.stableSubsetName | |
labels: # labels will be injected with stable rollouts-pod-template-hash value | |
app: rollouts-demo | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: Gateway | |
metadata: | |
name: rollouts-demo-gateway | |
spec: | |
selector: | |
istio: ingressgateway # use istio default controller | |
servers: | |
- port: | |
number: 80 | |
name: http | |
protocol: HTTP | |
hosts: | |
- "*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @xeviknal The current Implementation will not work with an
AnalysisTemplate
I think as right now there is no way to query thestable
andcanary
subsets metrics if you do not have aversion
label.