Skip to content

Commit 6e628c6

Browse files
committed
Make process number configurable
Signed-off-by: Veronika Fisarova <[email protected]>
1 parent 2e94eb1 commit 6e628c6

File tree

6 files changed

+58
-1
lines changed

6 files changed

+58
-1
lines changed

api/bases/keystone.openstack.org_keystoneapis.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ spec:
103103
format: int32
104104
minimum: 1
105105
type: integer
106+
httpdCustomization:
107+
description: HttpdCustomization - customize the httpd service
108+
properties:
109+
processNumber:
110+
default: 3
111+
description: ProcessNumber - Number of processes running in keystone
112+
API
113+
format: int32
114+
minimum: 1
115+
type: integer
116+
type: object
106117
memcachedInstance:
107118
default: memcached
108119
description: Memcached instance name.

api/v1beta1/keystoneapi_types.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ type KeystoneAPISpecCore struct {
157157
// TODO: -> implement
158158
DefaultConfigOverwrite map[string]string `json:"defaultConfigOverwrite,omitempty"`
159159

160+
// +kubebuilder:validation:Optional
161+
// HttpdCustomization - customize the httpd service
162+
HttpdCustomization HttpdCustomization `json:"httpdCustomization,omitempty"`
163+
160164
// +kubebuilder:validation:Optional
161165
// Resources - Compute Resources required by this service (Limits/Requests).
162166
// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
@@ -197,6 +201,15 @@ type PasswordSelector struct {
197201
Admin string `json:"admin"`
198202
}
199203

204+
// HttpdCustomization - customize the httpd service
205+
type HttpdCustomization struct {
206+
// +kubebuilder:validation:Optional
207+
// +kubebuilder:default=3
208+
// +kubebuilder:validation:Minimum=1
209+
// ProcessNumber - Number of processes running in keystone API
210+
ProcessNumber *int32 `json:"processNumber"`
211+
}
212+
200213
// KeystoneAPIStatus defines the observed state of KeystoneAPI
201214
type KeystoneAPIStatus struct {
202215
// ReadyCount of keystone API instances

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/keystone.openstack.org_keystoneapis.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ spec:
103103
format: int32
104104
minimum: 1
105105
type: integer
106+
httpdCustomization:
107+
description: HttpdCustomization - customize the httpd service
108+
properties:
109+
processNumber:
110+
default: 3
111+
description: ProcessNumber - Number of processes running in keystone
112+
API
113+
format: int32
114+
minimum: 1
115+
type: integer
116+
type: object
106117
memcachedInstance:
107118
default: memcached
108119
description: Memcached instance name.

controllers/keystoneapi_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,7 @@ func (r *KeystoneAPIReconciler) generateServiceConfigMaps(
11901190
keystone.DatabaseName,
11911191
),
11921192
"enableSecureRBAC": instance.Spec.EnableSecureRBAC,
1193+
"ProcessNumber": instance.Spec.HttpdCustomization.ProcessNumber,
11931194
}
11941195

11951196
// create httpd vhost template parameters

templates/keystoneapi/config/httpd.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ CustomLog /dev/stdout proxy env=forwarded
5353

5454
## WSGI configuration
5555
WSGIApplicationGroup %{GLOBAL}
56-
WSGIDaemonProcess {{ $endpt }} display-name={{ $endpt }} group=keystone processes=3 threads=1 user=keystone
56+
WSGIDaemonProcess {{ $endpt }} display-name={{ $endpt }} group=keystone processes={{ $.ProcessNumber }} threads=1 user=keystone
5757
WSGIProcessGroup {{ $endpt }}
5858
WSGIScriptAlias / "/usr/bin/keystone-wsgi-public"
5959
WSGIPassAuthorization On

0 commit comments

Comments
 (0)