mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-01 13:53:55 +00:00
Merge pull request #97897 from knabben/sctp-netpol-test
Copying SCTP tests to Netpol e2e framework
This commit is contained in:
@@ -236,8 +236,8 @@ func GetAllowIngressByNamespace(name string, targetLabels map[string]string, pee
|
||||
return policy
|
||||
}
|
||||
|
||||
// GetAllowIngressByNamespaceAndPort allows ingress for namespace AND port
|
||||
func GetAllowIngressByNamespaceAndPort(name string, targetLabels map[string]string, peerNamespaceSelector *metav1.LabelSelector, port *intstr.IntOrString) *networkingv1.NetworkPolicy {
|
||||
// GetAllowIngressByNamespaceAndPort allows ingress for namespace AND port AND protocol
|
||||
func GetAllowIngressByNamespaceAndPort(name string, targetLabels map[string]string, peerNamespaceSelector *metav1.LabelSelector, port *intstr.IntOrString, protocol *v1.Protocol) *networkingv1.NetworkPolicy {
|
||||
policy := &networkingv1.NetworkPolicy{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: name,
|
||||
@@ -251,7 +251,10 @@ func GetAllowIngressByNamespaceAndPort(name string, targetLabels map[string]stri
|
||||
NamespaceSelector: peerNamespaceSelector,
|
||||
}},
|
||||
Ports: []networkingv1.NetworkPolicyPort{
|
||||
{Port: port},
|
||||
{
|
||||
Port: port,
|
||||
Protocol: protocol,
|
||||
},
|
||||
},
|
||||
}},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user