Skip to content

Commit

Permalink
Merge pull request #112 from tchughesiv/RHPAM-1952
Browse files Browse the repository at this point in the history
[RHPAM-1952] resolve kie server sticky session issue
  • Loading branch information
openshift-merge-robot authored Apr 2, 2019
2 parents 17e5236 + b1da13d commit 8166af8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ servers:
spec:
strategy:
rollingParams:
maxSurge: 100%
maxUnavailable: 0
type: Rolling
triggers:
Expand Down
2 changes: 2 additions & 0 deletions config/dbs/h2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ servers:
- metadata:
name: "[[.KieName]]"
spec:
strategy:
type: Recreate
template:
metadata:
name: "[[.KieName]]"
Expand Down
1 change: 1 addition & 0 deletions config/envs/rhdm-trial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions config/envs/rhpam-trial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions pkg/controller/kieapp/defaults/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
}

Expand Down

0 comments on commit 8166af8

Please sign in to comment.