Skip to content

Commit

Permalink
[RHPAM-3528] Increase KieExecutorMDB threads in RHPAM image
Browse files Browse the repository at this point in the history
Signed-off-by: desmax74 <[email protected]>
  • Loading branch information
desmax74 committed Mar 17, 2022
1 parent 5f87dde commit 0eb85df
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 48 deletions.
19 changes: 15 additions & 4 deletions deploy/crds/kieapp.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1628,8 +1628,13 @@ 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
KieExecutorMDBMaxSession:
description: 'KieExecutorMDBMaxSession 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
build:
description: KieAppBuildObject Data to define how to build
Expand Down Expand Up @@ -4501,8 +4506,14 @@ spec:
single set, or for multiple sets if deployments is set
to >1
properties:
MDBMaxSession:
description: MDBMaxSession number of KIE Executor sessions
KieExecutorMDBMaxSession:
description: 'KieExecutorMDBMaxSession 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
build:
description: KieAppBuildObject Data to define how to
Expand Down
19 changes: 15 additions & 4 deletions deploy/olm-catalog/dev/7.12.1-1/manifests/kieapp.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1628,8 +1628,13 @@ 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
KieExecutorMDBMaxSession:
description: 'KieExecutorMDBMaxSession 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
build:
description: KieAppBuildObject Data to define how to build
Expand Down Expand Up @@ -4501,8 +4506,14 @@ spec:
single set, or for multiple sets if deployments is set
to >1
properties:
MDBMaxSession:
description: MDBMaxSession number of KIE Executor sessions
KieExecutorMDBMaxSession:
description: 'KieExecutorMDBMaxSession 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
build:
description: KieAppBuildObject Data to define how to
Expand Down
19 changes: 15 additions & 4 deletions deploy/olm-catalog/prod/7.12.1-1/manifests/kieapp.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1628,8 +1628,13 @@ 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
KieExecutorMDBMaxSession:
description: 'KieExecutorMDBMaxSession 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
build:
description: KieAppBuildObject Data to define how to build
Expand Down Expand Up @@ -4501,8 +4506,14 @@ spec:
single set, or for multiple sets if deployments is set
to >1
properties:
MDBMaxSession:
description: MDBMaxSession number of KIE Executor sessions
KieExecutorMDBMaxSession:
description: 'KieExecutorMDBMaxSession 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
build:
description: KieAppBuildObject Data to define how to
Expand Down
19 changes: 15 additions & 4 deletions deploy/olm-catalog/test/7.12.1-1/manifests/kieapp.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1628,8 +1628,13 @@ 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
KieExecutorMDBMaxSession:
description: 'KieExecutorMDBMaxSession 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
build:
description: KieAppBuildObject Data to define how to build
Expand Down Expand Up @@ -4501,8 +4506,14 @@ spec:
single set, or for multiple sets if deployments is set
to >1
properties:
MDBMaxSession:
description: MDBMaxSession number of KIE Executor sessions
KieExecutorMDBMaxSession:
description: 'KieExecutorMDBMaxSession 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
build:
description: KieAppBuildObject Data to define how to
Expand Down
6 changes: 3 additions & 3 deletions deploy/ui/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
]
},
Expand Down
8 changes: 4 additions & 4 deletions pkg/apis/app/v2/kieapp_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
// KieExecutorMDBMaxSession 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
Expand Down Expand Up @@ -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
Expand Down
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
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 != "" {
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/kieapp/defaults/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7267,7 +7267,7 @@ func TestKieExecutorMDB(t *testing.T) {
Environment: api.RhpamProductionImmutable,
Objects: api.KieAppObjects{
Servers: []api.KieServerSet{
{MDBMaxSession: Pint(40)},
{KieExecutorMDBMaxSession: Pint(40)},
},
},
},
Expand All @@ -7276,11 +7276,11 @@ 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)
assert.NotNil(t, cr.Status.Applied.Objects.Servers[0].KieExecutorMDBMaxSession)
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" {
if strings.HasPrefix(env.Name, "JBOSS_KIE_EXECUTOR_MDB") {
if env.Name == "JBOSS_KIE_EXECUTOR_MDB_MAX_SESSIONS" && env.Value == "40" {
mdbMaxSessionPassed = true
}
}
Expand All @@ -7302,7 +7302,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") {
Expand Down
6 changes: 3 additions & 3 deletions rhpam-config/7.12.1/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1099,9 +1099,9 @@ servers:
#[[end]]
#[[end]]
## CORS END
#[[if .MDBMaxSession]]
- name: JBOSS_MDB_MAX_SESSIONS
value: "[[.MDBMaxSession]]"
#[[if .KieExecutorMDBMaxSession]]
- name: JBOSS_KIE_EXECUTOR_MDB_MAX_SESSIONS
value: "[[.KieExecutorMDBMaxSession]]"
#[[end]]
livenessProbe:
httpGet:
Expand Down

0 comments on commit 0eb85df

Please sign in to comment.