Skip to content

[release-1.10] 🐛 Fix pattern on Cluster classNamespace field #12252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions api/v1beta1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,13 +546,15 @@ type Topology struct {
// +kubebuilder:validation:MaxLength=253
Class string `json:"class"`

// classNamespace is the namespace of the ClusterClass object to create the topology.
// If the namespace is empty or not set, it is defaulted to the namespace of the cluster object.
// Value must follow the DNS1123Subdomain syntax.
// classNamespace is the namespace of the ClusterClass that should be used for the topology.
// If classNamespace is empty or not set, it is defaulted to the namespace of the Cluster object.
// classNamespace must be a valid namespace name and because of that be at most 63 characters in length
// and it must consist only of lower case alphanumeric characters or hyphens (-), and must start
// and end with an alphanumeric character.
// +optional
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=`^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9](?:[-a-z0-9]*[a-z0-9])?)*$`
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
ClassNamespace string `json:"classNamespace,omitempty"`

// version is the Kubernetes version of the cluster.
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions config/crd/bases/cluster.x-k8s.io_clusters.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading