Skip to content

Commit

Permalink
do not allow start with -
Browse files Browse the repository at this point in the history
Signed-off-by: Jian Qiu <[email protected]>
  • Loading branch information
qiujian16 committed Jun 13, 2024
1 parent d8ab760 commit 905e28e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ spec:
will use to create csr.
maxLength: 571
minLength: 5
pattern: ^([a-z0-9-]+\.)+[a-z]+\/[a-z0-9-\.]+$
pattern: ^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$
type: string
subject:
description: 'subject is the user subject of the addon agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ spec:
agent will use to create csr.
maxLength: 571
minLength: 5
pattern: ^([a-z0-9-]+\.)+[a-z]+\/[a-z0-9-\.]+$
pattern: ^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$
type: string
signingCA:
description: 'SigningCA represents the reference of the
Expand Down
2 changes: 1 addition & 1 deletion addon/v1alpha1/types_addontemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ type CustomSignerRegistrationConfig struct {
// +required
// +kubebuilder:validation:MaxLength=571
// +kubebuilder:validation:MinLength=5
// +kubebuilder:validation:Pattern=^([a-z0-9-]+\.)+[a-z]+\/[a-z0-9-\.]+$
// +kubebuilder:validation:Pattern=^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$
SignerName string `json:"signerName"`

// Subject is the user subject of the addon agent to be registered to the hub.
Expand Down
2 changes: 1 addition & 1 deletion addon/v1alpha1/types_managedclusteraddon.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type RegistrationConfig struct {
// +required
// +kubebuilder:validation:MaxLength=571
// +kubebuilder:validation:MinLength=5
// +kubebuilder:validation:Pattern=^([a-z0-9-]+\.)+[a-z]+\/[a-z0-9-\.]+$
// +kubebuilder:validation:Pattern=^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$
SignerName string `json:"signerName"`

// subject is the user subject of the addon agent to be registered to the hub.
Expand Down

0 comments on commit 905e28e

Please sign in to comment.