Skip to content

feat(api): Add kubernetes version to coredns version mapping #939

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

Merged
merged 4 commits into from
Oct 10, 2024

Conversation

thunderboltsid
Copy link
Contributor

@thunderboltsid thunderboltsid commented Oct 8, 2024

Added script and makefile target to update coredns version mapping.
make coredns.sync will fetch the list of releases from upstream
release branches and create a mapping of k8s versions to coredns versions.

@thunderboltsid thunderboltsid changed the title api(coredns): Add kubernetes version to coredns version mapping feat(api): Add kubernetes version to coredns version mapping Oct 8, 2024
@github-actions github-actions bot added feature and removed feature labels Oct 8, 2024
@thunderboltsid thunderboltsid force-pushed the jira/NCN-103034 branch 3 times, most recently from 024a4d0 to a1fb6f4 Compare October 8, 2024 09:30
Added script and makefile target to update coredns version mapping.
`make coredns.sync` will fetch the list of releases from upstream
release branches and create a mapping k8s releases to coredns
versions.
@jimmidyson
Copy link
Member

Can you explain how this is used? The CoreDNS version mapping aren't referenced anywhere in this PR.

@thunderboltsid
Copy link
Contributor Author

thunderboltsid commented Oct 8, 2024

Can you explain how this is used? The CoreDNS version mapping aren't referenced anywhere in this PR.

Indeed, this PR just adds the mapping. We will need more changes to actually use that mapping (subsequent PRs). For cluster-class based clusters, we need a post cluster upgrade hook in CAREN that will set the CoreDNS version to the new version. For classic clusters, CAREN isn't in the picture, so we will need to also adopt that logic in the classic upgrade path.

@jimmidyson
Copy link
Member

Ah OK this is for the CoreDNS upgrade issue

@github-actions github-actions bot added feature and removed feature labels Oct 8, 2024
Copy link
Contributor

@dkoshkin dkoshkin 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 automating this!

this allows us to parse and ignore patch version, etc. in params.
@dlipovetsky
Copy link
Contributor

Question: How do we ensure that the mapping stays up-to-date with the supported Kubernetes versions? I'm not sure that we define "supported Kubernetes versions" anywhere in the repo, actually. We also have a mapping

k8sMinorVersionToCCMVersion:
"1.27": "v1.27.9"
"1.28": "v1.28.9"
"1.29": "v1.29.6"
"1.30": "v1.30.3"
"1.31": "v1.31.0"
of versions for a different purpose.

I think we need a "source of truth" for supported Kubernetes versions, but we don't have to add it in this PR.

@thunderboltsid thunderboltsid enabled auto-merge (squash) October 10, 2024 18:42
@dkoshkin
Copy link
Contributor

Thanks for updating the semver package.

@thunderboltsid
Copy link
Contributor Author

Question: How do we ensure that the mapping stays up-to-date with the supported Kubernetes versions? I'm not sure that we define "supported Kubernetes versions" anywhere in the repo, actually. We also have a mapping

k8sMinorVersionToCCMVersion:
"1.27": "v1.27.9"
"1.28": "v1.28.9"
"1.29": "v1.29.6"
"1.30": "v1.30.3"
"1.31": "v1.31.0"

of versions for a different purpose.
I think we need a "source of truth" for supported Kubernetes versions, but we don't have to add it in this PR.

The script in this PR looks for every version greater than a minimum version (default v1.22: 10 versions old). The source of truth is basically lookups to k/k every time this script is run (pre-commit).

@thunderboltsid thunderboltsid merged commit 4751e3c into main Oct 10, 2024
21 checks passed
@thunderboltsid thunderboltsid deleted the jira/NCN-103034 branch October 10, 2024 20:50
@dkoshkin dkoshkin mentioned this pull request Oct 15, 2024
jimmidyson pushed a commit that referenced this pull request Oct 15, 2024
🤖 I have created a release *beep* *boop*
---


## 0.18.0 (2024-10-15)

<!-- Release notes generated using configuration in .github/release.yaml
at main -->

## What's Changed
### Exciting New Features 🎉
* feat: Add feature-gates plumbing by @jimmidyson in
#919
* feat(api): Add kubernetes version to coredns version mapping by
@thunderboltsid in
#939
### Fixes 🔧
* fix: Shorten readiness probe period to try to prevent races by
@jimmidyson in
#930
* fix: Rename webhook container to manager by @jimmidyson in
#932
* fix: list correct registry.k8s.io/sig-storage/csi-snapshotter image by
@dkoshkin in
#943
* fix: include kube-vip image in generated caren-images.txt by @dkoshkin
in
#940
### Other Changes
* test(e2e): Add v1.30.5 test for Nutanix by @thunderboltsid in
#931
* build: Enable building binary only on macos by @jimmidyson in
#918
* build(deps): Update clusterctl binary to v1.8.3 by @thunderboltsid in
#929


**Full Changelog**:
v0.17.0...v0.18.0

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants