-
Notifications
You must be signed in to change notification settings - Fork 883
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow Traffic shaping through header based routing ALB. e2e tes…
…ts for header route Signed-off-by: Andrii Perenesenko <andrii.perenesenko@gmail.com>
- Loading branch information
1 parent
b31015b
commit b9e4021
Showing
2 changed files
with
176 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: canary-service | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 8080 | ||
targetPort: 8080 | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app: alb-rollout | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: stable-service | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 8080 | ||
targetPort: 8080 | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app: alb-rollout | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: alb-rollout-ingress | ||
annotations: | ||
alb.ingress.kubernetes.io/security-groups: 'iks-intuit-cidr-ingress-tcp-443' | ||
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-2:795188202216:certificate/27d920c5-a8a6-4210-9f31-bd4a2d439039 | ||
alb.ingress.kubernetes.io/load-balancer-attributes: access_logs.s3.enabled=false | ||
alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-2-2017-01 | ||
kubernetes.io/ingress.class: aws-alb | ||
alb.ingress.kubernetes.io/load-balancer-name: rollouts-sample | ||
alb.ingress.kubernetes.io/target-type: ip | ||
alb.ingress.kubernetes.io/healthcheck-protocol: HTTP | ||
alb.ingress.kubernetes.io/healthcheck-port: traffic-port | ||
alb.ingress.kubernetes.io/healthcheck-path: /color | ||
alb.ingress.kubernetes.io/backend-protocol: HTTP | ||
alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS": 443}]' | ||
alb.ingress.kubernetes.io/ssl-redirect: '443' | ||
alb.ingress.kubernetes.io/scheme: internet-facing | ||
alb.ingress.kubernetes.io/subnets: IngressSubnetAz1, IngressSubnetAz2, IngressSubnetAz3 | ||
spec: | ||
rules: | ||
- http: | ||
paths: | ||
- path: /* | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: action1 | ||
port: | ||
name: use-annotation | ||
|
||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Rollout | ||
metadata: | ||
name: rollouts-demo | ||
spec: | ||
replicas: 5 | ||
selector: | ||
matchLabels: | ||
app: alb-rollout | ||
template: | ||
metadata: | ||
labels: | ||
app: alb-rollout | ||
spec: | ||
containers: | ||
- name: alb-rollout | ||
image: "argoproj/rollouts-demo:yellow" | ||
ports: | ||
- name: http | ||
containerPort: 8080 | ||
protocol: TCP | ||
strategy: | ||
canary: | ||
scaleDownDelaySeconds: 5 | ||
stableService: stable-service | ||
canaryService: canary-service | ||
trafficRouting: | ||
alb: | ||
ingress: alb-rollout-ingress | ||
rootService: action1 | ||
servicePort: 8080 | ||
steps: | ||
- setWeight: 20 | ||
- pause: {} | ||
- setHeaderRouting: | ||
match: | ||
- headerName: Custom-Header | ||
headerValue: | ||
exact: Mozilla* | ||
- pause: {} | ||
- setHeaderRouting: {} | ||
- pause: {} |