mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Update after review comments
Signed-off-by: Joakim Roubert <joakimr@axis.com>
This commit is contained in:
parent
405609b920
commit
468611d6e0
@ -108,7 +108,7 @@ function kube::release::package_tarballs() {
|
|||||||
function kube::release::package_src_tarball() {
|
function kube::release::package_src_tarball() {
|
||||||
local -r src_tarball="${RELEASE_TARS}/kubernetes-src.tar.gz"
|
local -r src_tarball="${RELEASE_TARS}/kubernetes-src.tar.gz"
|
||||||
kube::log::status "Building tarball: src"
|
kube::log::status "Building tarball: src"
|
||||||
if [[ "${KUBE_GIT_TREE_STATE-}" == "clean" ]]; then
|
if [ "${KUBE_GIT_TREE_STATE-}" = 'clean' ]; then
|
||||||
git archive -o "${src_tarball}" HEAD
|
git archive -o "${src_tarball}" HEAD
|
||||||
else
|
else
|
||||||
"${TAR}" czf "${src_tarball}" --transform 's|^\.|kubernetes|' -C "${KUBE_ROOT}" "$(cd "${KUBE_ROOT}" && find . -mindepth 1 -maxdepth 1 \
|
"${TAR}" czf "${src_tarball}" --transform 's|^\.|kubernetes|' -C "${KUBE_ROOT}" "$(cd "${KUBE_ROOT}" && find . -mindepth 1 -maxdepth 1 \
|
||||||
@ -138,7 +138,7 @@ function kube::release::package_client_tarballs() {
|
|||||||
mkdir -p "${release_stage}/client/bin"
|
mkdir -p "${release_stage}/client/bin"
|
||||||
|
|
||||||
local client_bins=("${KUBE_CLIENT_BINARIES[@]}")
|
local client_bins=("${KUBE_CLIENT_BINARIES[@]}")
|
||||||
if [[ "${platform%/*}" == "windows" ]]; then
|
if [ "${platform%/*}" = 'windows' ]; then
|
||||||
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
|
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ function kube::release::package_node_tarballs() {
|
|||||||
mkdir -p "${release_stage}/node/bin"
|
mkdir -p "${release_stage}/node/bin"
|
||||||
|
|
||||||
local node_bins=("${KUBE_NODE_BINARIES[@]}")
|
local node_bins=("${KUBE_NODE_BINARIES[@]}")
|
||||||
if [[ "${platform%/*}" == "windows" ]]; then
|
if [ "${platform%/*}" = 'windows' ]; then
|
||||||
node_bins=("${KUBE_NODE_BINARIES_WIN[@]}")
|
node_bins=("${KUBE_NODE_BINARIES_WIN[@]}")
|
||||||
fi
|
fi
|
||||||
# This fancy expression will expand to prepend a path
|
# This fancy expression will expand to prepend a path
|
||||||
@ -188,7 +188,7 @@ function kube::release::package_node_tarballs() {
|
|||||||
|
|
||||||
# Include the client binaries here too as they are useful debugging tools.
|
# Include the client binaries here too as they are useful debugging tools.
|
||||||
local client_bins=("${KUBE_CLIENT_BINARIES[@]}")
|
local client_bins=("${KUBE_CLIENT_BINARIES[@]}")
|
||||||
if [[ "${platform%/*}" == "windows" ]]; then
|
if [ "${platform%/*}" = 'windows' ]; then
|
||||||
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
|
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
|
||||||
fi
|
fi
|
||||||
# This fancy expression will expand to prepend a path
|
# This fancy expression will expand to prepend a path
|
||||||
@ -260,7 +260,7 @@ function kube::release::package_server_tarballs() {
|
|||||||
# Include the client binaries here too as they are useful debugging tools.
|
# Include the client binaries here too as they are useful debugging tools.
|
||||||
local client_bins
|
local client_bins
|
||||||
client_bins=("${KUBE_CLIENT_BINARIES[@]}")
|
client_bins=("${KUBE_CLIENT_BINARIES[@]}")
|
||||||
if [[ "${platform%/*}" == "windows" ]]; then
|
if [ "${platform%/*}" = 'windows' ]; then
|
||||||
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
|
client_bins=("${KUBE_CLIENT_BINARIES_WIN[@]}")
|
||||||
fi
|
fi
|
||||||
# This fancy expression will expand to prepend a path
|
# This fancy expression will expand to prepend a path
|
||||||
@ -308,7 +308,7 @@ function kube::release::build_hyperkube_image() {
|
|||||||
|
|
||||||
local hyperkube_tag
|
local hyperkube_tag
|
||||||
hyperkube_tag="${registry}/hyperkube-${arch}:${version}"
|
hyperkube_tag="${registry}/hyperkube-${arch}:${version}"
|
||||||
if [[ -n "${save_dir}" ]]; then
|
if [ -n "${save_dir}" ]; then
|
||||||
"${DOCKER[@]}" save "${hyperkube_tag}" > "${save_dir}/hyperkube-${arch}.tar"
|
"${DOCKER[@]}" save "${hyperkube_tag}" > "${save_dir}/hyperkube-${arch}.tar"
|
||||||
fi
|
fi
|
||||||
kube::log::status "Deleting hyperkube image ${hyperkube_tag}"
|
kube::log::status "Deleting hyperkube image ${hyperkube_tag}"
|
||||||
@ -326,7 +326,7 @@ function kube::release::build_conformance_image() {
|
|||||||
|
|
||||||
local conformance_tag
|
local conformance_tag
|
||||||
conformance_tag="${registry}/conformance-${arch}:${version}"
|
conformance_tag="${registry}/conformance-${arch}:${version}"
|
||||||
if [[ -n "${save_dir}" ]]; then
|
if [ -n "${save_dir}" ]; then
|
||||||
"${DOCKER[@]}" save "${conformance_tag}" > "${save_dir}/conformance-${arch}.tar"
|
"${DOCKER[@]}" save "${conformance_tag}" > "${save_dir}/conformance-${arch}.tar"
|
||||||
fi
|
fi
|
||||||
kube::log::status "Deleting conformance image ${conformance_tag}"
|
kube::log::status "Deleting conformance image ${conformance_tag}"
|
||||||
@ -357,7 +357,7 @@ function kube::release::create_docker_images_for_server() {
|
|||||||
local -r docker_registry="k8s.gcr.io"
|
local -r docker_registry="k8s.gcr.io"
|
||||||
# Docker tags cannot contain '+'
|
# Docker tags cannot contain '+'
|
||||||
local docker_tag="${KUBE_GIT_VERSION/+/_}"
|
local docker_tag="${KUBE_GIT_VERSION/+/_}"
|
||||||
if [[ -z "${docker_tag}" ]]; then
|
if [ -z "${docker_tag}" ]; then
|
||||||
kube::log::error "git version information missing; cannot create Docker tag"
|
kube::log::error "git version information missing; cannot create Docker tag"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -401,11 +401,11 @@ EOF
|
|||||||
echo "COPY nsswitch.conf /etc/" >> "${docker_file_path}"
|
echo "COPY nsswitch.conf /etc/" >> "${docker_file_path}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"${DOCKER[@]}" build "${docker_build_opts}" -q -t "${docker_image_tag}" "${docker_build_path}" >/dev/null
|
"${DOCKER[@]}" build ${docker_build_opts:+"${docker_build_opts}"} -q -t "${docker_image_tag}" "${docker_build_path}" >/dev/null
|
||||||
# If we are building an official/alpha/beta release we want to keep
|
# If we are building an official/alpha/beta release we want to keep
|
||||||
# docker images and tag them appropriately.
|
# docker images and tag them appropriately.
|
||||||
local -r release_docker_image_tag="${KUBE_DOCKER_REGISTRY-$docker_registry}/${binary_name}-${arch}:${KUBE_DOCKER_IMAGE_TAG-$docker_tag}"
|
local -r release_docker_image_tag="${KUBE_DOCKER_REGISTRY-$docker_registry}/${binary_name}-${arch}:${KUBE_DOCKER_IMAGE_TAG-$docker_tag}"
|
||||||
if [[ "${release_docker_image_tag}" != "${docker_image_tag}" ]]; then
|
if [ "${release_docker_image_tag}" != "${docker_image_tag}" ]; then
|
||||||
kube::log::status "Tagging docker image ${docker_image_tag} as ${release_docker_image_tag}"
|
kube::log::status "Tagging docker image ${docker_image_tag} as ${release_docker_image_tag}"
|
||||||
"${DOCKER[@]}" rmi "${release_docker_image_tag}" 2>/dev/null || true
|
"${DOCKER[@]}" rmi "${release_docker_image_tag}" 2>/dev/null || true
|
||||||
"${DOCKER[@]}" tag "${docker_image_tag}" "${release_docker_image_tag}" 2>/dev/null
|
"${DOCKER[@]}" tag "${docker_image_tag}" "${release_docker_image_tag}" 2>/dev/null
|
||||||
@ -463,7 +463,7 @@ function kube::release::package_kube_manifests_tarball() {
|
|||||||
done
|
done
|
||||||
cp "${KUBE_ROOT}/cluster/gce/gci/configure-helper.sh" "${dst_dir}/gci-configure-helper.sh"
|
cp "${KUBE_ROOT}/cluster/gce/gci/configure-helper.sh" "${dst_dir}/gci-configure-helper.sh"
|
||||||
cp "${KUBE_ROOT}/cluster/gce/gci/configure-kubeapiserver.sh" "${dst_dir}/configure-kubeapiserver.sh"
|
cp "${KUBE_ROOT}/cluster/gce/gci/configure-kubeapiserver.sh" "${dst_dir}/configure-kubeapiserver.sh"
|
||||||
if [[ -e "${KUBE_ROOT}/cluster/gce/gci/gke-internal-configure-helper.sh" ]]; then
|
if [ -e "${KUBE_ROOT}/cluster/gce/gci/gke-internal-configure-helper.sh" ]; then
|
||||||
cp "${KUBE_ROOT}/cluster/gce/gci/gke-internal-configure-helper.sh" "${dst_dir}/"
|
cp "${KUBE_ROOT}/cluster/gce/gci/gke-internal-configure-helper.sh" "${dst_dir}/"
|
||||||
fi
|
fi
|
||||||
cp "${KUBE_ROOT}/cluster/gce/gci/health-monitor.sh" "${dst_dir}/health-monitor.sh"
|
cp "${KUBE_ROOT}/cluster/gce/gci/health-monitor.sh" "${dst_dir}/health-monitor.sh"
|
||||||
@ -473,7 +473,7 @@ function kube::release::package_kube_manifests_tarball() {
|
|||||||
# Merge GCE-specific addons with general purpose addons.
|
# Merge GCE-specific addons with general purpose addons.
|
||||||
local gce_objects
|
local gce_objects
|
||||||
gce_objects=$(cd "${KUBE_ROOT}/cluster/gce/addons" && find . \( -name \*.yaml -or -name \*.yaml.in -or -name \*.json \) \( -not -name \*demo\* \))
|
gce_objects=$(cd "${KUBE_ROOT}/cluster/gce/addons" && find . \( -name \*.yaml -or -name \*.yaml.in -or -name \*.json \) \( -not -name \*demo\* \))
|
||||||
if [[ -n "${gce_objects}" ]]; then
|
if [ -n "${gce_objects}" ]; then
|
||||||
tar c -C "${KUBE_ROOT}/cluster/gce/addons" "${gce_objects}" | tar x -C "${dst_dir}"
|
tar c -C "${KUBE_ROOT}/cluster/gce/addons" "${gce_objects}" | tar x -C "${dst_dir}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -507,7 +507,7 @@ function kube::release::package_test_platform_tarballs() {
|
|||||||
mkdir -p "${release_stage}/test/bin"
|
mkdir -p "${release_stage}/test/bin"
|
||||||
|
|
||||||
local test_bins=("${KUBE_TEST_BINARIES[@]}")
|
local test_bins=("${KUBE_TEST_BINARIES[@]}")
|
||||||
if [[ "${platform%/*}" == "windows" ]]; then
|
if [ "${platform%/*}" = 'windows' ]; then
|
||||||
test_bins=("${KUBE_TEST_BINARIES_WIN[@]}")
|
test_bins=("${KUBE_TEST_BINARIES_WIN[@]}")
|
||||||
fi
|
fi
|
||||||
# This fancy expression will expand to prepend a path
|
# This fancy expression will expand to prepend a path
|
||||||
|
Loading…
Reference in New Issue
Block a user