Skip to content

Commit

Permalink
fix external traffic policy e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TessaIO committed Feb 9, 2023
1 parent ea06032 commit d7aadea
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
17 changes: 17 additions & 0 deletions script/test/fixtures/external-traffic-policy/output-k8s-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ spec:
kompose.service.type: loadbalancer
creationTimestamp: null
labels:
io.kompose.network/external-traffic-policy-default: "true"
io.kompose.service: front-end
spec:
containers:
Expand All @@ -65,3 +66,19 @@ spec:
restartPolicy: Always
status: {}

---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
creationTimestamp: null
name: external-traffic-policy-default
spec:
ingress:
- from:
- podSelector:
matchLabels:
io.kompose.network/external-traffic-policy-default: "true"
podSelector:
matchLabels:
io.kompose.network/external-traffic-policy-default: "true"

17 changes: 17 additions & 0 deletions script/test/fixtures/external-traffic-policy/output-k8s-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ spec:
kompose.service.type: headless
creationTimestamp: null
labels:
io.kompose.network/external-traffic-policy-default: "true"
io.kompose.service: front-end
spec:
containers:
Expand Down Expand Up @@ -94,3 +95,19 @@ spec:
status:
loadBalancer: {}

---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
creationTimestamp: null
name: external-traffic-policy-default
spec:
ingress:
- from:
- podSelector:
matchLabels:
io.kompose.network/external-traffic-policy-default: "true"
podSelector:
matchLabels:
io.kompose.network/external-traffic-policy-default: "true"

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ spec:
metadata:
creationTimestamp: null
labels:
io.kompose.network/external-traffic-policy-default: "true"
io.kompose.service: front-end
spec:
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ spec:
metadata:
creationTimestamp: null
labels:
io.kompose.network/external-traffic-policy-default: "true"
io.kompose.service: front-end
spec:
containers:
Expand Down Expand Up @@ -117,5 +118,6 @@ spec:
kind: Service
name: front-end
weight: null
status: {}
status:
ingress: null

0 comments on commit d7aadea

Please sign in to comment.