Skip to content

Commit c1636ec

Browse files
author
Gaurav Jaswal
committed
Adding minLength validation
Signed-off-by: Gaurav Jaswal <[email protected]>
1 parent cdcdc9b commit c1636ec

3 files changed

+6
-0
lines changed

crdsv1beta1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,11 @@ spec:
203203
hubClusterArn:
204204
description: 'The arn of the hub cluster (ie: an EKS cluster). This will be required to pass information to hub, which hub will use to create IAM identities for this klusterlet. Example - arn:eks:us-west-2:12345678910:cluster/hub-cluster1.'
205205
type: string
206+
minLength: 1
206207
managedClusterArn:
207208
description: 'The arn of the managed cluster (ie: an EKS cluster). This will be required to generate the md5hash which will be used as a suffix to create IAM role on hub as well as used by kluslerlet-agent, to assume role suffixed with the md5hash, on startup. Example - arn:eks:us-west-2:12345678910:cluster/managed-cluster1.'
208209
type: string
210+
minLength: 1
209211
registrationImagePullSpec:
210212
description: RegistrationImagePullSpec represents the desired image configuration of registration agent. quay.io/open-cluster-management.io/registration:latest will be used if unspecified.
211213
type: string

operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,14 @@ spec:
311311
description: |-
312312
The arn of the hub cluster (ie: an EKS cluster). This will be required to pass information to hub, which hub will use to create IAM identities for this klusterlet.
313313
Example - arn:eks:us-west-2:12345678910:cluster/hub-cluster1.
314+
minLength: 1
314315
type: string
315316
managedClusterArn:
316317
description: |-
317318
The arn of the managed cluster (ie: an EKS cluster). This will be required to generate the md5hash which will be used as a suffix to create IAM role on hub
318319
as well as used by kluslerlet-agent, to assume role suffixed with the md5hash, on startup.
319320
Example - arn:eks:us-west-2:12345678910:cluster/managed-cluster1.
321+
minLength: 1
320322
type: string
321323
type: object
322324
type: object

operator/v1/types_klusterlet.go

+2
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,13 @@ type AwsIrsa struct {
193193
// The arn of the hub cluster (ie: an EKS cluster). This will be required to pass information to hub, which hub will use to create IAM identities for this klusterlet.
194194
// Example - arn:eks:us-west-2:12345678910:cluster/hub-cluster1.
195195
// +required
196+
// +kubebuilder:validation:MinLength=1
196197
HubClusterArn string `json:"hubClusterArn"`
197198
// The arn of the managed cluster (ie: an EKS cluster). This will be required to generate the md5hash which will be used as a suffix to create IAM role on hub
198199
// as well as used by kluslerlet-agent, to assume role suffixed with the md5hash, on startup.
199200
// Example - arn:eks:us-west-2:12345678910:cluster/managed-cluster1.
200201
// +required
202+
// +kubebuilder:validation:MinLength=1
201203
ManagedClusterArn string `json:"managedClusterArn"`
202204
}
203205

0 commit comments

Comments
 (0)