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

📖 Proposal for microversion support #1565

Merged

Conversation

lentzi90
Copy link
Contributor

What this PR does / why we need it:

This is a proposal related to #1448 for how to support more microversions in CAPO.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
This is just a proposal so it won't contain the actual implementation.

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • if necessary:
    • includes documentation
    • adds unit tests

/hold

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels May 26, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lentzi90

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 26, 2023
@netlify
Copy link

netlify bot commented May 26, 2023

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

Name Link
🔨 Latest commit a6938bf
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/649031250fb1d90008fa204f
😎 Deploy Preview https://deploy-preview-1565--kubernetes-sigs-cluster-api-openstack.netlify.app/print
📱 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 settings.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 26, 2023
@lentzi90 lentzi90 force-pushed the lentzi90/microversion-proposal branch from 36cea4d to 395d4e7 Compare May 26, 2023 11:27
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 26, 2023
@lentzi90 lentzi90 mentioned this pull request May 29, 2023
5 tasks
Copy link
Contributor

@dulek dulek left a comment

Choose a reason for hiding this comment

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

I like this, this is exactly how I believe microversions should be consumed.

docs/proposals/20230525-openstack-microversion-support.md Outdated Show resolved Hide resolved
### Implementation details and notes

There is already one part of CAPO that actually has dynamic versioning, thanks to Gophercloud.
The [authentication](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/904381c7f31f8fdda83586f208339cd2aab53e78/pkg/scope/provider.go#L173) flow makes use of [this function](https://github.com/gophercloud/gophercloud/blob/6e1423b668969548d46fd862202a3bf9623b52e0/openstack/client.go#L92-L112) that chooses the version from a list of supported versions, provided by the caller, and the range of versions supported by the server.
Copy link
Contributor

@dulek dulek May 30, 2023

Choose a reason for hiding this comment

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

That's not really a microversion. I get the point, but this example is super simple. I believe this is a better one: https://github.com/kubernetes/cloud-provider-openstack/blob/35ce5a0c59da23795fc48b292e3736f8cb0bb10f/pkg/util/openstack/loadbalancer.go#L101-L162

Please note this is not really a microversion either, Octavia does regular API versioning and you cannot request an older microversion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I added the linked example but I also kept the original since I think it can still be useful for the implementation.

Copy link
Contributor

@seanschneeweiss seanschneeweiss left a comment

Choose a reason for hiding this comment

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

Thanks for putting the effort into microversion handling.

The `clouds.yaml` configuration file already has support for specifying the version so this should be familiar to many users.
However, Gophercloud does not support reading all the versions from this file as of now.
The main reason for avoiding this alternative, though, is the lack of control that CAPO has.
With a well defined list of supported and tested versions, perhaps it could still be considered.
Copy link
Contributor

Choose a reason for hiding this comment

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

A well defined list of supported and tested versions would be nice.
Howerver, I don't think it should be expected that our list is a complete list of all available microversions of OpenStack Cinder, Manila, Barbican, Nova and wether we tested or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very true. I'm mainly keeping this here as a reminder of where the discussion started. That is, I wanted to let the user pick the version (with all the consequences that it brings). So if we created a list of known good versions for CAPO (the list could have a single version even) then maybe we could still consider this implementation. The user could check that the version they set is supported, but in theory they could then still set an unsupported version (with the risks that it would bring).

This adds a proposal for how CAPO could support more than one
microversion. The current situation is that we hard code a microversion
that is then used for all API calls. This is currently done for Nova.
Other clients are not configured with a version as of now.
@lentzi90 lentzi90 force-pushed the lentzi90/microversion-proposal branch from 395d4e7 to a6938bf Compare June 19, 2023 10:42
@lentzi90 lentzi90 changed the title WIP: 📖 Proposal for microversion support 📖 Proposal for microversion support Jun 19, 2023
@lentzi90 lentzi90 marked this pull request as ready for review June 19, 2023 11:11
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 19, 2023
@mdbooth
Copy link
Contributor

mdbooth commented Jul 3, 2023

I like this as a problem statement. However, to merge it I think we'd want a discussion of the proposed implementation. There was one at some point. Do you want to add it to the doc?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 20, 2024
@lentzi90
Copy link
Contributor Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 22, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 21, 2024
@lentzi90
Copy link
Contributor Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 22, 2024
@mdbooth
Copy link
Contributor

mdbooth commented Apr 30, 2024

I knew you'd previously created a design doc repo! Lets merge this and I'll update mine to correspond.

/lgtm

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

Thanks!
/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 Apr 30, 2024
@k8s-ci-robot k8s-ci-robot merged commit a0da592 into kubernetes-sigs:main Apr 30, 2024
3 checks passed
@lentzi90 lentzi90 deleted the lentzi90/microversion-proposal branch May 2, 2024 05:14
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
None yet
Development

Successfully merging this pull request may close these issues.

7 participants