From c1dabdf0caa5db173f519fc9124430bda82f5f95 Mon Sep 17 00:00:00 2001 From: Erhan Cagirici Date: Fri, 13 Dec 2024 15:54:26 +0300 Subject: [PATCH] add CRD validation for XP version in ControlPlanes has no leading v Signed-off-by: Erhan Cagirici --- apis/spaces/v1beta1/controlplane_types.go | 1 + 1 file changed, 1 insertion(+) diff --git a/apis/spaces/v1beta1/controlplane_types.go b/apis/spaces/v1beta1/controlplane_types.go index ebe0425..edbae17 100644 --- a/apis/spaces/v1beta1/controlplane_types.go +++ b/apis/spaces/v1beta1/controlplane_types.go @@ -141,6 +141,7 @@ type CrossplaneAutoUpgradeSpec struct { type CrossplaneSpec struct { // Version is the version of Universal Crossplane to install. // +optional + // +kubebuilder:validation:XValidation:rule=(self.matches('^[^v].*')),message=The version must not start with a leading 'v' Version *string `json:"version,omitempty"` // AutoUpgrades defines the auto upgrade configuration for Crossplane.