Improve gce bootstrapping in various ways.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
@@ -56,7 +56,9 @@ cp ${ROOT}/contrib/systemd-units/* ${destdir}/etc/systemd/system/
|
||||
mkdir -p ${destdir}/opt/containerd
|
||||
cp -r ${ROOT}/cluster ${destdir}/opt/containerd
|
||||
# Write a version file into the release tarball.
|
||||
echo ${VERSION} > ${destdir}/opt/containerd/cluster/version
|
||||
cat > ${destdir}/opt/containerd/cluster/version <<EOF
|
||||
CONTAINERD_VERSION: $(yaml-quote ${VERSION})
|
||||
EOF
|
||||
|
||||
# Create release tar
|
||||
tarball=${BUILD_DIR}/${TARBALL}
|
||||
|
||||
@@ -95,3 +95,10 @@ from-vendor() {
|
||||
fi
|
||||
eval $setvars
|
||||
}
|
||||
|
||||
# yaml-quote quotes something appropriate for a yaml string.
|
||||
# This is the same with:
|
||||
# https://github.com/kubernetes/kubernetes/blob/v1.10.1/cluster/gce/util.sh#L471.
|
||||
yaml-quote() {
|
||||
echo "'$(echo "${@:-}" | sed -e "s/'/''/g")'"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user