-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework the whole Manila configuration process #125
Rework the whole Manila configuration process #125
Conversation
01753cb
to
54b3bc5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good @fmount - sorry for the delay on the review.
I have one minor comment and two questions inline, please take a look :)
Thanks @silvacarloss for the review! Regarding code deduplication, I think we need to follow up on that: this change is big enough and hard to review because of many changes (but all of them are connected together). We'll talk more about it and |
/test manila-operator-build-deploy-kuttl |
The kuttl error here is pretty clear at this point:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, Francesco! Thank you for working on this change
This patch represents an implementation of the proposal [1] and aligns the manila-operator with the work already done in Cinder and the other operators. There are a few relevant changes in the bootstrap process of Manila, in particular: 1. It stops using an InitContainer to generate the snippet files that configure each Manila service. The logic that was previously implemented in the InitContainer has been moved to the Controllers, where config files are generated and stored in k8s Secrets. 2. InitContainers are fully removed from the bootstrap process; It uses to copy additional files (httpd and wsgi config in manila-api) to the target directories, and mount the generated config (0{0,1,2,3}-config.conf to /etc/manila/manila.conf.d, which is used by each service to run; 3. The relevant content, including scripts, previously stored in a ConfigMap, are now stored in a corresponding k8s Secret, which is mounted to the Service deployment Pods; A total of 4 config snippet files are generated: - 00-config.conf contains global settings that are common to every Manila Pod, including ones that are derived from deployment secrets (e.g. database password, etc.) - 01-config.conf contains the global customServiceConfig settings that apply to every Manila service. - 02-config.conf contains the customServiceConfig settings that are specific to each service. - 03-config.conf contains secrets specified by each service's customServiceConfigSecrets. logging.conf has been removed as it' s no longer required in the switch to a side container approach for logging purposes, which will be part of a follow up PR. Finally, functional tests are aligned to the use of k8s Secrets instead of the old pattern based on ConfigMaps; kuttl tests are updated and the initContainer has been removed. DBsync now mounts only the required files (a minimal 00-config.conf) and a db-sync-config.json containing the command run through kolla. [1] openstack-k8s-operators/dev-docs#31 Signed-off-by: Francesco Pantano <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
thanks @fmount
@@ -79,7 +79,7 @@ type ManilaServiceTemplate struct { | |||
// +kubebuilder:default="# add your customization here" | |||
// CustomServiceConfig - customize the service config using this parameter to change service defaults, | |||
// or overwrite rendered information using raw OpenStack config format. The content gets added to | |||
// to /etc/<service>/<service>.conf.d directory as custom.conf file. | |||
// to /etc/<service>/<service>.conf.d directory a custom config file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: as a custom config file
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fmount, gouthampacha, silvacarloss The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest-required |
Tardy LGTM. Thanks, Francesco! |
This patch represents an implementation of the proposal [1] and aligns the
manila-operator
with the work already done inCinder
and the other operators.There are a few relevant changes in the bootstrap process of Manila, in particular:
It stops using an
InitContainer
to generate the snippet files that configure each Manila service. The logic that was previously implemented in theInitContainer
has been moved to the Controllers, where config files are generated and stored in k8sSecrets
.InitContainers
are fully removed from the bootstrap process; It uses to copy additional files (httpd and wsgi config in manila-api) to the target directories, and mount the generated config (0{0,1,2,3}-config.conf
to/etc/manila/manila.conf.d
, which is used by each service to run;The relevant content, including scripts, previously stored in a
ConfigMap
, are now stored in a corresponding k8sSecret
, which is mounted to the Service deployment Pods; A total of 4 config snippet files are generated:logging.conf
has been removed as it' s no longer required in the switch to a side container approach for logging purposes, which will be part of a follow up PR.Finally, functional tests are aligned to the use of k8s
Secrets
instead of the old pattern based onConfigMaps
;kuttl
tests are updated and theinitContainer
has been removed.DBsync
now mounts only the required files (a minimal00-config.conf
) and adb-sync-config.json
containing the command run throughkolla
.[1] openstack-k8s-operators/dev-docs#31