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

improve "make update-kubeadm-constants" to go over "Patch" versions of kuberentes #13338

Closed
medyagh opened this issue Jan 12, 2022 · 2 comments · Fixed by #13349
Closed

improve "make update-kubeadm-constants" to go over "Patch" versions of kuberentes #13338

medyagh opened this issue Jan 12, 2022 · 2 comments · Fixed by #13349
Assignees
Labels
kind/improvement Categorizes issue or PR as related to improving upon a current feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@medyagh
Copy link
Member

medyagh commented Jan 12, 2022

we have an automation for bumping the kubeadm constants,

make update-kubeadm-constants

thats runs as a cron job in github action
https://github.com/kubernetes/minikube/blob/master/.github/workflows/update-kubadm-constants.yml

that creates a PR like this
#13336

the code for the script is in
https://github.com/kubernetes/minikube/blob/master/hack/update/kubeadm_constants/update_kubeadm_constants.go

the current code goes over kubernetes Minor Versions (1.22, 1.23,...)
and then downloads the kubeadm for that minior version and then runs "config images list"

$ curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.24.0-alpha.1/bin/linux/amd64/kubeadm

$ ./kubeadm config images list
k8s.gcr.io/kube-apiserver:v1.23.1
k8s.gcr.io/kube-controller-manager:v1.23.1
k8s.gcr.io/kube-scheduler:v1.23.1
k8s.gcr.io/kube-proxy:v1.23.1
k8s.gcr.io/pause:3.6
k8s.gcr.io/etcd:3.5.1-0
k8s.gcr.io/coredns/coredns:v1.8.6

I noticed for 1.24 it still using

k8s.gcr.io/kube-apiserver:v1.23.1

then @afbjorklund pointed out that we should pass the --kuberntes-version to the $ ./kubeadm config images list command

which gives us this:

$ ./kubeadm config images list --kubernetes-version=1.24.0
W0112 14:59:03.059033 1526372 images.go:80] could not find officially supported version of etcd for Kubernetes v1.24.0, falling back to the nearest etcd version (3.5.1-0)
k8s.gcr.io/kube-apiserver:v1.24.0
k8s.gcr.io/kube-controller-manager:v1.24.0
k8s.gcr.io/kube-scheduler:v1.24.0
k8s.gcr.io/kube-proxy:v1.24.0
k8s.gcr.io/pause:3.6
k8s.gcr.io/etcd:3.5.1-0
k8s.gcr.io/coredns/coredns:v1.8.6

so we need to change our automation to go over all releases of kubernetes (including patched versions)
and run the

kubeadm config images list --kubernetes-version=VERSION

this will make a huge constants file but since it is auto-generated it is okay.
and this will make preload tar bals accurate and user wont have to re-download the image again

@afbjorklund
Copy link
Collaborator

afbjorklund commented Jan 12, 2022

You can probably remove all the kubernetes components from the version list, since they always match ?

k8s.gcr.io/kube-apiserver:v1.24.0
k8s.gcr.io/kube-controller-manager:v1.24.0
k8s.gcr.io/kube-scheduler:v1.24.0
k8s.gcr.io/kube-proxy:v1.24.0
k8s.gcr.io/pause:3.6
k8s.gcr.io/etcd:3.5.1-0
k8s.gcr.io/coredns/coredns:v1.8.6

Maybe double-check the names or something. If there is a new component, or someone moved something.

@medyagh medyagh changed the title improve "make update-kubeadm-constants" to go over Patch versions improve "make update-kubeadm-constants" to go over "Patch" versions of kuberentes Jan 12, 2022
@medyagh
Copy link
Member Author

medyagh commented Jan 12, 2022

You can probably remove all the kubernetes components from the version list, since they always match ?

k8s.gcr.io/kube-apiserver:v1.24.0 k8s.gcr.io/kube-controller-manager:v1.24.0 k8s.gcr.io/kube-scheduler:v1.24.0 k8s.gcr.io/kube-proxy:v1.24.0 k8s.gcr.io/pause:3.6 k8s.gcr.io/etcd:3.5.1-0 k8s.gcr.io/coredns/coredns:v1.8.6

Maybe double-check the names or something. If there is a new component, or someone moved something.

thats intersting,

look at this experiment, seems like kubeadm just dumbly prints whatever we pass to it

16:25:34 medya
$ ./kubeadm config images list --kubernetes-version=1.23.100000
k8s.gcr.io/kube-apiserver:v1.23.100000
k8s.gcr.io/kube-controller-manager:v1.23.100000
k8s.gcr.io/kube-scheduler:v1.23.100000
k8s.gcr.io/kube-proxy:v1.23.100000
k8s.gcr.io/pause:3.6
k8s.gcr.io/etcd:3.5.1-0
k8s.gcr.io/coredns/coredns:v1.8.6

@spowelljr spowelljr self-assigned this Jan 19, 2022
@spowelljr spowelljr added kind/improvement Categorizes issue or PR as related to improving upon a current feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement Categorizes issue or PR as related to improving upon a current feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants