• Kubernetes Submit Queue's avatar
    Merge pull request #36361 from ivan4th/build-container-rsync-optimizations · 48cae782
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 38277, 36361, 38452)
    
    Add options for build container rsync optimization
    
    KUBE_RSYNC_COMPRESS env var sets rsync compression level.
    KUBE_RSYNC_GENERATED_TO_BUILD_CONTAINER env var disables rsyncing
    generated files to build containers.
    
    Why KUBE_RSYNC_COMPRESS is needed -- from rsync manual on `--compress` option (implied by non-zero `--compress-level`):
    > Note that this option typically achieves better compression ratios than can be achieved by using a compressing remote shell or a compressing transport because it takes advantage of the implicit information in the matching data blocks that are not explicitly sent over  the connection.
    
    Use case for `KUBE_RSYNC_GENERATED_TO_BUILD_CONTAINER`: when you sometimes build stuff locally (e.g. `make WHAT=cmd/kubectl`) and sometimes do it on remote docker (`build-tools/run.sh make WHAT=cmd/hyperkube`), local builds touch generated files which causes them to be rsynced to the build data container, which may slow down the builds. Still, I'm not sure whether local->remote rsync of generated files is useful (e.g. someone may want to edit generated files for debugging purposes?), so I made not rsyncing these files an option instead of forcing such behavior.
    48cae782
Name
Last commit
Last update
..
build-image Loading commit data...
cni Loading commit data...
debian-iptables Loading commit data...
kube-dns Loading commit data...
lib Loading commit data...
pause Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
common.sh Loading commit data...
copy-output.sh Loading commit data...
make-build-image.sh Loading commit data...
make-clean.sh Loading commit data...
push-federation-images.sh Loading commit data...
release.sh Loading commit data...
run.sh Loading commit data...
shell.sh Loading commit data...
util.sh Loading commit data...