generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from tssurya/add-conformance-tests-banp
Add BANP conformance tests for .Spec.Ingress and .Spec.Egress fields
- Loading branch information
Showing
24 changed files
with
1,226 additions
and
6 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
53 changes: 53 additions & 0 deletions
53
conformance/base/baseline_admin_network_policy/core-egress-sctp-rules.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,53 @@ | ||
apiVersion: policy.networking.k8s.io/v1alpha1 | ||
kind: BaselineAdminNetworkPolicy | ||
metadata: | ||
name: default | ||
spec: | ||
subject: | ||
namespaces: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-ravenclaw | ||
egress: | ||
- name: "allow-to-gryffindor-everything" | ||
action: "Allow" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-gryffindor | ||
- name: "deny-to-gryffindor-everything" | ||
action: "Deny" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-gryffindor | ||
- name: "deny-to-slytherin-at-port-9003" | ||
action: "Deny" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-slytherin | ||
ports: | ||
- portNumber: | ||
protocol: SCTP | ||
port: 9003 | ||
- name: "allow-to-hufflepuff-at-port-9003" | ||
action: "Allow" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-hufflepuff | ||
ports: | ||
- portNumber: | ||
protocol: SCTP | ||
port: 9003 | ||
- name: "deny-to-hufflepuff-everything-else" | ||
action: "Deny" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-hufflepuff |
53 changes: 53 additions & 0 deletions
53
conformance/base/baseline_admin_network_policy/core-egress-tcp-rules.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,53 @@ | ||
apiVersion: policy.networking.k8s.io/v1alpha1 | ||
kind: BaselineAdminNetworkPolicy | ||
metadata: | ||
name: default | ||
spec: | ||
subject: | ||
namespaces: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-gryffindor | ||
egress: | ||
- name: "allow-to-ravenclaw-everything" | ||
action: "Allow" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-ravenclaw | ||
- name: "deny-to-ravenclaw-everything" | ||
action: "Deny" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-ravenclaw | ||
- name: "deny-to-slytherin-at-port-80" | ||
action: "Deny" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-slytherin | ||
ports: | ||
- portNumber: | ||
protocol: TCP | ||
port: 80 | ||
- name: "allow-to-hufflepuff-at-port-8080" | ||
action: "Allow" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-hufflepuff | ||
ports: | ||
- portNumber: | ||
protocol: TCP | ||
port: 8080 | ||
- name: "deny-to-hufflepuff-everything-else" | ||
action: "Deny" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-hufflepuff |
53 changes: 53 additions & 0 deletions
53
conformance/base/baseline_admin_network_policy/core-egress-udp-rules.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,53 @@ | ||
apiVersion: policy.networking.k8s.io/v1alpha1 | ||
kind: BaselineAdminNetworkPolicy | ||
metadata: | ||
name: default | ||
spec: | ||
subject: | ||
namespaces: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-hufflepuff | ||
egress: | ||
- name: "allow-to-ravenclaw-everything" | ||
action: "Allow" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-ravenclaw | ||
- name: "deny-to-ravenclaw-everything" | ||
action: "Deny" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-ravenclaw | ||
- name: "deny-to-slytherin-at-port-5353" | ||
action: "Deny" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-slytherin | ||
ports: | ||
- portNumber: | ||
protocol: UDP | ||
port: 5353 | ||
- name: "allow-to-gryffindor-at-port-53" | ||
action: "Allow" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-gryffindor | ||
ports: | ||
- portNumber: | ||
protocol: UDP | ||
port: 53 | ||
- name: "deny-to-gryffindor-everything-else" | ||
action: "Deny" | ||
to: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-gryffindor |
53 changes: 53 additions & 0 deletions
53
conformance/base/baseline_admin_network_policy/core-ingress-sctp-rules.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,53 @@ | ||
apiVersion: policy.networking.k8s.io/v1alpha1 | ||
kind: BaselineAdminNetworkPolicy | ||
metadata: | ||
name: default | ||
spec: | ||
subject: | ||
namespaces: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-ravenclaw | ||
ingress: | ||
- name: "allow-from-gryffindor-everything" | ||
action: "Allow" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-gryffindor | ||
- name: "deny-from-gryffindor-everything" | ||
action: "Deny" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-gryffindor | ||
- name: "deny-from-slytherin-at-port-9003" | ||
action: "Deny" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-slytherin | ||
ports: | ||
- portNumber: | ||
protocol: SCTP | ||
port: 9003 | ||
- name: "allow-from-hufflepuff-at-port-9003" | ||
action: "Allow" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-hufflepuff | ||
ports: | ||
- portNumber: | ||
protocol: SCTP | ||
port: 9003 | ||
- name: "deny-from-hufflepuff-everything-else" | ||
action: "Deny" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-hufflepuff |
53 changes: 53 additions & 0 deletions
53
conformance/base/baseline_admin_network_policy/core-ingress-tcp-rules.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,53 @@ | ||
apiVersion: policy.networking.k8s.io/v1alpha1 | ||
kind: BaselineAdminNetworkPolicy | ||
metadata: | ||
name: default | ||
spec: | ||
subject: | ||
namespaces: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-gryffindor | ||
ingress: | ||
- name: "allow-from-ravenclaw-everything" | ||
action: "Allow" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-ravenclaw | ||
- name: "deny-from-ravenclaw-everything" | ||
action: "Deny" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-ravenclaw | ||
- name: "deny-from-slytherin-at-port-80" | ||
action: "Deny" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-slytherin | ||
ports: | ||
- portNumber: | ||
protocol: TCP | ||
port: 80 | ||
- name: "allow-from-hufflepuff-at-port-80" | ||
action: "Allow" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-hufflepuff | ||
ports: | ||
- portNumber: | ||
protocol: TCP | ||
port: 80 | ||
- name: "deny-from-hufflepuff-everything-else" | ||
action: "Deny" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-hufflepuff |
53 changes: 53 additions & 0 deletions
53
conformance/base/baseline_admin_network_policy/core-ingress-udp-rules.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,53 @@ | ||
apiVersion: policy.networking.k8s.io/v1alpha1 | ||
kind: BaselineAdminNetworkPolicy | ||
metadata: | ||
name: default | ||
spec: | ||
subject: | ||
namespaces: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-hufflepuff | ||
ingress: | ||
- name: "allow-from-ravenclaw-everything" | ||
action: "Allow" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-ravenclaw | ||
- name: "deny-from-ravenclaw-everything" | ||
action: "Deny" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-ravenclaw | ||
- name: "deny-from-slytherin-at-port-5353" | ||
action: "Deny" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-slytherin | ||
ports: | ||
- portNumber: | ||
protocol: UDP | ||
port: 5353 | ||
- name: "allow-from-gryffindor-at-port-53" | ||
action: "Allow" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-gryffindor | ||
ports: | ||
- portNumber: | ||
protocol: UDP | ||
port: 53 | ||
- name: "deny-from-gryffindor-everything-else" | ||
action: "Deny" | ||
from: | ||
- namespaces: | ||
namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: network-policy-conformance-gryffindor |
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
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
Oops, something went wrong.