diff --git a/deploy/crd/crd-operating-system-profile.yaml b/deploy/crd/crd-operating-system-profile.yaml index ae96cc21..80bcc251 100644 --- a/deploy/crd/crd-operating-system-profile.yaml +++ b/deploy/crd/crd-operating-system-profile.yaml @@ -252,3 +252,4 @@ spec: version: description: Version is the version of the operating System Profile type: string + pattern: v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ diff --git a/deploy/osps/default/osp-amzn2.yaml b/deploy/osps/default/osp-amzn2.yaml index 41d75799..36857507 100644 --- a/deploy/osps/default/osp-amzn2.yaml +++ b/deploy/osps/default/osp-amzn2.yaml @@ -20,7 +20,7 @@ metadata: spec: osName: "amzn2" osVersion: "2.0" - version: "1.0.0" + version: "v0.1.0" supportedCloudProviders: - name: "aws" supportedContainerRuntimes: diff --git a/deploy/osps/default/osp-centos.yaml b/deploy/osps/default/osp-centos.yaml index 10cde6d8..679a05d0 100644 --- a/deploy/osps/default/osp-centos.yaml +++ b/deploy/osps/default/osp-centos.yaml @@ -20,7 +20,7 @@ metadata: spec: osName: "centos" osVersion: "7.7" - version: "1.0.0" + version: "v0.1.0" supportedCloudProviders: - name: "aws" - name: "azure" diff --git a/deploy/osps/default/osp-flatcar.yaml b/deploy/osps/default/osp-flatcar.yaml index 382f67bc..059ee319 100644 --- a/deploy/osps/default/osp-flatcar.yaml +++ b/deploy/osps/default/osp-flatcar.yaml @@ -21,7 +21,7 @@ spec: osName: flatcar ## Flatcar Stable (09/11/2021) osVersion: "2983.2.0" - version: "1.0.0" + version: "v0.1.0" supportedCloudProviders: - name: aws - name: azure diff --git a/deploy/osps/default/osp-rhel.yaml b/deploy/osps/default/osp-rhel.yaml index d23ce741..dd714984 100644 --- a/deploy/osps/default/osp-rhel.yaml +++ b/deploy/osps/default/osp-rhel.yaml @@ -20,7 +20,7 @@ metadata: spec: osName: "rhel" osVersion: "8.4" - version: "1.0.0" + version: "v0.1.0" supportedCloudProviders: - name: "aws" - name: "azure" diff --git a/deploy/osps/default/osp-sles.yaml b/deploy/osps/default/osp-sles.yaml index 519f56c2..6fc365a7 100644 --- a/deploy/osps/default/osp-sles.yaml +++ b/deploy/osps/default/osp-sles.yaml @@ -20,7 +20,7 @@ metadata: spec: osName: sles osVersion: "15-SP-1" - version: "1.0.0" + version: "v0.1.0" supportedCloudProviders: - name: aws supportedContainerRuntimes: diff --git a/deploy/osps/default/osp-ubuntu.yaml b/deploy/osps/default/osp-ubuntu.yaml index effd140f..d3807d2c 100644 --- a/deploy/osps/default/osp-ubuntu.yaml +++ b/deploy/osps/default/osp-ubuntu.yaml @@ -20,7 +20,7 @@ metadata: spec: osName: "ubuntu" osVersion: "20.04" - version: "1.0.0" + version: "v0.1.0" supportedCloudProviders: - name: "aws" - name: "azure" diff --git a/pkg/crd/osm/v1alpha1/operatingsystemprofile_types.go b/pkg/crd/osm/v1alpha1/operatingsystemprofile_types.go index 42b02dcc..81ea2a67 100644 --- a/pkg/crd/osm/v1alpha1/operatingsystemprofile_types.go +++ b/pkg/crd/osm/v1alpha1/operatingsystemprofile_types.go @@ -47,6 +47,7 @@ type OperatingSystemProfileSpec struct { // OSVersion the version of the operating system OSVersion string `json:"osVersion"` // Version is the version of the operating System Profile + // +kubebuilder:validation:Pattern=`v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$` Version string `json:"version"` // SupportedCloudProviders represent the cloud providers that support the given operating system version SupportedCloudProviders []CloudProviderSpec `json:"supportedCloudProviders"`