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

🌱 IdentityRefProvider: DRY obtaining OpenStackIdentityRef #2132

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

mdbooth
Copy link
Contributor

@mdbooth mdbooth commented Jun 24, 2024

As we add more resource controllers the pattern of adding another
NewClientScopeFromFoo to ScopeFactory is becoming more cumbersome. This
allows them all to use a common interface.

Summary of changes

  • Addition of infrav1.IdentityRefProvider
  • Implementations of IdentityRefProvider for OpenStackMachine, OpenStackCluster, and OpenStackFloatingIPPool
  • Replace NewClientScopeFrom* in scope.Factory with a single NewClientScopeScopeFromObject which takes a list of IdentityRefProvider

The reason it takes a list rather than a single object is so OpenStackMachine can continue to implement a fallback where it will use the IdentityRef from OpenStackCluster if it is not defined on the OpenStackMachine.

/hold

As we add more resource controllers the pattern of adding another
NewClientScopeFromFoo to ScopeFactory is becoming more cumbersome. This
allows them all to use a common interface.
@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 24, 2024
Copy link

netlify bot commented Jun 24, 2024

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit c5ed533
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/66796f768252ba0008e8ebb6
😎 Deploy Preview https://deploy-preview-2132--kubernetes-sigs-cluster-api-openstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mdbooth mdbooth changed the title IdentityRefProvider: DRY obtaining OpenStackIdentityRef 🌱 IdentityRefProvider: DRY obtaining OpenStackIdentityRef Jun 24, 2024
@EmilienM
Copy link
Contributor

/lgtm
/approve
very handy, thanks

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 24, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: EmilienM

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2024
@mdbooth
Copy link
Contributor Author

mdbooth commented Jun 24, 2024

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 24, 2024
@k8s-ci-robot k8s-ci-robot merged commit 6a5a926 into kubernetes-sigs:main Jun 24, 2024
9 checks passed
@mdbooth mdbooth deleted the identityrefprovider branch June 24, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants