diff --git a/apis/cluster/v1/membercluster_types.go b/apis/cluster/v1/membercluster_types.go index 928f3e8d7..3fbba702b 100644 --- a/apis/cluster/v1/membercluster_types.go +++ b/apis/cluster/v1/membercluster_types.go @@ -65,7 +65,7 @@ type MemberClusterSpec struct { // The identity used by the member cluster to access the hub cluster. // The hub agents deployed on the hub cluster will automatically grant the minimal required permissions to this identity for the member agents deployed on the member cluster to access the hub cluster. // +required - // +kubebuilder:validation:items:XValidation:fieldPath="Name",message="Name of the object should be restricted to 63",rule="length(self) <= 63" on rbacv1.Subject + // +kubebuilder:validation:items:XValidation:rule="length(self.Name) <= 63",message="Name of the object should be restricted to 63" Identity rbacv1.Subject `json:"identity"` // +kubebuilder:default=60 diff --git a/apis/cluster/v1beta1/membercluster_types.go b/apis/cluster/v1beta1/membercluster_types.go index c3464f6b0..698aad105 100644 --- a/apis/cluster/v1beta1/membercluster_types.go +++ b/apis/cluster/v1beta1/membercluster_types.go @@ -46,7 +46,7 @@ type MemberClusterSpec struct { // The identity used by the member cluster to access the hub cluster. // The hub agents deployed on the hub cluster will automatically grant the minimal required permissions to this identity for the member agents deployed on the member cluster to access the hub cluster. // +required - // +kubebuilder:validation:items:XValidation:fieldPath="Name",message="Name of the object should be restricted to 63",rule="length(self) <= 63" on rbacv1.Subject + // +kubebuilder:validation:items:XValidation:rule="length(self.Name) <= 63",message="Name of the object should be restricted to 63" Identity rbacv1.Subject `json:"identity"` // +kubebuilder:default=60