Skip to content

Commit

Permalink
Make process number configurable
Browse files Browse the repository at this point in the history
Signed-off-by: Veronika Fisarova <[email protected]>
  • Loading branch information
Deydra71 committed Nov 14, 2024
1 parent 2e94eb1 commit 93ab936
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 1 deletion.
8 changes: 8 additions & 0 deletions api/bases/keystone.openstack.org_keystoneapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,14 @@ spec:
description: PreserveJobs - do not delete jobs after they finished
e.g. to check logs
type: boolean
processNumber:
default: 3
description: Processumber - Number of processes running in keystone
API
format: int32
maximum: 10
minimum: 1
type: integer
rabbitMqClusterName:
default: rabbitmq
description: RabbitMQ instance name Needed to request a transportURL
Expand Down
6 changes: 6 additions & 0 deletions api/v1beta1/keystoneapi_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ type KeystoneAPISpecCore struct {
// Replicas of keystone API to run
Replicas *int32 `json:"replicas"`

// +kubebuilder:validation:Optional
// +kubebuilder:default=3
// +kubebuilder:validation:Minimum=1
// Processumber - Number of processes running in keystone API
ProcessNumber *int32 `json:"processNumber"`

// +kubebuilder:validation:Required
// Secret containing OpenStack password information for keystone AdminPassword
Secret string `json:"secret"`
Expand Down
5 changes: 5 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

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

8 changes: 8 additions & 0 deletions config/crd/bases/keystone.openstack.org_keystoneapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,14 @@ spec:
description: PreserveJobs - do not delete jobs after they finished
e.g. to check logs
type: boolean
processNumber:
default: 3
description: Processumber - Number of processes running in keystone
API
format: int32
maximum: 10
minimum: 1
type: integer
rabbitMqClusterName:
default: rabbitmq
description: RabbitMQ instance name Needed to request a transportURL
Expand Down
1 change: 1 addition & 0 deletions controllers/keystoneapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,7 @@ func (r *KeystoneAPIReconciler) generateServiceConfigMaps(
keystone.DatabaseName,
),
"enableSecureRBAC": instance.Spec.EnableSecureRBAC,
"ProcessNumber": instance.Spec.ProcessNumber,
}

// create httpd vhost template parameters
Expand Down
2 changes: 1 addition & 1 deletion templates/keystoneapi/config/httpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ CustomLog /dev/stdout proxy env=forwarded

## WSGI configuration
WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess {{ $endpt }} display-name={{ $endpt }} group=keystone processes=3 threads=1 user=keystone
WSGIDaemonProcess {{ $endpt }} display-name={{ $endpt }} group=keystone processes={{ $.ProcessNumber }} threads=1 user=keystone
WSGIProcessGroup {{ $endpt }}
WSGIScriptAlias / "/usr/bin/keystone-wsgi-public"
WSGIPassAuthorization On
Expand Down

0 comments on commit 93ab936

Please sign in to comment.