Skip to content

Commit

Permalink
change EndPort type to *int32
Browse files Browse the repository at this point in the history
This change is for aligning with NetworkPolicyPort, this could make
the conversion from MultiNetworkPolicy to NetworkPolicyPort easier.
  • Loading branch information
Lei Huang committed Feb 28, 2024
1 parent f1873dc commit 9eda76c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/k8s.cni.cncf.io/v1beta2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type MultiNetworkPolicyPort struct {
Port *intstr.IntOrString `json:"port,omitempty"`

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

// IPBlock ...
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/k8s.cni.cncf.io/v1beta2/zz_generated.deepcopy.go

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

14 changes: 7 additions & 7 deletions pkg/client/clientset/versioned/fake/register.go

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

14 changes: 7 additions & 7 deletions pkg/client/clientset/versioned/scheme/register.go

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

2 changes: 2 additions & 0 deletions scheme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ spec:
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
Expand Down Expand Up @@ -822,6 +823,7 @@ spec:
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
Expand Down

0 comments on commit 9eda76c

Please sign in to comment.