Skip to content

Introduce project IDs to OpenStack client initialization#580

Merged
Bobi-Wan merged 6 commits intogardener:mainfrom
Bobi-Wan:feat/openstack-client-extract-project
Aug 6, 2025
Merged

Introduce project IDs to OpenStack client initialization#580
Bobi-Wan merged 6 commits intogardener:mainfrom
Bobi-Wan:feat/openstack-client-extract-project

Conversation

@Bobi-Wan
Copy link
Copy Markdown
Contributor

@Bobi-Wan Bobi-Wan commented Aug 5, 2025

What this PR does / why we need it:
With this PR, OpenStack clients retrieve the project IDs of their respective user/app credential during client creation.
This is done by creating a separate identity client, used for listing all available projects and filtering out the one with a name equal to the name configured in the client credentials. Since we also specify domain name there, we can count on there only being one project with such a name, as they should be unique per domain.
This project ID is then used to filter out most resource ListAvailable requests to be scoped to the current project (not all available ones, which might be in another project our client has access to). This excludes containers and objects, since they aren't project scoped. Extra logic might be introduced there.

Also fixed some minor issues:

  • OpenStack LB collection metric (inventory_openstack_loadbalancers) wasn't correctly populated.
  • OpenStack networks used the metric name of OpenStack servers, causing incorrect data for the second and missing for the first

Release note:

Introduce Project ID to OpenStack client initialization.

…his filters out available resources that belong to a project not pointed to by current client credentials (not owned by the scope).

fixes:
- loadbalancer - fix metric counter to properly show loadbalancers collected
- network - fix metric name. Previously used the one for servers, causing incorrect data to be reported.
@Bobi-Wan Bobi-Wan requested a review from a team as a code owner August 5, 2025 14:34
@gardener-robot gardener-robot added needs/review Needs review size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 5, 2025
Copy link
Copy Markdown
Member

@dnaeon dnaeon left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review labels Aug 6, 2025
@Bobi-Wan Bobi-Wan merged commit c9f082f into gardener:main Aug 6, 2025
4 checks passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Aug 6, 2025
@Bobi-Wan Bobi-Wan deleted the feat/openstack-client-extract-project branch January 7, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewed/lgtm Has approval for merging size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/closed Issue is closed (either delivered or triaged)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants