diff --git a/pkg/apis/k8s.cni.cncf.io/v1beta2/types.go b/pkg/apis/k8s.cni.cncf.io/v1beta2/types.go index da2eae3..a4a2577 100644 --- a/pkg/apis/k8s.cni.cncf.io/v1beta2/types.go +++ b/pkg/apis/k8s.cni.cncf.io/v1beta2/types.go @@ -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 ... diff --git a/pkg/apis/k8s.cni.cncf.io/v1beta2/zz_generated.deepcopy.go b/pkg/apis/k8s.cni.cncf.io/v1beta2/zz_generated.deepcopy.go index 0fd3494..b36f850 100644 --- a/pkg/apis/k8s.cni.cncf.io/v1beta2/zz_generated.deepcopy.go +++ b/pkg/apis/k8s.cni.cncf.io/v1beta2/zz_generated.deepcopy.go @@ -215,7 +215,7 @@ func (in *MultiNetworkPolicyPort) DeepCopyInto(out *MultiNetworkPolicyPort) { } if in.EndPort != nil { in, out := &in.EndPort, &out.EndPort - *out = new(int) + *out = new(int32) **out = **in } return diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index bd4f6bb..df7d084 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -39,14 +39,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index 1ddd304..ca9dbcb 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -39,14 +39,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/scheme.yml b/scheme.yml index ff7f800..65cf6be 100644 --- a/scheme.yml +++ b/scheme.yml @@ -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 @@ -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