-
Notifications
You must be signed in to change notification settings - Fork 41.3k
Make kubelet use an arch-specific pause image depending on GOARCH #23059
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
Conversation
GCE e2e build/test failed for commit 66751b4bb050120ac8ef4ccce6e8bb75768a6ff9. Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake. |
Labelling this PR as size/S |
if runtime.GOARCH == "amd64" { | ||
return DefaultPodInfraContainerImageName + ":" + DefaultPodInfraContainerImageVersion | ||
} else { | ||
return DefaultPodInfraContainerImageName + "-" + runtime.GOARCH + ":" + DefaultPodInfraContainerImageVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this pattern was not introduced here but I'm confused as to why we have been putting arch in the image name and not the build tag. It seems like it should be:
gcr.io/google_containers/hyperkube:v1.1.8
gcr.io/google_containers/hyperkube:v1.1.8-386
gcr.io/google_containers/hyperkube:v1.1.8-amd64
gcr.io/google_containers/hyperkube:v1.1.8-arm
gcr.io/google_containers/hyperkube:v1.2.0
gcr.io/google_containers/hyperkube:v1.2.0-386
gcr.io/google_containers/hyperkube:v1.2.0-amd64
gcr.io/google_containers/hyperkube:v1.2.0-arm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ask @brendandburns :)
I'm just following the conventions, but I do prefer binary-arch:version
too, and it's implemented at quite many places atm.
I think we should go with that, but that's just my opinion :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to convince @david-mcmahon next time i see him :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, make sure to have an issue or something if you're planning to change that, so you're listening to the community :)
However, the important thing is consistency. We must choose either and go with that all the time. binary-arch:version
is already implemented in the codebase and for example arm images are pushed with every release with binary-arch:version
naming, so I don't know if it's worth the effort to change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think our consistent should be consistent with other projects. Multi architecture support is recent enough IMO that we could still change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's work in progress. Images like etcd
, hyperkube
, kube-proxy
are turned into etcd-amd64
, hyperkube-amd64
and kube-proxy-amd64
. The older naming convention (hyperkube
is kept for backwards-compability for a while though)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikedanese What do you have to convince me of? I wasn't involved in any of this naming. My general guidance here is to follow a (sane) precedent and to be consistent with other projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So do you vote for binary-arch:version
or binary:version-arch
?
And no, you weren't involved in the naming, but now you are :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is typical for docker containers / other projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docker at least uses armhf/
, armel/
, ppc64le/
and so on for the "official" images.
Not sure if that's related to this, but anyway
GCE e2e build/test passed for commit a6368c13fd842401cee54f6ebd596a97ad62a4cb. |
As #15140 points out, there is many places where the pause image should be standardized and there should be a constant somewhere that the whole codebase should use, but let's take one problem at a time. |
// system default DNS resolver configuration | ||
ResolvConfDefault = "/etc/resolv.conf" | ||
|
||
DefaultPodInfraContainerImageName = "gcr.io/google_containers/pause" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I'd prefer this logic staying out of the kubelet package. cmd/kubelet
seems like a better location
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. we should toggle this when we create the flag so it shows up in --help.
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubelet/app/options/options.go#L154
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So where should I put it? cmd/kubelet/app/constants.go
, cmd/kubelet/app/pause.go
or cmd/kubelet/app/options/options.go
, which do you prefer?
Another option would be breaking out all pause constants to some other place not directly tied to kubelet
.
@vishh Updated. PTAL |
@@ -17,7 +17,7 @@ limitations under the License. | |||
package types | |||
|
|||
const ( | |||
PodInfraContainerImage = "gcr.io/google_containers/pause:2.0" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Remove this empty line.
GCE e2e build/test passed for commit b6f0da976ea49b595c8423c685099c78b77edebe. |
@vishh Fixed the nit. Does this look good to you now? |
GCE e2e build/test passed for commit d8aafd222902d33df9edd138482ab723cfdd5cab. |
LGTM. |
@mikedanese: Do you have any other comments on this PR? If not, this is ready to be merged. |
Even though I despise the image naming convention we've settled on (probably decided by brendan and joe years ago), I will most likely survive. lgtm |
needs an update-generated-docs to update man pages |
Should I run something else? |
Oops bad guess:
|
Labelling this PR as size/M |
GCE e2e build/test passed for commit c6172e5. |
The author of this PR is not in the whitelist for merge, can one of the admins add the 'ok-to-merge' label? |
This works nicely on an ARM host, I tested it now.
And it starts |
Before we commit this: Mike, Why? Can you explain any value or cost to one over the other? To my eyes Are there any other projects with multi-arch outputs? What are they
|
I'm sorry but I don't think there is any other large open-source Go project that is multiarch and comparable to Kubernetes.
|
From that docker issue, do I understand that it is largely undecided yet? I personally think arch has higher precedence than version, so given only
|
Yes, I also see it as largely undecided, and I think it will take a while before docker really implement something usable. I think these images should be multiarch primarily:
Get DNS working:
Docker wrapped Kubernetes binaries:
I worked with the dashboard team, and it has had multiarch support from the first release. When we once has ported Kubernetes to ARM and decided about the naming, it's much easier to add support for ARM 64-bit, ppc64le and maybe some other arch, who knows? |
@thockin @mikedanese @vishh Can we proceed with this one? |
LGTM |
+1 |
@k8s-bot test this Tests are more than 48 hours old. Re-running tests. |
GCE e2e build/test passed for commit c6172e5. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit c6172e5. |
Automatic merge from submit-queue |
Related to: #22876, #22683 and #15140
@ixdy @pwittrock @brendandburns @mikedanese @yujuhong @thockin @zmerlynn