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

📖 clarify semantic meaning of the Version fields #11564

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rccrdpccl
Copy link

@rccrdpccl rccrdpccl commented Dec 12, 2024

What this PR does / why we need it:
The aim of this PR is to clarify the semantic meaning of the Version fields. At the moment, the documentation heavily implies that version fields should contain a Kubernetes version.
However this is problematic when working with Kubernetes distributions, especially the ones with a versioning schema totally different from Kubernetes (i.e. OpenShift).

UX problem

At the moment, to install a k8s distribution, the user needs to work out what k8s version corresponds to the desired k8s distribution version. However, this is not even always possible: for example, in the OpenShift case, a minor release is based on a given Z patch of k8s, and other Z releases for the same Y version might be based on the same k8s Z patch. As a practical example, OpenShift 4.17.0 is based on 1.30.4 and OpenShift 4.17.1 is also based on 1.30.4, making a bidirectional conversion actually impossible.

Kubernetes version references

Unfortunately this is not straightforward, as there are multiple references to explicit Kubernetes versions.

  • machine preflight check explicitly referencing a kubernetes version (since when the skew version policy changes). In this case the referenced version is 1.28.0, which should fall out of support in less than 12 months time
  • setting minimum version. In this case, we might be able to drop this check as Cluster API already doesn't support versions below 1.22 (in this case we're toggling between 1.20 and 1.22)

… to Kubernetes distribution version

Signed-off-by: Riccardo Piccoli <[email protected]>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 12, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign fabriziopandini for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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
Copy link
Contributor

This PR is currently missing an area label, which is used to identify the modified component when generating release notes.

Area labels can be added by org members by writing /area ${COMPONENT} in a comment

Please see the labels list for possible areas.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/needs-area PR is missing an area label label Dec 12, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @rccrdpccl!

It looks like this is your first PR to kubernetes-sigs/cluster-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 12, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @rccrdpccl. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@rccrdpccl rccrdpccl changed the title change semantic meaning of the Version fields from Kubernetes version… 📖 change semantic meaning of the Version fields from Kubernetes version… Dec 12, 2024
@rccrdpccl rccrdpccl changed the title 📖 change semantic meaning of the Version fields from Kubernetes version… 📖 change semantic meaning of the Version fields Dec 12, 2024
@fabriziopandini fabriziopandini changed the title 📖 change semantic meaning of the Version fields 📖 clarify semantic meaning of the Version fields Dec 12, 2024
@fabriziopandini
Copy link
Member

fabriziopandini commented Dec 12, 2024

I don't mind adding distribution after kubernetes version in go doc, many companies use custom versioning schema, but as a matter of fact the codebase is full of assumptions that this field has a direct correlation with the Kubernetes version being installed.

Top of mind we have similar assumptions in KCP/CABPK, most probably also in the topology controller and the E2E test framework, and I would not be surprised if we have assumption on version in other places as well.

Also, the K8s version being installed is a key information we need to have for implementing support of any new K8s version whenever it introduces a change that requires special handling (and this happens more often that you might expect); also the entire test matrix for our supported versions is based on this information.

This make me wondering if we are going down on a slippery path if we start decoupling the kubernetes distribution version from the actual kubernetes version being installed.

@vincepri @enxebre @sbueringer opinions? should we move this discussion to an issue first?

@fabriziopandini
Copy link
Member

Also @chrischdi

@enxebre
Copy link
Member

enxebre commented Dec 17, 2024

Generally speaking, moving towards having better supportability for distros to handle their versioning makes sense to me. That should hopefully come without any loss or impact for KCP/CABPK/... and for the special handling scenarios, while still enabling other building blocks to replace KCP/CABPK in a meaningful manner. A less convoluted path to satisfy both scenarios might be having a new field for the distro version? so then we have semantics for both and is up to implementers how to leverage them together. I agree with Fabrizio that this deserves thorough discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants