Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch introduces TarBits, an implementation of Bits for building the node image from Kubernetes tar image archives. The -type is "tar" and -kube-root may be set to one of three values: 1. A local filesystem path containing the files listed above in a flat structure. 2. An HTTP address that contains the files listed above in a structure that adheres to the layout of the public GCS buckets kubernetes-release and kubernetes-release-dev. For example, if tarRoot is set to https://k8s.ci/v1.13 then the following URIs should be valid: * https://k8s.ci/v1.13/kubernetes.tar.gz * https://k8s.ci/v1.13/bin/GOOS/GOARCH/kube-apiserver.tar * https://k8s.ci/v1.13/bin/GOOS/GOARCH/kube-controller-manager.tar * https://k8s.ci/v1.13/bin/GOOS/GOARCH/kube-scheduler.tar * https://k8s.ci/v1.13/bin/GOOS/GOARCH/kube-proxy.tar * https://k8s.ci/v1.13/bin/GOOS/GOARCH/kubeadm * https://k8s.ci/v1.13/bin/GOOS/GOARCH/kubectl * https://k8s.ci/v1.13/bin/GOOS/GOARCH/kubelet The files are downloaded to "$HOME/.kind/tarbits/VERSION" where VERSION is the value of the "version" file extracted from the kubernetes tarball. 3. A valid semantic version for a released version of Kubernetes or begins with "ci/" or "release/". If the string matches any of these then the value is presumed to be a CI or release build hosted on one of the public GCS buckets. This option also supports values ended with ".txt", ex. "ci/latest.txt". In fact, all values beginning with "ci/" or "release/" are first checked to see if there's a matching txt file for that value. For example, if "ci/latest" is provided then before assuming that is a directory, "ci/latest.txt" is queried. In order to prevent the second two options from conflicting with the first, a local file path, using the prefix "file://" explicitly indicates the given tarRoot is a local file path. The given tarRoot may also take the format tarRoot::localPath where the tarRoot is separated from the local path where the remote files will be downloaded. If no explicit local path is provided then remote files are downloaded to "$HOME/.kind/tarbits/VERSION" where VERSION is the value extracted from the "version" file in the "kubernetes.tar.gz" tarball. If a file is already present on disk with the same size as the remote equivalent, the file will not be downloaded again.
- Loading branch information