Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EndPort to v1beta1 #24

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading