Skip to content

Commit a4578cd

Browse files
authored
Merge pull request #559 from vshn/develop
🔀 Merge develop into master (Release)
2 parents bf6bb42 + 24b73ef commit a4578cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+661
-73
lines changed

apis/vshn/v1/dbaas_vshn_forgejo.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ type VSHNForgejoParameters struct {
7070
// Monitoring contains settings to control the monitoring of a service.
7171
Monitoring VSHNMonitoring `json:"monitoring,omitempty"`
7272

73+
// +kubebuilder:default=1
74+
// +kubebuilder:validation:Minimum=0
75+
// +kubebuilder:validation:Maximum=1
76+
7377
// Instances defines the number of instances to run.
7478
Instances int `json:"instances,omitempty"`
7579
}

apis/vshn/v1/dbaas_vshn_keycloak.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ type VSHNKeycloakParameters struct {
8787
Security Security `json:"security,omitempty"`
8888

8989
// +kubebuilder:default=1
90-
// +kubebuilder:validation:Minimum=1
90+
// +kubebuilder:validation:Minimum=0
9191
// +kubebuilder:validation:Maximum=3
9292

9393
// Instances configures the number of Keycloak instances for the cluster.
@@ -255,6 +255,10 @@ func (v *XVSHNKeycloak) GetCompositionName() string {
255255
return v.Spec.CompositionRef.Name
256256
}
257257

258+
func (v *XVSHNKeycloak) GetInstances() int {
259+
return v.Spec.Parameters.Instances
260+
}
261+
258262
func (v *VSHNKeycloak) SetInstanceNamespaceStatus() {
259263
v.Status.InstanceNamespace = v.GetInstanceNamespace()
260264
}

apis/vshn/v1/dbaas_vshn_mariadb.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ type VSHNMariaDBParameters struct {
8686
Security Security `json:"security,omitempty"`
8787

8888
// +kubebuilder:default=1
89-
// +kubebuilder:validation:Enum=1;3;
89+
// +kubebuilder:validation:Minimum=0
90+
// +kubebuilder:validation:Enum=0;1;3;
9091

9192
// Instances configures the number of MariaDB instances for the cluster.
9293
// Each instance contains one MariaDB server.
@@ -207,6 +208,10 @@ func (v *XVSHNMariaDB) GetCompositionName() string {
207208
return v.Spec.CompositionRef.Name
208209
}
209210

211+
func (v *XVSHNMariaDB) GetInstances() int {
212+
return v.Spec.Parameters.Instances
213+
}
214+
210215
// XVSHNMariaDBSpec defines the desired state of a VSHNMariaDB.
211216
type XVSHNMariaDBSpec struct {
212217
// Parameters are the configurable fields of a VSHNMariaDB.

apis/vshn/v1/dbaas_vshn_postgresql.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ type VSHNPostgreSQLParameters struct {
7575
UpdateStrategy VSHNPostgreSQLUpdateStrategy `json:"updateStrategy,omitempty"`
7676

7777
// +kubebuilder:default=1
78-
// +kubebuilder:validation:Minimum=1
78+
// +kubebuilder:validation:Minimum=0
7979
// +kubebuilder:validation:Maximum=3
8080

8181
// Instances configures the number of PostgreSQL instances for the cluster.
@@ -435,6 +435,10 @@ func (v *XVSHNPostgreSQL) GetCompositionName() string {
435435
return v.Spec.CompositionRef.Name
436436
}
437437

438+
func (v *XVSHNPostgreSQL) GetInstances() int {
439+
return v.Spec.Parameters.Instances
440+
}
441+
438442
// GetBackupRetention returns the retention definition for this backup.
439443
func (v *VSHNPostgreSQL) GetBackupRetention() K8upRetentionPolicy {
440444
return K8upRetentionPolicy{}

apis/vshn/v1/dbaas_vshn_redis.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ type VSHNRedisParameters struct {
8080
Security Security `json:"security,omitempty"`
8181

8282
// +kubebuilder:default=1
83-
// +kubebuilder:validation:Enum=1;3;
83+
// +kubebuilder:validation:Enum=0;1;3;
8484

8585
// Instances configures the number of Redis instances for the cluster.
8686
Instances int `json:"instances,omitempty"`
@@ -188,6 +188,10 @@ func (v *XVSHNRedis) GetCompositionName() string {
188188
return v.Spec.CompositionRef.Name
189189
}
190190

191+
func (v *XVSHNRedis) GetInstances() int {
192+
return v.Spec.Parameters.Instances
193+
}
194+
191195
// XVSHNRedisSpec defines the desired state of a VSHNRedis.
192196
type XVSHNRedisSpec struct {
193197
// Parameters are the configurable fields of a VSHNRedis.

apis/vshn/v1/vshn_minio.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ func (v *XVSHNMinio) GetCompositionName() string {
161161
return v.Spec.CompositionRef.Name
162162
}
163163

164+
func (v *XVSHNMinio) GetInstances() int {
165+
return v.Spec.Parameters.Instances
166+
}
167+
164168
// XVSHNMinioSpec defines the desired state of a VSHNMinio.
165169
type XVSHNMinioSpec struct {
166170
// Parameters are the configurable fields of a VSHNMinio.

apis/vshn/v1/vshn_nextcloud.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ type VSHNNextcloudParameters struct {
9393
Security Security `json:"security,omitempty"`
9494

9595
// +kubebuilder:default=1
96-
// +kubebuilder:validation:Minimum=1
96+
// +kubebuilder:validation:Minimum=0
9797
// +kubebuilder:validation:Maximum=3
9898

9999
// Instances configures the number of Nextcloud instances for the cluster.

crds/vshn.appcat.vshn.io_vshnforgejoes.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ spec:
7474
type: object
7575
default: {}
7676
instances:
77+
default: 1
7778
description: Instances defines the number of instances to run.
79+
maximum: 1
80+
minimum: 0
7881
type: integer
7982
maintenance:
8083
description: Maintenance contains settings to control the maintenance of an instance.

crds/vshn.appcat.vshn.io_vshnkeycloaks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ spec:
8080
Instances configures the number of Keycloak instances for the cluster.
8181
Each instance contains one Keycloak server.
8282
maximum: 3
83-
minimum: 1
83+
minimum: 0
8484
type: integer
8585
maintenance:
8686
description: Maintenance contains settings to control the maintenance of an instance.
@@ -4792,7 +4792,7 @@ spec:
47924792
Each instance contains one Postgres server.
47934793
Out of all Postgres servers, one is elected as the primary, the rest remain as read-only replicas.
47944794
maximum: 3
4795-
minimum: 1
4795+
minimum: 0
47964796
type: integer
47974797
maintenance:
47984798
description: Maintenance contains settings to control the maintenance of an instance.

crds/vshn.appcat.vshn.io_vshnmariadbs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ spec:
8383
An additional ProxySQL statefulset will be deployed to make failovers
8484
as seamless as possible.
8585
enum:
86+
- 0
8687
- 1
8788
- 3
89+
minimum: 0
8890
type: integer
8991
maintenance:
9092
description: Maintenance contains settings to control the maintenance of an instance.

0 commit comments

Comments
 (0)