Skip to content
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

Clean up jinja2 conditionals in config template #385

Merged

Conversation

ASBishop
Copy link
Contributor

@ASBishop ASBishop commented Dec 7, 2023

The parent glance controller needs a minimal config that is adequate for generating jobs for DB sync and cronjobs. This patch uses a new "MinimalConfig" environment variable to support that goal, which eliminates the need to wrap every glanceapi variable with its own conditional.

The parent glance controller needs a minimal config that is adequate
for generating jobs for DB sync and cronjobs. This patch uses a
new "MinimalConfig" environment variable to support that goal,
which eliminates the need to wrap every glanceapi variable with
its own conditional.
@ASBishop ASBishop requested review from fmount and konan-abhi December 7, 2023 20:14
@openshift-ci openshift-ci bot requested a review from lewisdenny December 7, 2023 20:14
@ASBishop ASBishop mentioned this pull request Dec 7, 2023
Copy link
Contributor

@fmount fmount left a comment

Choose a reason for hiding this comment

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

This is a good optimization, with an additional bool in the top-level controller we can avoid most of the checks in the 00-config template. We really need the database connection for dbsync an cronjobs, hence I'm +1 to this kind of change.
I also checked the logs and they look good: the minimal config results in:

[DEFAULT]
verbose=True
[database]
connection = **********

Copy link
Contributor

openshift-ci bot commented Dec 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Dec 7, 2023
@fmount
Copy link
Contributor

fmount commented Dec 7, 2023

I'll rebase the barbican patch on top of this, so we don't have to do any additional work there. Thanks @ASBishop for the help!

@openshift-merge-bot openshift-merge-bot bot merged commit b3d8536 into openstack-k8s-operators:main Dec 7, 2023
7 checks passed
@ASBishop ASBishop deleted the template-cleanup branch December 8, 2023 18:27
fmount added a commit to fmount/glance-operator that referenced this pull request May 18, 2024
Somehow the 00-config template introduced by PRs [1][2] has been
reverted. This patch restores the missing file content.

[1] openstack-k8s-operators#385
[2] openstack-k8s-operators#378

Signed-off-by: Francesco Pantano <[email protected]>
fmount added a commit to fmount/glance-operator that referenced this pull request Oct 11, 2024
Somehow the 00-config template introduced by PRs [1][2] has been
reverted. This patch restores the missing file content.

[1] openstack-k8s-operators#385
[2] openstack-k8s-operators#378

Signed-off-by: Francesco Pantano <[email protected]>
fmount added a commit to fmount/glance-operator that referenced this pull request Oct 11, 2024
Somehow the 00-config template introduced by PRs [1][2] has been
reverted. This patch restores the missing file content.

[1] openstack-k8s-operators#385
[2] openstack-k8s-operators#378

Signed-off-by: Francesco Pantano <[email protected]>
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.

2 participants