-
Notifications
You must be signed in to change notification settings - Fork 867
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(trafficrouting): apply stable selectors on canary service on roll…
…out abort #2781 (#2818) * Re-apply stable to simple canary service on abort when no traffic routing is used fixes #2781 * remove redundant block of code Signed-off-by: mitchell amihod <[email protected]> * Add an e2e covering the fix. Basically a copy/pasta of test that was checking for this when using traffic routing Signed-off-by: mitchell amihod <[email protected]> --------- Signed-off-by: mitchell amihod <[email protected]>
- Loading branch information
Showing
5 changed files
with
247 additions
and
18 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
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
91 changes: 91 additions & 0 deletions
91
test/e2e/functional/canary-scaledownonabortnotrafficrouting.yaml
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,91 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: canary-scaledowndelay-root | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 80 | ||
targetPort: http | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app: canary-scaledowndelay | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: canary-scaledowndelay-canary | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 80 | ||
targetPort: http | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app: canary-scaledowndelay | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: canary-scaledowndelay-stable | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 80 | ||
targetPort: http | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app: canary-scaledowndelay | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: canary-scaledowndelay-ingress | ||
annotations: | ||
kubernetes.io/ingress.class: alb | ||
spec: | ||
rules: | ||
- http: | ||
paths: | ||
- path: /* | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: canary-scaledowndelay-root | ||
port: | ||
name: use-annotation | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Rollout | ||
metadata: | ||
name: canary-scaledownd-on-abort | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: canary-scaledowndelay | ||
template: | ||
metadata: | ||
labels: | ||
app: canary-scaledowndelay | ||
spec: | ||
containers: | ||
- name: canary-scaledowndelay | ||
image: nginx:1.19-alpine | ||
ports: | ||
- name: http | ||
containerPort: 80 | ||
protocol: TCP | ||
resources: | ||
requests: | ||
memory: 16Mi | ||
cpu: 5m | ||
strategy: | ||
canary: | ||
canaryService: canary-scaledowndelay-canary | ||
stableService: canary-scaledowndelay-stable | ||
steps: | ||
- setWeight: 50 | ||
- pause: {} |