-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
get ETCD version from kubernetes constants #11290
Comments
It's not really in kubernetes but in $ ~/.minikube/cache/linux/v1.20.2/kubeadm config images list
k8s.gcr.io/kube-apiserver:v1.20.7
k8s.gcr.io/kube-controller-manager:v1.20.7
k8s.gcr.io/kube-scheduler:v1.20.7
k8s.gcr.io/kube-proxy:v1.20.7
k8s.gcr.io/pause:3.2
k8s.gcr.io/etcd:3.4.13-0 By default it will try to get latest: Forgot what the reason was (but there was one) for doing it in code, and for duplicating all the constants. |
@medyagh : better fix all of them, if you fix one ? // Pause returns the image name to pull for a given Kubernetes version
func Pause(v semver.Version, mirror string) string
// coreDNS returns the images used for CoreDNS
func coreDNS(v semver.Version, mirror string) string
// etcd returns the image used for etcd
func etcd(v semver.Version, mirror string) string The original code is in cmd/kubeadm/app/images/images.go https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/images/images.go I think the problem was with accessing the earlier releases ? // DefaultEtcdVersion indicates the default etcd version that kubeadm uses
DefaultEtcdVersion = "3.4.13-3"
// CoreDNSVersion is the version of CoreDNS to be deployed if it is used
CoreDNSVersion = "v1.8.0"
// PauseVersion indicates the default pause image version for kubeadm
PauseVersion = "3.4.1" |
Agree. Anyone picking up this task fix all verisons. To get vers through kubeadm |
@medyagh I would like to fix this. |
/assign |
@vigothehacker If you dont mind can I work on this had already started, missed the assign command ? |
yes to get the older release versions. |
I think the reason was that we wanted to know the versions before we downloaded kubeadm... And that not all platforms were able to execute One solution would be to make some kind of mapping table. That is, in markup instead of in code ? ---
v1.21.0:
k8s.gcr.io/kube-apiserver: v1.21.0
k8s.gcr.io/kube-controller-manager: v1.21.0
k8s.gcr.io/kube-scheduler: v1.21.0
k8s.gcr.io/kube-proxy: v1.21.0
k8s.gcr.io/pause: 3.4.1
k8s.gcr.io/etcd: 3.4.13-0
k8s.gcr.io/coredns/coredns: v1.8.0
v1.20.0:
k8s.gcr.io/kube-apiserver: v1.20.0
k8s.gcr.io/kube-controller-manager: v1.20.0
k8s.gcr.io/kube-scheduler: v1.20.0
k8s.gcr.io/kube-proxy: v1.20.0
k8s.gcr.io/pause: 3.2
k8s.gcr.io/etcd: 3.4.13-0
k8s.gcr.io/coredns: 1.7.0
v1.19.0:
k8s.gcr.io/kube-apiserver: v1.19.0
k8s.gcr.io/kube-controller-manager: v1.19.0
k8s.gcr.io/kube-scheduler: v1.19.0
k8s.gcr.io/kube-proxy: v1.19.0
k8s.gcr.io/pause: 3.2
k8s.gcr.io/etcd: 3.4.9-1
k8s.gcr.io/coredns: 1.7.0 Note that you also have to supply --kubernetes-version, or it will auto-update (within each release). |
/unassign |
/assign |
@afbjorklund I'm able to collect the image versions thanks for the inputs. where do we want to stores this image to k8s version map, did you mean this will be some yaml and we use in code to load? |
I'm not sure if the best is to embed some kind of resource, or convert the lookup back into code again. The original input is like: $ curl -o kubeadm-linux-amd64-v1.13.0 https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/linux/amd64/kubeadm
$ chmod +x kubeadm-linux-amd64-v1.13.0
$ ./kubeadm-linux-amd64-v1.13.0 --kubernetes-version=v1.13.0 config images list
k8s.gcr.io/kube-apiserver:v1.13.0
k8s.gcr.io/kube-controller-manager:v1.13.0
k8s.gcr.io/kube-scheduler:v1.13.0
k8s.gcr.io/kube-proxy:v1.13.0
k8s.gcr.io/pause:3.1
k8s.gcr.io/etcd:3.2.24
k8s.gcr.io/coredns:1.2.6 I converted it to some yaml markup like: v1.13.0:
k8s.gcr.io/kube-apiserver: v1.13.0
k8s.gcr.io/kube-controller-manager: v1.13.0
k8s.gcr.io/kube-scheduler: v1.13.0
k8s.gcr.io/kube-proxy: v1.13.0
k8s.gcr.io/pause: 3.1
k8s.gcr.io/etcd: 3.2.24
k8s.gcr.io/coredns: 1.2.6 It would also be possible to use go code: images := make(map[string]map[string]string)
images["v1.13.0"] = map[string]string{
"k8s.gcr.io/kube-apiserver": "v1.13.0",
"k8s.gcr.io/kube-controller-manager": "v1.13.0",
"k8s.gcr.io/kube-scheduler": "v1.13.0",
"k8s.gcr.io/kube-proxy": "v1.13.0",
"k8s.gcr.io/pause": "3.1",
"k8s.gcr.io/etcd": "3.2.24",
"k8s.gcr.io/coredns": "1.2.6",
} Maybe @medyagh has some more thoughts, on what would be the best way to store these constants ? |
I made a PR to update the values for 1.21, while you think of the best solution for 1.22 and beyond... |
@medyagh any comments? |
@Srikrishnabh I agree with what @afbjorklund suggested
|
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
fixes get ETCD version from kubernetes constants #11290
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
This currently creates the following output but it should not:
|
currently in https://github.com/medyagh/minikube/blob/a67a4ccbedd932f184b5713c70498dc434942621/pkg/minikube/bootstrapper/images/images.go#L86
we have
instead we should use this map in kuberentes so we dont have to update this manually
https://github.com/kubernetes/kubernetes/blob/b58a7e233e06f5e4b58a637af8e36cb4f59c001b/cmd/kubeadm/app/constants/constants.go#L452
The text was updated successfully, but these errors were encountered: