mirror of https://github.com/k3s-io/k3s
commit
4c118f66b4
|
@ -27,3 +27,57 @@ download-or-bust() {
|
|||
md5sum "$file"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Install salt from GCS. See README.md for instructions on how to update these
|
||||
# debs.
|
||||
install-salt() {
|
||||
local salt_mode="$1"
|
||||
|
||||
if dpkg -s salt-minion &>/dev/null; then
|
||||
echo "== SaltStack already installed, skipping install step =="
|
||||
return
|
||||
fi
|
||||
|
||||
echo "== Refreshing package database =="
|
||||
until apt-get update; do
|
||||
echo "== apt-get update failed, retrying =="
|
||||
echo sleep 5
|
||||
done
|
||||
|
||||
mkdir -p /var/cache/salt-install
|
||||
cd /var/cache/salt-install
|
||||
|
||||
DEBS=(
|
||||
libzmq3_3.2.3+dfsg-1~bpo70~dst+1_amd64.deb
|
||||
python-zmq_13.1.0-1~bpo70~dst+1_amd64.deb
|
||||
salt-common_2014.1.13+ds-1~bpo70+1_all.deb
|
||||
)
|
||||
if [[ "${salt_mode}" == "master" ]]; then
|
||||
DEBS+=( salt-master_2014.1.13+ds-1~bpo70+1_all.deb )
|
||||
fi
|
||||
DEBS+=( salt-minion_2014.1.13+ds-1~bpo70+1_all.deb )
|
||||
URL_BASE="https://storage.googleapis.com/kubernetes-release/salt"
|
||||
|
||||
for deb in "${DEBS[@]}"; do
|
||||
if [ ! -e "${deb}" ]; then
|
||||
download-or-bust "${URL_BASE}/${deb}"
|
||||
fi
|
||||
done
|
||||
|
||||
for deb in "${DEBS[@]}"; do
|
||||
echo "== Installing ${deb}, ignore dependency complaints (will fix later) =="
|
||||
dpkg --skip-same-version --force-depends -i "${deb}"
|
||||
done
|
||||
|
||||
# This will install any of the unmet dependencies from above.
|
||||
echo "== Installing unmet dependencies =="
|
||||
until apt-get install -f -y; do
|
||||
echo "== apt-get install failed, retrying =="
|
||||
echo sleep 5
|
||||
done
|
||||
|
||||
# Log a timestamp
|
||||
echo "== Finished installing Salt =="
|
||||
}
|
||||
|
|
|
@ -51,12 +51,7 @@ reactor:
|
|||
- /srv/reactor/highstate-new.sls
|
||||
EOF
|
||||
|
||||
# Install Salt
|
||||
#
|
||||
# We specify -X to avoid a race condition that can cause minion failure to
|
||||
# install. See https://github.com/saltstack/salt-bootstrap/issues/270
|
||||
#
|
||||
# -M installs the master
|
||||
set +x
|
||||
curl -L --connect-timeout 20 --retry 6 --retry-delay 10 https://bootstrap.saltstack.com | sh -s -- -M -X
|
||||
set -x
|
||||
install-salt master
|
||||
|
||||
service salt-master start
|
||||
service salt-minion start
|
||||
|
|
|
@ -55,9 +55,6 @@ if [[ -n "${DOCKER_ROOT}" ]]; then
|
|||
EOF
|
||||
fi
|
||||
|
||||
install-salt
|
||||
|
||||
# Install Salt
|
||||
#
|
||||
# We specify -X to avoid a race condition that can cause minion failure to
|
||||
# install. See https://github.com/saltstack/salt-bootstrap/issues/270
|
||||
curl -L --connect-timeout 20 --retry 6 --retry-delay 10 https://bootstrap.saltstack.com | sh -s -- -X
|
||||
service salt-minion start
|
||||
|
|
|
@ -552,6 +552,7 @@ function kube-up {
|
|||
echo "SALT_MASTER='${MASTER_INTERNAL_IP}'"
|
||||
echo "MINION_IP_RANGE='${MINION_IP_RANGES[$i]}'"
|
||||
echo "DOCKER_OPTS='${EXTRA_DOCKER_OPTS:-}'"
|
||||
grep -v "^#" "${KUBE_ROOT}/cluster/aws/templates/common.sh"
|
||||
grep -v "^#" "${KUBE_ROOT}/cluster/aws/templates/format-disks.sh"
|
||||
grep -v "^#" "${KUBE_ROOT}/cluster/aws/templates/salt-minion.sh"
|
||||
) > "${KUBE_TEMP}/minion-start-${i}.sh"
|
||||
|
|
|
@ -864,12 +864,8 @@ func (kl *Kubelet) getClusterDNS(pod *api.Pod) ([]string, []string, error) {
|
|||
dns = append([]string{kl.clusterDNS.String()}, hostDNS...)
|
||||
}
|
||||
if kl.clusterDomain != "" {
|
||||
// TODO(vishh): Remove the oldNsDomain entry once the DNS crossover to inject
|
||||
// "svc" is done.
|
||||
oldNsDomain := fmt.Sprintf("%s.%s", pod.Namespace, kl.clusterDomain)
|
||||
nsSvcDomain := fmt.Sprintf("%s.svc.%s", pod.Namespace, kl.clusterDomain)
|
||||
svcDomain := fmt.Sprintf("svc.%s", kl.clusterDomain)
|
||||
dnsSearch = append([]string{oldNsDomain, nsSvcDomain, svcDomain, kl.clusterDomain}, hostSearch...)
|
||||
nsDomain := fmt.Sprintf("%s.%s", pod.Namespace, kl.clusterDomain)
|
||||
dnsSearch = append([]string{nsDomain, kl.clusterDomain}, hostSearch...)
|
||||
}
|
||||
return dns, dnsSearch, nil
|
||||
}
|
||||
|
|
|
@ -36,8 +36,8 @@ package version
|
|||
var (
|
||||
// TODO: Deprecate gitMajor and gitMinor, use only gitVersion instead.
|
||||
gitMajor string = "0" // major version, always numeric
|
||||
gitMinor string = "17.0+" // minor version, numeric possibly followed by "+"
|
||||
gitVersion string = "v0.17.0-dev" // version from git, output of $(git describe)
|
||||
gitMinor string = "17.1+" // minor version, numeric possibly followed by "+"
|
||||
gitVersion string = "v0.17.1-dev" // version from git, output of $(git describe)
|
||||
gitCommit string = "" // sha1 from git, output of $(git rev-parse HEAD)
|
||||
gitTreeState string = "not a git tree" // state of git tree, either "clean" or "dirty"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue