Skip to content

Commit

Permalink
Merge pull request #750 from desmax74/RHPAM-3528-7.12.x-cr1
Browse files Browse the repository at this point in the history
[RHPAM-3528] Increase KieExecutorMDB threads in RHPAM image
openshift-merge-robot authored Mar 17, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents cbefaf1 + a0bd0e8 commit 7ce248c
Showing 10 changed files with 95 additions and 63 deletions.
22 changes: 16 additions & 6 deletions deploy/crds/kieapp.crd.yaml
Original file line number Diff line number Diff line change
@@ -1631,9 +1631,6 @@ spec:
description: KieServerSet KIE Server configuration for a single
set, or for multiple sets if deployments is set to >1
properties:
MDBMaxSession:
description: MDBMaxSession number of KIE Executor sessions
type: integer
build:
description: KieAppBuildObject Data to define how to build
an application from source
@@ -2495,6 +2492,14 @@ spec:
keystoreSecret:
description: KeystoreSecret secret name
type: string
kieExecutorMDBMaxSession:
description: 'Number of max KIE Executor sessions, it must
be lower than the value of max-pool-size, by default is
max-pool-size set to 60. Max pool size can be set by system
property jboss.mdb.strict.max.pool.size (using javaOptsAppend:
"-Djboss.mdb.strict.max.pool.size=40"), for more information
see https://access.redhat.com/solutions/2955481.'
type: integer
name:
description: Server name
type: string
@@ -4515,9 +4520,6 @@ spec:
single set, or for multiple sets if deployments is set
to >1
properties:
MDBMaxSession:
description: MDBMaxSession number of KIE Executor sessions
type: integer
build:
description: KieAppBuildObject Data to define how to
build an application from source
@@ -5407,6 +5409,14 @@ spec:
keystoreSecret:
description: KeystoreSecret secret name
type: string
kieExecutorMDBMaxSession:
description: 'Number of max KIE Executor sessions, it
must be lower than the value of max-pool-size, by
default is max-pool-size set to 60. Max pool size
can be set by system property jboss.mdb.strict.max.pool.size
(using javaOptsAppend: "-Djboss.mdb.strict.max.pool.size=40"),
for more information see https://access.redhat.com/solutions/2955481.'
type: integer
name:
description: Server name
type: string
22 changes: 16 additions & 6 deletions deploy/olm-catalog/dev/7.12.1-1/manifests/kieapp.crd.yaml
Original file line number Diff line number Diff line change
@@ -1631,9 +1631,6 @@ spec:
description: KieServerSet KIE Server configuration for a single
set, or for multiple sets if deployments is set to >1
properties:
MDBMaxSession:
description: MDBMaxSession number of KIE Executor sessions
type: integer
build:
description: KieAppBuildObject Data to define how to build
an application from source
@@ -2495,6 +2492,14 @@ spec:
keystoreSecret:
description: KeystoreSecret secret name
type: string
kieExecutorMDBMaxSession:
description: 'Number of max KIE Executor sessions, it must
be lower than the value of max-pool-size, by default is
max-pool-size set to 60. Max pool size can be set by system
property jboss.mdb.strict.max.pool.size (using javaOptsAppend:
"-Djboss.mdb.strict.max.pool.size=40"), for more information
see https://access.redhat.com/solutions/2955481.'
type: integer
name:
description: Server name
type: string
@@ -4515,9 +4520,6 @@ spec:
single set, or for multiple sets if deployments is set
to >1
properties:
MDBMaxSession:
description: MDBMaxSession number of KIE Executor sessions
type: integer
build:
description: KieAppBuildObject Data to define how to
build an application from source
@@ -5407,6 +5409,14 @@ spec:
keystoreSecret:
description: KeystoreSecret secret name
type: string
kieExecutorMDBMaxSession:
description: 'Number of max KIE Executor sessions, it
must be lower than the value of max-pool-size, by
default is max-pool-size set to 60. Max pool size
can be set by system property jboss.mdb.strict.max.pool.size
(using javaOptsAppend: "-Djboss.mdb.strict.max.pool.size=40"),
for more information see https://access.redhat.com/solutions/2955481.'
type: integer
name:
description: Server name
type: string
22 changes: 16 additions & 6 deletions deploy/olm-catalog/prod/7.12.1-1/manifests/kieapp.crd.yaml
Original file line number Diff line number Diff line change
@@ -1631,9 +1631,6 @@ spec:
description: KieServerSet KIE Server configuration for a single
set, or for multiple sets if deployments is set to >1
properties:
MDBMaxSession:
description: MDBMaxSession number of KIE Executor sessions
type: integer
build:
description: KieAppBuildObject Data to define how to build
an application from source
@@ -2495,6 +2492,14 @@ spec:
keystoreSecret:
description: KeystoreSecret secret name
type: string
kieExecutorMDBMaxSession:
description: 'Number of max KIE Executor sessions, it must
be lower than the value of max-pool-size, by default is
max-pool-size set to 60. Max pool size can be set by system
property jboss.mdb.strict.max.pool.size (using javaOptsAppend:
"-Djboss.mdb.strict.max.pool.size=40"), for more information
see https://access.redhat.com/solutions/2955481.'
type: integer
name:
description: Server name
type: string
@@ -4515,9 +4520,6 @@ spec:
single set, or for multiple sets if deployments is set
to >1
properties:
MDBMaxSession:
description: MDBMaxSession number of KIE Executor sessions
type: integer
build:
description: KieAppBuildObject Data to define how to
build an application from source
@@ -5407,6 +5409,14 @@ spec:
keystoreSecret:
description: KeystoreSecret secret name
type: string
kieExecutorMDBMaxSession:
description: 'Number of max KIE Executor sessions, it
must be lower than the value of max-pool-size, by
default is max-pool-size set to 60. Max pool size
can be set by system property jboss.mdb.strict.max.pool.size
(using javaOptsAppend: "-Djboss.mdb.strict.max.pool.size=40"),
for more information see https://access.redhat.com/solutions/2955481.'
type: integer
name:
description: Server name
type: string
22 changes: 16 additions & 6 deletions deploy/olm-catalog/test/7.12.1-1/manifests/kieapp.crd.yaml
Original file line number Diff line number Diff line change
@@ -1631,9 +1631,6 @@ spec:
description: KieServerSet KIE Server configuration for a single
set, or for multiple sets if deployments is set to >1
properties:
MDBMaxSession:
description: MDBMaxSession number of KIE Executor sessions
type: integer
build:
description: KieAppBuildObject Data to define how to build
an application from source
@@ -2495,6 +2492,14 @@ spec:
keystoreSecret:
description: KeystoreSecret secret name
type: string
kieExecutorMDBMaxSession:
description: 'Number of max KIE Executor sessions, it must
be lower than the value of max-pool-size, by default is
max-pool-size set to 60. Max pool size can be set by system
property jboss.mdb.strict.max.pool.size (using javaOptsAppend:
"-Djboss.mdb.strict.max.pool.size=40"), for more information
see https://access.redhat.com/solutions/2955481.'
type: integer
name:
description: Server name
type: string
@@ -4515,9 +4520,6 @@ spec:
single set, or for multiple sets if deployments is set
to >1
properties:
MDBMaxSession:
description: MDBMaxSession number of KIE Executor sessions
type: integer
build:
description: KieAppBuildObject Data to define how to
build an application from source
@@ -5407,6 +5409,14 @@ spec:
keystoreSecret:
description: KeystoreSecret secret name
type: string
kieExecutorMDBMaxSession:
description: 'Number of max KIE Executor sessions, it
must be lower than the value of max-pool-size, by
default is max-pool-size set to 60. Max pool size
can be set by system property jboss.mdb.strict.max.pool.size
(using javaOptsAppend: "-Djboss.mdb.strict.max.pool.size=40"),
for more information see https://access.redhat.com/solutions/2955481.'
type: integer
name:
description: Server name
type: string
6 changes: 3 additions & 3 deletions deploy/ui/form.json
Original file line number Diff line number Diff line change
@@ -1724,16 +1724,16 @@
"label": "Configure KieExecutorMDB threads",
"type": "object",
"max": 1,
"jsonPath": "$.spec.objects.servers[*].MDBMaxSession",
"jsonPath": "$.spec.objects.servers[*].kieExecutorMDBMaxSession",
"visible": true,
"fields": [
{
"label": "Max Number of Session",
"type": "integer",
"required": false,
"jsonPath": "$.spec.objects.servers[*].MDBMaxSession",
"originalJsonPath": "$.spec.objects.servers[*].MDBMaxSession",
"description": "Number of max session used by the JMS Executor."
"originalJsonPath": "$.spec.objects.servers[*].kieExecutorMDBMaxSession",
"description": "Number of max session used by the JMS Executor, it must be lower than the value of max-pool-size passed as jboss.mdb.strict.max.pool.size, if leaved empty the max.pool.size will be set to 60."
}
]
},
8 changes: 4 additions & 4 deletions pkg/apis/app/v2/kieapp_types.go
Original file line number Diff line number Diff line change
@@ -151,8 +151,8 @@ type KieServerSet struct {
Kafka *KafkaExtObject `json:"kafka,omitempty"`
KafkaJbpmEventEmitters *KafkaJBPMEventEmittersObject `json:"kafkaJbpmEventEmitters,omitempty"`
Cors *CORSFiltersObject `json:"cors,omitempty"`
// MDBMaxSession number of KIE Executor sessions
MDBMaxSession *int `json:"MDBMaxSession,omitempty"`
// Number of max KIE Executor sessions, it must be lower than the value of max-pool-size, by default is max-pool-size set to 60. Max pool size can be set by system property jboss.mdb.strict.max.pool.size (using javaOptsAppend: "-Djboss.mdb.strict.max.pool.size=40"), for more information see https://access.redhat.com/solutions/2955481.
KieExecutorMDBMaxSession *int `json:"kieExecutorMDBMaxSession,omitempty"`
}

