Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
Signed-off-by: zachaller <[email protected]>
  • Loading branch information
zachaller committed Sep 21, 2022
1 parent 6d30353 commit 754a5c7
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/kubectl-argo-rollouts/cmd/lint/lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func TestLintValidRollout(t *testing.T) {
"testdata/valid-ingress-smi-multi.yml",
"testdata/valid-alb-canary.yml",
"testdata/valid-nginx-canary.yml",
"testdata/valid-nginx-basic-canary.yml",
"testdata/valid-istio-v1beta1-mulitiple-virtualsvcs.yml",
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
apiVersion: v1
kind: Service
metadata:
name: nginx-rollout-stable
spec:
type: NodePort
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app: nginx-rollout
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: nginx-rollout-ingress
spec:
rules:
- http:
paths:
- path: /*
backend:
serviceName: nginx-rollout-root
servicePort: use-annotation
---
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: nginx-rollout
spec:
selector:
matchLabels:
app: nginx-rollout
template:
metadata:
labels:
app: nginx-rollout
spec:
containers:
- name: nginx-rollout
image: argoproj/rollouts-demo:blue
ports:
- name: http
containerPort: 80
protocol: TCP
resources:
requests:
memory: 16Mi
cpu: 5m
strategy:
canary:
steps:
- setWeight: 10
- pause: {}
- setWeight: 50
- pause: {}

0 comments on commit 754a5c7

Please sign in to comment.