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

Use FORCE_HOST_GO=y when building Kubernetes #2901

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

twz123
Copy link
Member

@twz123 twz123 commented Mar 21, 2023

Description

This is to bypass the automatic Go toolchain download which has been added to Kubernetes 1.27 and has been backported to v1.26.3, v1.25.8 and v1.24.12. See kubernetes/kubernetes#115377 for details on that.

This change is only necessary when bumping to the aforementioned Kubernetes versions, but it doesn't hurt to have it in before the version bumps, so this can be backported down to v1.24.

See also: #2879.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Manual test
  • Auto test added

Checklist:

  • My code follows the style guidelines of this project
  • My commit messages are signed-off
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

This is to bypass the automatic Go toolchain download which has been
added to Kubernetes 1.27 and has been backported to v1.26.3, v1.25.8
and v1.24.12.

Signed-off-by: Tom Wieczorek <[email protected]>
@twz123 twz123 added chore backport/release-1.26 PR that needs to be backported/cherrypicked to release-1.26 branch labels Mar 21, 2023
@twz123 twz123 requested a review from a team as a code owner March 21, 2023 13:57
@twz123 twz123 requested review from ncopa and makhov March 21, 2023 13:57
@twz123
Copy link
Member Author

twz123 commented Mar 21, 2023

Waiting with the version bumps for v1.26.3, v1.25.8 and v1.24.12 until this has been backported to the respective release branches.

@mikhail-sakhnov
Copy link
Contributor

Why don't we want to rely on the auto detection?
Is it because of containerized builds?

@twz123
Copy link
Member Author

twz123 commented Mar 22, 2023

Why don't we want to rely on the auto detection?

Not sure what you mean by auto detection. IIUC the build system will try to fetch the Go version via gimme whenever there's a mismatch between the host's Go version and the Go version that Kubernetes wants to be compiled with. This would mean that whenever the k0s build specifies a different Go version than the one that's defined by Kubernetes, the embedded Kubernetes build will disregard that and try to build itself with another Go version instead. Setting FORCE_HOST_GO=y will bypass that logic.

@mikhail-sakhnov
Copy link
Contributor

@twz123 makes sense, thanks for the clarification

@twz123 twz123 merged commit 6b1fe51 into k0sproject:main Mar 22, 2023
@twz123 twz123 deleted the force-host-go branch March 22, 2023 14:08
@k0s-bot
Copy link

k0s-bot commented Mar 22, 2023

Successfully created backport PR for release-1.26:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/release-1.26 PR that needs to be backported/cherrypicked to release-1.26 branch chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants