Skip to content

Commit

Permalink
Add EndPort to v1beta1
Browse files Browse the repository at this point in the history
Add `EndPort` field to `scheme.yml` and `MultiNetworkPolicyPort` Go type.

Signed-off-by: Andrea Panattoni <[email protected]>
  • Loading branch information
zeeke committed Nov 27, 2024
1 parent f76867e commit d9c1d27
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/apis/k8s.cni.cncf.io/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ type MultiNetworkPolicyPort struct {

// +optional
Port *intstr.IntOrString `json:"port,omitempty"`

// +optional
EndPort *int32 `json:"endPort,omitempty"`
}

// IPBlock ...
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/k8s.cni.cncf.io/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions scheme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ spec:
be a numerical or named port on a pod. If this field is
not provided, this matches all port names and numbers."
x-kubernetes-int-or-string: true
endPort:
type: integer
format: int32
description: "If set, indicates that the range of ports from
port to endPort, inclusive, should be allowed by the policy.
This field cannot be defined if the port field is not
defined or if the port field is defined as a named (string)
port. The endPort must be equal or greater than port."
protocol:
description: "The protocol (TCP, UDP, or SCTP) which traffic
must match. If not specified, this field defaults to TCP."
Expand Down Expand Up @@ -373,6 +381,14 @@ spec:
be a numerical or named port on a pod. If this field is
not provided, this matches all port names and numbers."
x-kubernetes-int-or-string: true
endPort:
type: integer
format: int32
description: "If set, indicates that the range of ports from
port to endPort, inclusive, should be allowed by the policy.
This field cannot be defined if the port field is not
defined or if the port field is defined as a named (string)
port. The endPort must be equal or greater than port."
protocol:
description: "The protocol (TCP, UDP, or SCTP) which traffic
must match. If not specified, this field defaults to TCP."
Expand Down

0 comments on commit d9c1d27

Please sign in to comment.