Skip to content

Commit

Permalink
Add parameter to customize the number of manilaAPI processes
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Pantano <[email protected]>
  • Loading branch information
fmount committed Dec 5, 2024
1 parent 2a2058e commit 55cc6a9
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 1 deletion.
8 changes: 8 additions & 0 deletions api/bases/manila.openstack.org_manilaapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,14 @@ spec:
- extraVol
type: object
type: array
httpdCustomization:
properties:
processNumber:
default: 4
format: int32
minimum: 1
type: integer
type: object
networkAttachments:
items:
type: string
Expand Down
8 changes: 8 additions & 0 deletions api/bases/manila.openstack.org_manilas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,14 @@ spec:
items:
type: string
type: array
httpdCustomization:
properties:
processNumber:
default: 4
format: int32
minimum: 1
type: integer
type: object
networkAttachments:
items:
type: string
Expand Down
12 changes: 12 additions & 0 deletions api/v1beta1/manilaapi_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ type ManilaAPITemplate struct {
// +kubebuilder:validation:Required
// ContainerImage - Manila API Container Image URL
ContainerImage string `json:"containerImage"`

// +kubebuilder:validation:Optional
// HttpdCustomization - customize the httpd service
HttpdCustomization HttpdCustomization `json:"httpdCustomization,omitempty"`
}

type HttpdCustomization struct {
// +kubebuilder:validation:Optional
// +kubebuilder:default=4
// +kubebuilder:validation:Minimum=1
// ProcessNumber - Number of processes running in ManilaAPI
ProcessNumber *int32 `json:"processNumber"`
}

// ManilaAPITemplateCore -
Expand Down
21 changes: 21 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/manila.openstack.org_manilaapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,14 @@ spec:
- extraVol
type: object
type: array
httpdCustomization:
properties:
processNumber:
default: 4
format: int32
minimum: 1
type: integer
type: object
networkAttachments:
items:
type: string
Expand Down
8 changes: 8 additions & 0 deletions config/crd/bases/manila.openstack.org_manilas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,14 @@ spec:
items:
type: string
type: array
httpdCustomization:
properties:
processNumber:
default: 4
format: int32
minimum: 1
type: integer
type: object
networkAttachments:
items:
type: string
Expand Down
1 change: 1 addition & 0 deletions controllers/manila_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@ func (r *ManilaReconciler) generateServiceConfig(
manila.DatabaseCRName),
"MemcachedServersWithInet": memcached.GetMemcachedServerListWithInetString(),
"TimeOut": instance.Spec.APITimeout,
"Workers": instance.Spec.ManilaAPI.HttpdCustomization.ProcessNumber,
}

// create httpd vhost template parameters
Expand Down
2 changes: 1 addition & 1 deletion templates/manila/config/10-manila_wsgi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

## WSGI configuration
WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess {{ $endpt }} display-name={{ $endpt }} group=manila processes=4 threads=1 user=manila
WSGIDaemonProcess {{ $endpt }} display-name={{ $endpt }} group=manila processes={{ $.Workers }} threads=1 user=manila
WSGIProcessGroup {{ $endpt }}
WSGIScriptAlias / "/var/www/cgi-bin/manila/manila-wsgi"
WSGIPassAuthorization On
Expand Down

0 comments on commit 55cc6a9

Please sign in to comment.