Skip to content

Consume common templates via CommonTemplates field#1119

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
fmount:templates
May 19, 2026
Merged

Consume common templates via CommonTemplates field#1119
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
fmount:templates

Conversation

@fmount
Copy link
Copy Markdown
Contributor

@fmount fmount commented May 18, 2026

The ssl.conf httpd configuration is duplicated across service operators.
This patch removes the local copy and consumes it from lib-common.

Jira: OSPRH-30239

Remove duplicated templates from the operator and consume them
from lib-common via the CommonTemplates field. This allows
maintaining common configuration files (e.g. ssl.conf) in a
single location across all operators.

Signed-off-by: Francesco Pantano <fpantano@redhat.com>
@openshift-ci openshift-ci Bot requested a review from auniyal61 May 18, 2026 15:23
Copy link
Copy Markdown
Contributor

@stuggi stuggi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 19, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fmount, stuggi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit 4d37539 into openstack-k8s-operators:main May 19, 2026
7 checks passed
@SeanMooney
Copy link
Copy Markdown
Contributor

sharing the ssl.conf may make sense but the httpd config tends to be at least partly service specific

nova has 2 rest apis for example and neither can run with multiple threads they have to be scaled by process or replicas. the most obvious delta is the path to the wsgi module is service dependent

This commit seam ok to me but also i don't really see the maintenance of these files being worth the added complexity of now needing the go to lib common to understand how that is deployed.

@fmount
Copy link
Copy Markdown
Contributor Author

fmount commented May 19, 2026

sharing the ssl.conf may make sense but the httpd config tends to be at least partly service specific

nova has 2 rest apis for example and neither can run with multiple threads they have to be scaled by process or replicas. the most obvious delta is the path to the wsgi module is service dependent

This commit seam ok to me but also i don't really see the maintenance of these files being worth the added complexity of now needing the go to lib common to understand how that is deployed.

Thanks for the comment, @SeanMooney.

Deduplicating common configurations (e.g., ssl.conf in this case) is part of a broader effort to maintain consistency across the board. This approach significantly streamlines maintenance by allowing us to update shared components with a single PR, rather than creating ~20 individual patches and the associated bureaucracy.
Additionally, using CommonTemplates []string allows you to selectively pull the templates you need from a shared location. Ultimately, it gives the operator the flexibility to either use the common template or define a custom one directly within the service operator.
I agree that httpd.conf does not fit how nova generates the config, but in the storage operators area I plan to deduplicate this file as well and convert it into a template. This makes sense because in that case it includes the specific VHost (which is really the custom part) which resides in the service operator's templates/ directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants