Skip to content

Commit

Permalink
Add new distribution values (#806)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha authored Oct 8, 2021
1 parent 47b42be commit ee093b4
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 13 deletions.
6 changes: 3 additions & 3 deletions apis/catalog/v1alpha1/mongodb_version_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
7 changes: 4 additions & 3 deletions apis/catalog/v1alpha1/mysql_version_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
8 changes: 4 additions & 4 deletions apis/catalog/v1alpha1/postgres_version_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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"
)
3 changes: 2 additions & 1 deletion crds/catalog.kubedb.com_mongodbversions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ spec:
type: boolean
distribution:
enum:
- MongoDB
- Official
- Percona
- MongoDB
type: string
exporter:
properties:
Expand Down
4 changes: 3 additions & 1 deletion crds/catalog.kubedb.com_mysqlversions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ spec:
type: boolean
distribution:
enum:
- Oracle
- Official
- MySQL
- Percona
- Oracle
type: string
exporter:
properties:
Expand Down
3 changes: 2 additions & 1 deletion crds/catalog.kubedb.com_postgresversions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ spec:
type: boolean
distribution:
enum:
- PostgreSQL
- Official
- TimescaleDB
- PostgreSQL
type: string
exporter:
properties:
Expand Down

0 comments on commit ee093b4

Please sign in to comment.