// ConsoleObject configuration of the RHPAM workbench
@@ -768,8 +768,8 @@ type ServerTemplate struct {
KafkaJbpmEventEmitters *KafkaJBPMEventEmittersObject `json:"kafkaJbpmEventEmitters,omitempty"`
Cors *CORSFiltersObject `json:"cors,omitempty"`
StartupStrategy *StartupStrategy `json:"startupStrategy,omitempty"`
// MDBMaxSession number of KIE Executor sessions
MDBMaxSession *int `json:"MDBMaxSession,omitempty"`
// KieExecutorMDBMaxSession number of KIE Executor sessions
KieExecutorMDBMaxSession *int `json:"KieExecutorMDBMaxSession,omitempty"`
}

// DashbuilderTemplate contains all the variables used in the yaml templates
8 changes: 4 additions & 4 deletions pkg/apis/app/v2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions pkg/controller/kieapp/defaults/defaults.go
Original file line number Diff line number Diff line change
@@ -761,17 +761,17 @@ func getServersConfig(cr *api.KieApp) ([]api.ServerTemplate, error) {
}
usedNames[name] = true
template := api.ServerTemplate{
KieName: name,
KieServerID: name,
Build: getBuildConfig(product, cr, serverSet),
KeystoreSecret: serverSet.KeystoreSecret,
StorageClassName: serverSet.StorageClassName,
JbpmCluster: serverSet.JbpmCluster,
PersistRepos: serverSet.PersistRepos,
ServersM2PvSize: serverSet.ServersM2PvSize,
ServersKiePvSize: serverSet.ServersKiePvSize,
StartupStrategy: cr.Status.Applied.CommonConfig.StartupStrategy,
MDBMaxSession: serverSet.MDBMaxSession,
KieName: name,
KieServerID: name,
Build: getBuildConfig(product, cr, serverSet),
KeystoreSecret: serverSet.KeystoreSecret,
StorageClassName: serverSet.StorageClassName,
JbpmCluster: serverSet.JbpmCluster,
PersistRepos: serverSet.PersistRepos,
ServersM2PvSize: serverSet.ServersM2PvSize,
ServersKiePvSize: serverSet.ServersKiePvSize,
StartupStrategy: cr.Status.Applied.CommonConfig.StartupStrategy,
KieExecutorMDBMaxSession: serverSet.KieExecutorMDBMaxSession,
}

