Skip to content

Commit

Permalink
fix validation
Browse files Browse the repository at this point in the history
  • Loading branch information
jamyct committed Nov 8, 2024
1 parent 6fd1b17 commit a974e49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apis/cluster/v1/membercluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Check failure on line 69 in apis/cluster/v1/membercluster_types.go

View workflow job for this annotation

GitHub Actions / unit-tests

must apply kubebuilder:validation:items:XValidation to an array value, found

// +kubebuilder:default=60
Expand Down
2 changes: 1 addition & 1 deletion apis/cluster/v1beta1/membercluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Check failure on line 50 in apis/cluster/v1beta1/membercluster_types.go

View workflow job for this annotation

GitHub Actions / unit-tests

must apply kubebuilder:validation:items:XValidation to an array value, found

// +kubebuilder:default=60
Expand Down

0 comments on commit a974e49

Please sign in to comment.