-
Notifications
You must be signed in to change notification settings - Fork 504
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
Add manifest support for release images #516
Conversation
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.
LGTM I guess.
@ixdy @jdumars @david-mcmahon @calebamiles
anago
Outdated
# Check for manifest-tool, if not install it | ||
if [[ ! -f $(which manifest-tool) ]]; then | ||
MANIFEST_TOOL_PATH=${MANIFEST_TOOL_PATH:-$(mktemp -d -t manifest)} | ||
PATH=$MANIFEST_TOOL_PATH:$PATH |
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.
@ixdy @david-mcmahon Where do you want to put this? Globally in e.g. /usr/local/bin
if not present or in temp or whatever?
An alternative would be to use download the latest docker 18.02 client binary and use that for "official" pushing
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'd prefer this to instruct the user to Do The Right Thing and install it somewhere permanent.
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.
+1 to David's comment
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've already included this tool in Dockerfile.k8s-cloud-builder
file and will be used if we use cloud-builder. Above flow is only for people who are trying it out locally. Having said that I'll add an instruction to install the tool and rerun the script if we don't find a tool in the path.
@david-mcmahon @jdumars @luxas @ixdy Does is it make sense?
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.
Yes, just look at the way the other prerequisites check and notify on dependencies and follow suit. There is still local usage of the tooling so we want to get that right.
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.
@david-mcmahon @jdumars fixed it, PTAL latest commit. -Thanks
lib/releaselib.sh
Outdated
@@ -927,8 +929,8 @@ release::docker::release () { | |||
|
|||
# 'gcloud docker' gives lots of internal_failure's so add retries to | |||
# all of the invocations | |||
for arch in "${KUBE_SERVER_PLATFORMS[@]##*/}"; do | |||
for binary in "${binaries[@]}"; do | |||
for binary in "${binaries[@]}"; do |
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.
Why reverse the loop flow here?
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.
This reverse will help me running manifest in outer loop for every binary.
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.
This branch of the if/else is defunct starting with kubernetes 1.8 (kubernetes/kubernetes#47939). You should probably add this new logic to the release::docker::release_from_tarfiles
function instead.
I tried running the build |
I am not sure this is possible without certain Google privs. @calebamiles might be able to verify that. |
lib/releaselib.sh
Outdated
@@ -910,6 +910,8 @@ release::docker::release () { | |||
"kube-proxy" | |||
"hyperkube" | |||
) | |||
# ml_platforms should be in the os1/arch1,os2/arch2,os3/arch3 form |
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 does ml
stand for? I keep reading "machine learning", which I'm sure is wrong.
lib/releaselib.sh
Outdated
@@ -910,6 +910,8 @@ release::docker::release () { | |||
"kube-proxy" | |||
"hyperkube" | |||
) | |||
# ml_platforms should be in the os1/arch1,os2/arch2,os3/arch3 form | |||
local -r ml_platforms= $(echo "${KUBE_SERVER_PLATFORMS[@]}" | sed "s/ /,/g") |
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.
instead of using sed, you could do something like
local -r platforms=$(IFS=, ; echo "${KUBE_SERVER_PLATFORMS[*]}")
(I think)
@ixdy fixed all your review comments, can you PTAL? @calebamiles can you please invoke mock release see how are things? |
ping @ixdy @calebamiles |
00dfcc0
to
ca87d64
Compare
anago
Outdated
if [[ ! -f $(which manifest-tool) ]]; then | ||
logecho -r "$FAILED" | ||
logecho "No manifest-tool found in the path. Please install it from" \ | ||
"https://github.com/estesp/manifest-tool/releases and set the path variable" |
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.
...and ensure it is on the PATH.
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.
@david-mcmahon fixed it, PTAL.
/cc |
Based on the *UPDATE (Feb 2018)" item in the https://github.com/estesp/manifest-tool README, should we shift here to a pure docker solution to this? |
docker solution got merged via docker/cli#138 which will be in |
Kubernetes isn't even on 17.x last I checked. Might be worth using something else for a while until people are ready to use such a recent docker version? |
Giving this a try and getting:
|
@deitch can you please log issues for what's broken for multi-arch clusters separately from this one? i'd like to track it |
I would be happy to, but I need to do it methodically. Forgive me if it takes a week or two for me to find a day to sit down and document. :-) |
@deitch Ack no worries! :) |
@mkumatag Don't we have to enable the experimental support on the CLI and docker daemon in this script? |
Is this still "priority/critical-urgent"? |
@jdumars we'd like to sort this out for 1.12 release. the earlier we can try this out the better our chances of ensuring we have the right images when we cut the release. |
Yes, experimental support should be enabled only in the cli and not in the daemon but not sure whether we should enable part of script! |
Can we detect that it is not enabled then print out instructions to enable it? We probably shouldn't muck with docker config in the scripts. |
Maybe check that $ docker version -f '{{.Client.Experimental}}'
true |
added the check, ptal to the latest commit. |
anago
Outdated
fi | ||
logecho -r "$OK" | ||
|
||
# TODO: Remove this section once docker manifest command promted |
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.
promted -> promoted.
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.
will do that..
anago
Outdated
logecho -n "Checking Docker CLI Experimental status: " | ||
cli_experimental=$(docker version --format '{{.Client.Experimental}}' | cut -d"-" -f1) | ||
if [[ "${cli_experimental}" == "false" ]]; then | ||
echo "dsdmsdsmdsdsd :>>>>${cli_experimental}<<<<<" |
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.
remove debug statement please
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.
oops.. :P my bad...
Tiny nit @mkumatag |
fixed them.. |
/lgtm |
Generally LGTM, we should get this tested out. 😬 Thanks for keeping after this! |
I'm basically LGTM as well, but would like @tpepper to be involved as well. |
/milestone v1.12 |
I'm good with this commit and LGTM, but would like a @calebamiles review here also. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: calebamiles, dims, mkumatag The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This will enable pushing manifest image for release images
Refer #248 for more information.