• 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
..
etcd.sh Loading commit data...
golang.sh Loading commit data...
init.sh Loading commit data...
swagger.sh Loading commit data...
test.sh Loading commit data...
util.sh Loading commit data...
version.sh Loading commit data...