From ee093b4dfcfec8ad6c539a6cd43d0ad321e91a14 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Fri, 8 Oct 2021 02:26:21 -0700 Subject: [PATCH] Add new distribution values (#806) Signed-off-by: Tamal Saha --- apis/catalog/v1alpha1/mongodb_version_types.go | 6 +++--- apis/catalog/v1alpha1/mysql_version_types.go | 7 ++++--- apis/catalog/v1alpha1/postgres_version_types.go | 8 ++++---- crds/catalog.kubedb.com_mongodbversions.yaml | 3 ++- crds/catalog.kubedb.com_mysqlversions.yaml | 4 +++- crds/catalog.kubedb.com_postgresversions.yaml | 3 ++- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/apis/catalog/v1alpha1/mongodb_version_types.go b/apis/catalog/v1alpha1/mongodb_version_types.go index e0ba3fcf03..0c93a8d819 100644 --- a/apis/catalog/v1alpha1/mongodb_version_types.go +++ b/apis/catalog/v1alpha1/mongodb_version_types.go @@ -103,10 +103,10 @@ type MongoDBVersionList struct { Items []MongoDBVersion `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` } -// +kubebuilder:validation:Enum=MongoDB;Percona +// +kubebuilder:validation:Enum=Official;Percona;MongoDB type MongoDBDistro string const ( - MongoDBDistroMongoDB MongoDBDistro = "MongoDB" - MongoDBDistroPercona MongoDBDistro = "Percona" + MongoDBDistroOfficaial MongoDBDistro = "Official" + MongoDBDistroPercona MongoDBDistro = "Percona" ) diff --git a/apis/catalog/v1alpha1/mysql_version_types.go b/apis/catalog/v1alpha1/mysql_version_types.go index acc7a2d56a..ac309dbeb4 100644 --- a/apis/catalog/v1alpha1/mysql_version_types.go +++ b/apis/catalog/v1alpha1/mysql_version_types.go @@ -151,10 +151,11 @@ type MySQLVersionList struct { Items []MySQLVersion `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` } -// +kubebuilder:validation:Enum=Oracle;Percona +// +kubebuilder:validation:Enum=Official;MySQL;Percona;Oracle type MySQLDistro string const ( - MySQLDistroOracle MySQLDistro = "Oracle" - MySQLDistroPercona MySQLDistro = "Percona" + MySQLDistroOfficial MySQLDistro = "Official" + MySQLDistroMySQL MySQLDistro = "MySQL" + MySQLDistroPercona MySQLDistro = "Percona" ) diff --git a/apis/catalog/v1alpha1/postgres_version_types.go b/apis/catalog/v1alpha1/postgres_version_types.go index dbcceeb12e..141717a487 100644 --- a/apis/catalog/v1alpha1/postgres_version_types.go +++ b/apis/catalog/v1alpha1/postgres_version_types.go @@ -111,9 +111,6 @@ type PostgresVersionList struct { Items []PostgresVersion `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` } -// +kubebuilder:validation:Enum=PostgreSQL;TimescaleDB -type PostgresDistro string - // PostgresSecurityContext is the additional features for the Postgres type PostgresSecurityContext struct { // RunAsUser is default UID for the DB container. It is by default 999 for debian based image and 70 for alpine based image. @@ -126,7 +123,10 @@ type PostgresSecurityContext struct { RunAsAnyNonRoot bool `json:"runAsAnyNonRoot,omitempty" protobuf:"varint,2,opt,name=runAsAnyNonRoot"` } +// +kubebuilder:validation:Enum=Official;TimescaleDB;PostgreSQL +type PostgresDistro string + const ( - PostgresDistroPostgres PostgresDistro = "PostgreSQL" + PostgresDistroOfficial PostgresDistro = "Official" PostgresDistroTimescaleDB PostgresDistro = "TimescaleDB" ) diff --git a/crds/catalog.kubedb.com_mongodbversions.yaml b/crds/catalog.kubedb.com_mongodbversions.yaml index 971c39c481..bb934e5a8e 100644 --- a/crds/catalog.kubedb.com_mongodbversions.yaml +++ b/crds/catalog.kubedb.com_mongodbversions.yaml @@ -59,8 +59,9 @@ spec: type: boolean distribution: enum: - - MongoDB + - Official - Percona + - MongoDB type: string exporter: properties: diff --git a/crds/catalog.kubedb.com_mysqlversions.yaml b/crds/catalog.kubedb.com_mysqlversions.yaml index 3f7cd60c2e..ff74647dbf 100644 --- a/crds/catalog.kubedb.com_mysqlversions.yaml +++ b/crds/catalog.kubedb.com_mysqlversions.yaml @@ -66,8 +66,10 @@ spec: type: boolean distribution: enum: - - Oracle + - Official + - MySQL - Percona + - Oracle type: string exporter: properties: diff --git a/crds/catalog.kubedb.com_postgresversions.yaml b/crds/catalog.kubedb.com_postgresversions.yaml index a561f72cb2..8a388e512a 100644 --- a/crds/catalog.kubedb.com_postgresversions.yaml +++ b/crds/catalog.kubedb.com_postgresversions.yaml @@ -66,8 +66,9 @@ spec: type: boolean distribution: enum: - - PostgreSQL + - Official - TimescaleDB + - PostgreSQL type: string exporter: properties: