Skip to content

Commit

Permalink
Make migrateDBOnStartUp property optional
Browse files Browse the repository at this point in the history
  • Loading branch information
rhkp committed Sep 4, 2024
1 parent 1e7aad1 commit a9f18aa
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 26 deletions.
2 changes: 2 additions & 0 deletions api/v1alpha08/sonataflow_persistence_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ type PersistenceOptionsSpec struct {
PostgreSQL *PersistencePostgreSQL `json:"postgresql,omitempty"`

// Whether to migrate database on service startup?
// +optional
// +default: false
MigrateDBOnStartUp bool `json:"migrateDBOnStartUp"`
}

Expand Down
4 changes: 0 additions & 4 deletions bundle/manifests/sonataflow.org_sonataflowplatforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,6 @@ spec:
required:
- secretRef
type: object
required:
- migrateDBOnStartUp
type: object
podTemplate:
description: PodTemplate describes the deployment details
Expand Down Expand Up @@ -8505,8 +8503,6 @@ spec:
required:
- secretRef
type: object
required:
- migrateDBOnStartUp
type: object
podTemplate:
description: PodTemplate describes the deployment details
Expand Down
2 changes: 0 additions & 2 deletions bundle/manifests/sonataflow.org_sonataflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2163,8 +2163,6 @@ spec:
required:
- secretRef
type: object
required:
- migrateDBOnStartUp
type: object
podTemplate:
description: PodTemplate describes the deployment details of this
Expand Down
4 changes: 0 additions & 4 deletions config/crd/bases/sonataflow.org_sonataflowplatforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,6 @@ spec:
required:
- secretRef
type: object
required:
- migrateDBOnStartUp
type: object
podTemplate:
description: PodTemplate describes the deployment details
Expand Down Expand Up @@ -8506,8 +8504,6 @@ spec:
required:
- secretRef
type: object
required:
- migrateDBOnStartUp
type: object
podTemplate:
description: PodTemplate describes the deployment details
Expand Down
2 changes: 0 additions & 2 deletions config/crd/bases/sonataflow.org_sonataflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2164,8 +2164,6 @@ spec:
required:
- secretRef
type: object
required:
- migrateDBOnStartUp
type: object
podTemplate:
description: PodTemplate describes the deployment details of this
Expand Down
8 changes: 2 additions & 6 deletions controllers/sonataflowplatform_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,10 @@ func TestSonataFlowPlatformController(t *testing.T) {
ksp.Spec = v1alpha08.SonataFlowPlatformSpec{
Services: &v1alpha08.ServicesPlatformSpec{
DataIndex: &v1alpha08.ServiceSpec{
Persistence: &v1alpha08.PersistenceOptionsSpec{
MigrateDBOnStartUp: false,
},
Persistence: &v1alpha08.PersistenceOptionsSpec{},
},
JobService: &v1alpha08.ServiceSpec{
Persistence: &v1alpha08.PersistenceOptionsSpec{
MigrateDBOnStartUp: false,
},
Persistence: &v1alpha08.PersistenceOptionsSpec{},
},
},
Persistence: &v1alpha08.PlatformPersistenceOptionsSpec{
Expand Down
6 changes: 0 additions & 6 deletions operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1120,8 +1120,6 @@ spec:
required:
- secretRef
type: object
required:
- migrateDBOnStartUp
type: object
podTemplate:
description: PodTemplate describes the deployment details
Expand Down Expand Up @@ -8997,8 +8995,6 @@ spec:
required:
- secretRef
type: object
required:
- migrateDBOnStartUp
type: object
podTemplate:
description: PodTemplate describes the deployment details
Expand Down Expand Up @@ -19070,8 +19066,6 @@ spec:
required:
- secretRef
type: object
required:
- migrateDBOnStartUp
type: object
podTemplate:
description: PodTemplate describes the deployment details of this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ metadata:
sonataflow.org/version: 0.0.1
spec:
persistence:
migrateDBOnStartUp: false
postgresql:
secretRef:
name: postgres-secrets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ metadata:
sonataflow.org/version: 0.0.1
spec:
persistence:
migrateDBOnStartUp: false
postgresql:
secretRef:
name: postgres-secrets
Expand Down

0 comments on commit a9f18aa

Please sign in to comment.