drop UID from the IPAddress.Spec.ParentRef

This field is not needed, IPAddresses are unique and
the name is canonicalized to avoid duplicates.

Change-Id: Iccaaf5d55e2af61fea7af9abd39584a80ed4054e
This commit is contained in:
Antonio Ojea 2023-03-15 08:51:26 +00:00
parent f538be659c
commit b7ee8e8422
4 changed files with 0 additions and 10 deletions

View File

@ -18,7 +18,6 @@ package networking
import ( import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/intstr"
api "k8s.io/kubernetes/pkg/apis/core" api "k8s.io/kubernetes/pkg/apis/core"
) )
@ -695,9 +694,6 @@ type ParentReference struct {
Namespace string Namespace string
// Name is the name of the object being referenced. // Name is the name of the object being referenced.
Name string Name string
// UID is the uid of the object being referenced.
// +optional
UID types.UID
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

View File

@ -552,7 +552,6 @@ func serviceToRef(svc *v1.Service) *networkingv1alpha1.ParentReference {
Resource: "services", Resource: "services",
Namespace: svc.Namespace, Namespace: svc.Namespace,
Name: svc.Name, Name: svc.Name,
UID: svc.UID,
} }
} }

View File

@ -571,6 +571,5 @@ func serviceToRef(svc *api.Service) *networkingv1alpha1.ParentReference {
Resource: "services", Resource: "services",
Namespace: svc.Namespace, Namespace: svc.Namespace,
Name: svc.Name, Name: svc.Name,
UID: svc.UID,
} }
} }

View File

@ -19,7 +19,6 @@ package v1alpha1
import ( import (
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
) )
// +genclient // +genclient
@ -143,9 +142,6 @@ type ParentReference struct {
// Name is the name of the object being referenced. // Name is the name of the object being referenced.
// +required // +required
Name string `json:"name,omitempty" protobuf:"bytes,4,opt,name=name"` Name string `json:"name,omitempty" protobuf:"bytes,4,opt,name=name"`
// UID is the uid of the object being referenced.
// +optional
UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object