fix(loadbalancer): pass region to openstack-port-cni-k8s charm#808
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR ensures the openstack-port-cni-k8s charm is configured with the correct OpenStack region during loadbalancer (Amphora) CNI deployment, avoiding authentication failures in multi-region environments where the charm would otherwise default to RegionOne.
Changes:
- Pass the deployment region (
deployment.get_region_name()) into the loadbalancer CNI Terraform plan via a new tfvar. - Add a new Terraform variable
openstack-port-cni-regionto the deploy-cni plan. - Merge the region into the
openstack-port-cni-k8sJuju application config alongside any existing charm config.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| sunbeam-python/sunbeam/features/loadbalancer/feature.py | Passes the deployment region into the deploy-cni Terraform apply as an override tfvar. |
| sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/variables.tf | Introduces a Terraform variable to carry the OpenStack region name into the plan. |
| sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/main.tf | Injects the region into the openstack-port-cni-k8s charm config using merge(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
openstack-port-cni-k8s has a 'region' config option used when authenticating with OpenStack. Without it the daemon defaults to RegionOne, which causes authentication failures in multi-region deployments. Add an 'openstack-port-cni-region' Terraform variable to the deploy-cni plan and merge it into the charm's config block so that a manifest-level config override cannot accidentally unset it. Pass the value from deployment.get_region_name() in DeployAmphoraInfraStep.run(), consistent with how other charms in the deployment pick up the configured region. Partial-Fix: https://bugs.launchpad.net/snap-openstack/+bug/2155113 Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
33b8e6a to
1f97475
Compare
gboutry
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
openstack-port-cni-k8s has a 'region' config option used when authenticating with OpenStack. Without it the daemon defaults to RegionOne, which causes authentication failures in multi-region deployments.
Add an 'openstack-port-cni-region' Terraform variable to the deploy-cni plan and merge it into the charm's config block so that a manifest-level config override cannot accidentally unset it. Pass the value from deployment.get_region_name() in DeployAmphoraInfraStep.run(), consistent with how other charms in the deployment pick up the configured region.
Partial-Fix: https://bugs.launchpad.net/snap-openstack/+bug/2155113
Assisted-By: Claude Sonnet 4.6 noreply@anthropic.com