• Kubernetes Submit Queue's avatar
    Merge pull request #39898 from ixdy/bazel-release-tars · b29d9cdb
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    Build release tars using bazel
    
    **What this PR does / why we need it**: builds equivalents of the various kubernetes release tarballs, solely using bazel.
    
    For example, you can now do
    ```console
    $ make bazel-release
    $ hack/e2e.go -v -up -test -down
    ```
    
    **Special notes for your reviewer**: this is currently dependent on https://github.com/ixdy/bazel/commit/3b29803eb528ff525c7024190ffbf4b08c598cf2, which I have yet to turn into a pull request, since I'm still trying to figure out if this is the best approach.
    
    Basically, the issue comes up with the way we generate the various server docker image tarfiles and load them on nodes:
    * we `md5sum` the binary being encapsulated (e.g. kube-proxy) and save that to `$binary.docker_tag` in the server tarball
    * we then build the docker image and tag using that md5sum (e.g. `gcr.io/google_containers/kube-proxy:$MD5SUM`)
    * we `docker save` this image, which embeds the full tag in the `$binary.tar` file.
    * on cluster startup, we `docker load` these tarballs, which are loaded with the tag that we'd created at build time. the nodes then use the `$binary.docker_tag` file to find the right image.
    
    With the current bazel `docker_build` rule, the tag isn't saved in the docker image tar, so the node is unable to find the image after `docker load`ing it.
    
    My changes to the rule save the tag in the docker image tar, though I don't know if there are subtle issues with it. (Maybe we want to only tag when `--stamp` is given?)
    
    Also, the docker images produced by bazel have the timestamp set to the unix epoch, which is not great for debugging. Might be another thing to change with a `--stamp`.
    
    Long story short, we probably need to follow up with bazel folks on the best way to solve this problem.
    
    **Release note**:
    
    ```release-note
    NONE
    ```
    b29d9cdb
Name
Last commit
Last update
.github Loading commit data...
Godeps Loading commit data...
api Loading commit data...
build Loading commit data...
cluster Loading commit data...
cmd Loading commit data...
docs Loading commit data...
examples Loading commit data...
federation Loading commit data...
hack Loading commit data...
hooks Loading commit data...
logo Loading commit data...
pkg Loading commit data...
plugin Loading commit data...
staging Loading commit data...
test Loading commit data...
third_party Loading commit data...
translations Loading commit data...
vendor Loading commit data...
.gazelcfg.json Loading commit data...
.generated_docs Loading commit data...
.generated_files Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
BUILD.bazel Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
Makefile.generated_files Loading commit data...
OWNERS Loading commit data...
OWNERS_ALIASES Loading commit data...
README.md Loading commit data...
Vagrantfile Loading commit data...
WORKSPACE Loading commit data...
code-of-conduct.md Loading commit data...
labels.yaml Loading commit data...