Skip to content

Commit a6d2c54

Browse files
authored
Merge pull request #24 from zeeke/v1beta1-endport
Add EndPort to `v1beta1`
2 parents f76867e + d9c1d27 commit a6d2c54

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

pkg/apis/k8s.cni.cncf.io/v1beta1/types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ type MultiNetworkPolicyPort struct {
9898

9999
// +optional
100100
Port *intstr.IntOrString `json:"port,omitempty"`
101+
102+
// +optional
103+
EndPort *int32 `json:"endPort,omitempty"`
101104
}
102105

103106
// IPBlock ...

pkg/apis/k8s.cni.cncf.io/v1beta1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scheme.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ spec:
5959
be a numerical or named port on a pod. If this field is
6060
not provided, this matches all port names and numbers."
6161
x-kubernetes-int-or-string: true
62+
endPort:
63+
type: integer
64+
format: int32
65+
description: "If set, indicates that the range of ports from
66+
port to endPort, inclusive, should be allowed by the policy.
67+
This field cannot be defined if the port field is not
68+
defined or if the port field is defined as a named (string)
69+
port. The endPort must be equal or greater than port."
6270
protocol:
6371
description: "The protocol (TCP, UDP, or SCTP) which traffic
6472
must match. If not specified, this field defaults to TCP."
@@ -373,6 +381,14 @@ spec:
373381
be a numerical or named port on a pod. If this field is
374382
not provided, this matches all port names and numbers."
375383
x-kubernetes-int-or-string: true
384+
endPort:
385+
type: integer
386+
format: int32
387+
description: "If set, indicates that the range of ports from
388+
port to endPort, inclusive, should be allowed by the policy.
389+
This field cannot be defined if the port field is not
390+
defined or if the port field is defined as a named (string)
391+
port. The endPort must be equal or greater than port."
376392
protocol:
377393
description: "The protocol (TCP, UDP, or SCTP) which traffic
378394
must match. If not specified, this field defaults to TCP."

0 commit comments

Comments
 (0)