diff --git a/config/common.yaml b/config/common.yaml index cd8cd3399..699e00ef5 100644 --- a/config/common.yaml +++ b/config/common.yaml @@ -434,6 +434,7 @@ servers: spec: strategy: rollingParams: + maxSurge: 100% maxUnavailable: 0 type: Rolling triggers: diff --git a/config/dbs/h2.yaml b/config/dbs/h2.yaml index 456050566..d37103318 100644 --- a/config/dbs/h2.yaml +++ b/config/dbs/h2.yaml @@ -7,6 +7,8 @@ servers: - metadata: name: "[[.KieName]]" spec: + strategy: + type: Recreate template: metadata: name: "[[.KieName]]" diff --git a/config/envs/rhdm-trial.yaml b/config/envs/rhdm-trial.yaml index 9278ea6bd..5ae81d40c 100644 --- a/config/envs/rhdm-trial.yaml +++ b/config/envs/rhdm-trial.yaml @@ -104,6 +104,7 @@ servers: service: "[[.KieName]]" annotations: description: Route for KIE server's http service. + haproxy.router.openshift.io/balance: source haproxy.router.openshift.io/timeout: 60s spec: to: diff --git a/config/envs/rhpam-trial.yaml b/config/envs/rhpam-trial.yaml index 9278ea6bd..5ae81d40c 100644 --- a/config/envs/rhpam-trial.yaml +++ b/config/envs/rhpam-trial.yaml @@ -104,6 +104,7 @@ servers: service: "[[.KieName]]" annotations: description: Route for KIE server's http service. + haproxy.router.openshift.io/balance: source haproxy.router.openshift.io/timeout: 60s spec: to: diff --git a/pkg/controller/kieapp/defaults/defaults_test.go b/pkg/controller/kieapp/defaults/defaults_test.go index 02607ed3c..571547745 100644 --- a/pkg/controller/kieapp/defaults/defaults_test.go +++ b/pkg/controller/kieapp/defaults/defaults_test.go @@ -13,6 +13,7 @@ import ( v1 "github.com/kiegroup/kie-cloud-operator/pkg/apis/app/v1" "github.com/kiegroup/kie-cloud-operator/pkg/controller/kieapp/constants" "github.com/kiegroup/kie-cloud-operator/pkg/controller/kieapp/test" + appsv1 "github.com/openshift/api/apps/v1" buildv1 "github.com/openshift/api/build/v1" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" @@ -422,6 +423,7 @@ func TestAuthoringEnvironment(t *testing.T) { dbPassword := getEnvVariable(env.Servers[0].DeploymentConfigs[0].Spec.Template.Spec.Containers[0], "RHPAM_PASSWORD") assert.Equal(t, "Database", dbPassword, "Expected provided password to take effect, but found %v", dbPassword) assert.Equal(t, fmt.Sprintf("%s-kieserver", cr.Spec.CommonConfig.ApplicationName), env.Servers[len(env.Servers)-1].DeploymentConfigs[0].Spec.Template.Spec.Containers[0].Name, "the container name should have incremented") + assert.Equal(t, string(appsv1.DeploymentStrategyTypeRecreate), string(env.Servers[len(env.Servers)-1].DeploymentConfigs[0].Spec.Strategy.Type), "The DC should use a Recreate strategy when using the H2 DB") assert.NotEqual(t, v1.Environment{}, env, "Environment should not be empty") }