Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incubator-kie-issues#1483: Create a common Kie Flyway initializer for Kie Modules #542

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions controllers/platform/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import (

const (
quarkusHibernateORMDatabaseGeneration string = "QUARKUS_HIBERNATE_ORM_DATABASE_GENERATION"
quarkusFlywayMigrateAtStart string = "QUARKUS_FLYWAY_MIGRATE_AT_START"
kieFlywayEnabled string = "KIE_FLYWAY_ENABLED"
)

type PlatformServiceHandler interface {
Expand Down Expand Up @@ -245,7 +245,7 @@ func (d *DataIndexHandler) ConfigurePersistence(containerSpec *corev1.Container)
// since Services, and services Persistence are optional references.

// specific to DataIndex
c.Env = append(c.Env, corev1.EnvVar{Name: quarkusHibernateORMDatabaseGeneration, Value: "update"}, corev1.EnvVar{Name: quarkusFlywayMigrateAtStart, Value: "true"})
c.Env = append(c.Env, corev1.EnvVar{Name: quarkusHibernateORMDatabaseGeneration, Value: "update"}, corev1.EnvVar{Name: kieFlywayEnabled, Value: "true"})
return c
}
return containerSpec
Expand Down Expand Up @@ -425,7 +425,7 @@ func (j *JobServiceHandler) ConfigurePersistence(containerSpec *corev1.Container
// since Services, and services Persistence are optional references.

// Specific to Job Service
c.Env = append(c.Env, corev1.EnvVar{Name: "QUARKUS_FLYWAY_MIGRATE_AT_START", Value: "true"})
c.Env = append(c.Env, corev1.EnvVar{Name: "KIE_FLYWAY_ENABLED", Value: "true"})
c.Env = append(c.Env, corev1.EnvVar{Name: "KOGITO_JOBS_SERVICE_LOADJOBERRORSTRATEGY", Value: "FAIL_SERVICE"})
return c
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
container:
env:
# set the flyway initialization in the WF container env
- name: QUARKUS_FLYWAY_MIGRATE_AT_START
- name: KIE_FLYWAY_ENABLED
value: "true"
initContainers:
- name: init-postgres
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
podTemplate:
container:
env:
- name: QUARKUS_FLYWAY_MIGRATE_AT_START
- name: KIE_FLYWAY_ENABLED
value: "true"
flow:
start: PrintStartMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
container:
env:
# set the flyway initialization in the WF container env
- name: QUARKUS_FLYWAY_MIGRATE_AT_START
- name: KIE_FLYWAY_ENABLED
value: "true"
flow:
start: PrintStartMessage
Expand Down
Loading