if cr.Status.Applied.Objects.Console == nil || cr.Status.Applied.Environment == api.RhdmProductionImmutable {
@@ -864,8 +864,8 @@ func getServersConfig(cr *api.KieApp) ([]api.ServerTemplate, error) {
}

// KieExecutorMDB
if serverSet.MDBMaxSession != nil {
template.MDBMaxSession = serverSet.MDBMaxSession
if serverSet.KieExecutorMDBMaxSession != nil {
template.KieExecutorMDBMaxSession = serverSet.KieExecutorMDBMaxSession
}

if cr.Status.Applied.CommonConfig.StartupStrategy.StrategyName != "" {
16 changes: 4 additions & 12 deletions pkg/controller/kieapp/defaults/defaults_test.go
Original file line number Diff line number Diff line change
@@ -7267,7 +7267,7 @@ func TestKieExecutorMDB(t *testing.T) {
Environment: api.RhpamProductionImmutable,
Objects: api.KieAppObjects{
Servers: []api.KieServerSet{
{MDBMaxSession: Pint(40)},
{KieExecutorMDBMaxSession: Pint(40)},
},
},
},
@@ -7276,16 +7276,8 @@ func TestKieExecutorMDB(t *testing.T) {
env, err := GetEnvironment(cr, test.MockService())
assert.Nil(t, err, "Error getting TestKieExecutorMDB environment")

assert.NotNil(t, cr.Status.Applied.Objects.Servers[0].MDBMaxSession)
mdbMaxSessionPassed := false
for _, env := range env.Servers[0].DeploymentConfigs[0].Spec.Template.Spec.Containers[0].Env {
if strings.HasPrefix(env.Name, "JBOSS_MDB") {
if env.Name != "JBOSS_MDB_MAX_SESSION" && env.Value == "40" {
mdbMaxSessionPassed = true
}
}
}
assert.True(t, mdbMaxSessionPassed)
assert.NotNil(t, cr.Status.Applied.Objects.Servers[0].KieExecutorMDBMaxSession)
assert.Equal(t, "40", getEnvVariable(env.Servers[0].DeploymentConfigs[0].Spec.Template.Spec.Containers[0], "KIE_EXECUTOR_MDB_MAX_SESSIONS"))
}

func TestKieExecutorMDBEmpty(t *testing.T) {
@@ -7302,7 +7294,7 @@ func TestKieExecutorMDBEmpty(t *testing.T) {
env, err := GetEnvironment(cr, test.MockService())
assert.Nil(t, err, "Error getting TestKieExecutorMDBEmpty environment")

assert.Nil(t, cr.Status.Applied.Objects.Servers[0].MDBMaxSession)
assert.Nil(t, cr.Status.Applied.Objects.Servers[0].KieExecutorMDBMaxSession)
mdbMaxSessionNotPassed := true
for _, env := range env.Servers[0].DeploymentConfigs[0].Spec.Template.Spec.Containers[0].Env {
if strings.HasPrefix(env.Name, "JBOSS_MDB") {
6 changes: 3 additions & 3 deletions rhpam-config/7.12.1/common.yaml
Original file line number Diff line number Diff line change
@@ -1099,9 +1099,9 @@ servers:
#[[end]]
#[[end]]
## CORS END
#[[if .MDBMaxSession]]
- name: JBOSS_MDB_MAX_SESSIONS
value: "[[.MDBMaxSession]]"
#[[if .KieExecutorMDBMaxSession]]
- name: KIE_EXECUTOR_MDB_MAX_SESSIONS
value: "[[.KieExecutorMDBMaxSession]]"
#[[end]]
livenessProbe:
httpGet:

0 comments on commit 7ce248c

Please sign in to comment.