mirror of https://github.com/k3s-io/k3s
cluster/gce: Rename coreos to container-linux.
parent
ef44fa1919
commit
dd59aa1c3b
|
@ -376,7 +376,7 @@ function kube::release::package_kube_manifests_tarball() {
|
|||
cp "${KUBE_ROOT}/cluster/gce/gci/configure-helper.sh" "${dst_dir}/gci-configure-helper.sh"
|
||||
cp "${KUBE_ROOT}/cluster/gce/gci/mounter/mounter" "${dst_dir}/gci-mounter"
|
||||
cp "${KUBE_ROOT}/cluster/gce/gci/health-monitor.sh" "${dst_dir}/health-monitor.sh"
|
||||
cp "${KUBE_ROOT}/cluster/gce/coreos/configure-helper.sh" "${dst_dir}/coreos-configure-helper.sh"
|
||||
cp "${KUBE_ROOT}/cluster/gce/container-linux/configure-helper.sh" "${dst_dir}/container-linux-configure-helper.sh"
|
||||
cp -r "${salt_dir}/kube-admission-controls/limit-range" "${dst_dir}"
|
||||
local objects
|
||||
objects=$(cd "${KUBE_ROOT}/cluster/addons" && find . \( -name \*.yaml -or -name \*.yaml.in -or -name \*.json \) | grep -v demo)
|
||||
|
|
|
@ -439,10 +439,10 @@ function find-release-tars() {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# This tarball is used by GCI, Ubuntu Trusty, and CoreOS.
|
||||
# This tarball is used by GCI, Ubuntu Trusty, and Container Linux.
|
||||
KUBE_MANIFESTS_TAR=
|
||||
if [[ "${MASTER_OS_DISTRIBUTION:-}" == "trusty" || "${MASTER_OS_DISTRIBUTION:-}" == "gci" || "${MASTER_OS_DISTRIBUTION:-}" == "coreos" ]] || \
|
||||
[[ "${NODE_OS_DISTRIBUTION:-}" == "trusty" || "${NODE_OS_DISTRIBUTION:-}" == "gci" || "${NODE_OS_DISTRIBUTION:-}" == "coreos" ]] ; then
|
||||
if [[ "${MASTER_OS_DISTRIBUTION:-}" == "trusty" || "${MASTER_OS_DISTRIBUTION:-}" == "gci" || "${MASTER_OS_DISTRIBUTION:-}" == "container-linux" ]] || \
|
||||
[[ "${NODE_OS_DISTRIBUTION:-}" == "trusty" || "${NODE_OS_DISTRIBUTION:-}" == "gci" || "${NODE_OS_DISTRIBUTION:-}" == "container-linux" ]] ; then
|
||||
KUBE_MANIFESTS_TAR="${KUBE_ROOT}/server/kubernetes-manifests.tar.gz"
|
||||
if [[ ! -f "${KUBE_MANIFESTS_TAR}" ]]; then
|
||||
KUBE_MANIFESTS_TAR="${KUBE_ROOT}/_output/release-tars/kubernetes-manifests.tar.gz"
|
||||
|
@ -573,9 +573,9 @@ function build-kube-env {
|
|||
local server_binary_tar_url=$SERVER_BINARY_TAR_URL
|
||||
local salt_tar_url=$SALT_TAR_URL
|
||||
local kube_manifests_tar_url="${KUBE_MANIFESTS_TAR_URL:-}"
|
||||
if [[ "${master}" == "true" && "${MASTER_OS_DISTRIBUTION}" == "coreos" ]] || \
|
||||
[[ "${master}" == "false" && "${NODE_OS_DISTRIBUTION}" == "coreos" ]] ; then
|
||||
# TODO: Support fallback .tar.gz settings on CoreOS
|
||||
if [[ "${master}" == "true" && "${MASTER_OS_DISTRIBUTION}" == "container-linux" ]] || \
|
||||
[[ "${master}" == "false" && "${NODE_OS_DISTRIBUTION}" == "container-linux" ]] ; then
|
||||
# TODO: Support fallback .tar.gz settings on Container Linux
|
||||
server_binary_tar_url=$(split_csv "${SERVER_BINARY_TAR_URL}")
|
||||
salt_tar_url=$(split_csv "${SALT_TAR_URL}")
|
||||
kube_manifests_tar_url=$(split_csv "${KUBE_MANIFESTS_TAR_URL}")
|
||||
|
@ -655,8 +655,8 @@ EOF
|
|||
TERMINATED_POD_GC_THRESHOLD: $(yaml-quote ${TERMINATED_POD_GC_THRESHOLD})
|
||||
EOF
|
||||
fi
|
||||
if [[ "${master}" == "true" && ("${MASTER_OS_DISTRIBUTION}" == "trusty" || "${MASTER_OS_DISTRIBUTION}" == "gci" || "${MASTER_OS_DISTRIBUTION}" == "coreos") ]] || \
|
||||
[[ "${master}" == "false" && ("${NODE_OS_DISTRIBUTION}" == "trusty" || "${NODE_OS_DISTRIBUTION}" == "gci" || "${NODE_OS_DISTRIBUTION}" == "coreos") ]] ; then
|
||||
if [[ "${master}" == "true" && ("${MASTER_OS_DISTRIBUTION}" == "trusty" || "${MASTER_OS_DISTRIBUTION}" == "gci" || "${MASTER_OS_DISTRIBUTION}" == "container-linux") ]] || \
|
||||
[[ "${master}" == "false" && ("${NODE_OS_DISTRIBUTION}" == "trusty" || "${NODE_OS_DISTRIBUTION}" == "gci" || "${NODE_OS_DISTRIBUTION}" == "container-linux") ]] ; then
|
||||
cat >>$file <<EOF
|
||||
KUBE_MANIFESTS_TAR_URL: $(yaml-quote ${kube_manifests_tar_url})
|
||||
KUBE_MANIFESTS_TAR_HASH: $(yaml-quote ${KUBE_MANIFESTS_TAR_HASH})
|
||||
|
@ -799,9 +799,9 @@ EOF
|
|||
EVICTION_HARD: $(yaml-quote ${EVICTION_HARD})
|
||||
EOF
|
||||
fi
|
||||
if [[ "${master}" == "true" && "${MASTER_OS_DISTRIBUTION}" == "coreos" ]] || \
|
||||
[[ "${master}" == "false" && "${NODE_OS_DISTRIBUTION}" == "coreos" ]]; then
|
||||
# CoreOS-only env vars. TODO(yifan): Make them available on other distros.
|
||||
if [[ "${master}" == "true" && "${MASTER_OS_DISTRIBUTION}" == "container-linux" ]] || \
|
||||
[[ "${master}" == "false" && "${NODE_OS_DISTRIBUTION}" == "container-linux" ]]; then
|
||||
# Container-Linux-only env vars. TODO(yifan): Make them available on other distros.
|
||||
cat >>$file <<EOF
|
||||
KUBERNETES_CONTAINER_RUNTIME: $(yaml-quote ${CONTAINER_RUNTIME:-rkt})
|
||||
RKT_VERSION: $(yaml-quote ${RKT_VERSION:-})
|
||||
|
|
|
@ -39,6 +39,13 @@ KUBE_DELETE_NETWORK=${KUBE_DELETE_NETWORK:-false}
|
|||
|
||||
MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
|
||||
NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-debian}}
|
||||
if [[ "${MASTER_OS_DISTRIBUTION}" == "coreos" ]]; then
|
||||
MASTER_OS_DISTRIBUTION="container-linux"
|
||||
fi
|
||||
if [[ "${NODE_OS_DISTRIBUTION}" == "coreos" ]]; then
|
||||
NODE_OS_DISTRIBUTION="container-linux"
|
||||
fi
|
||||
|
||||
# By default a cluster will be started with the master on GCI and nodes on
|
||||
# containervm. If you are updating the containervm version, update this
|
||||
# variable. Also please update corresponding image for node e2e at:
|
||||
|
|
|
@ -40,6 +40,13 @@ KUBE_DELETE_NETWORK=${KUBE_DELETE_NETWORK:-true}
|
|||
|
||||
MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
|
||||
NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-debian}}
|
||||
if [[ "${MASTER_OS_DISTRIBUTION}" == "coreos" ]]; then
|
||||
MASTER_OS_DISTRIBUTION="container-linux"
|
||||
fi
|
||||
if [[ "${NODE_OS_DISTRIBUTION}" == "coreos" ]]; then
|
||||
NODE_OS_DISTRIBUTION="container-linux"
|
||||
fi
|
||||
|
||||
# By default a cluster will be started with the master on GCI and nodes on
|
||||
# containervm. If you are updating the containervm version, update this
|
||||
# variable. Also please update corresponding image for node e2e at:
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# Container Linux image
|
||||
|
||||
The [Container Linux Operating System](https://coreos.com/why/) is a Linux distribution optimized for running containers securely at scale.
|
||||
CoreOS provides [a Container Linux image](https://coreos.com/os/docs/latest/booting-on-google-compute-engine.html) for Google Cloud Platform (GCP).
|
||||
|
||||
This folder contains configuration and tooling to allow kube-up to create a Kubernetes cluster on Google Cloud Platform running on the official Container Linux image.
|
||||
|
||||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/gce/container-linux/README.md?pixel)]()
|
|
@ -1268,5 +1268,4 @@ else
|
|||
start-image-puller
|
||||
fi
|
||||
fi
|
||||
start-fluentd
|
||||
echo "Done for the configuration for kubernetes"
|
|
@ -147,7 +147,7 @@ function install-kube-binary-config {
|
|||
find "${dst_dir}" -name \*.manifest -or -name \*.json | \
|
||||
xargs sed -ri "s@(image\":\s+\")gcr.io/google_containers@\1${kube_addon_registry}@"
|
||||
fi
|
||||
cp "${dst_dir}/kubernetes/gci-trusty/coreos-configure-helper.sh" "${KUBE_HOME}/bin/configure-helper.sh"
|
||||
cp "${dst_dir}/kubernetes/gci-trusty/container-linux-configure-helper.sh" "${KUBE_HOME}/bin/configure-helper.sh"
|
||||
chmod -R 755 "${kube_bin}"
|
||||
|
||||
# Clean up.
|
||||
|
@ -167,7 +167,7 @@ source "${KUBE_HOME}/kube-env"
|
|||
install-kube-binary-config
|
||||
echo "Done for installing kubernetes files"
|
||||
|
||||
# On CoreOS, the hosts is in /usr/share/baselayout/hosts
|
||||
# On Container Linux, the hosts is in /usr/share/baselayout/hosts
|
||||
# So we need to manually populdate the hosts file here on gce.
|
||||
echo "127.0.0.1 localhost" >> /etc/hosts
|
||||
echo "::1 localhost" >> /etc/hosts
|
|
@ -14,6 +14,6 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# A library of helper functions and constants for the CoreOS distro
|
||||
# A library of helper functions and constants for the Container Linux distro.
|
||||
|
||||
# This file intentionally left blank
|
|
@ -14,8 +14,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# A library of helper functions and constant for coreos os distro
|
||||
source "${KUBE_ROOT}/cluster/gce/coreos/helper.sh"
|
||||
# A library of helper functions and constant for the Container Linux distro.
|
||||
source "${KUBE_ROOT}/cluster/gce/container-linux/helper.sh"
|
||||
|
||||
# create-master-instance creates the master instance. If called with
|
||||
# an argument, the argument is used as the name to a reserved IP
|
||||
|
@ -85,7 +85,7 @@ function create-master-instance-internal() {
|
|||
--scopes "storage-ro,compute-rw,monitoring,logging-write" \
|
||||
--can-ip-forward \
|
||||
--metadata-from-file \
|
||||
"kube-env=${KUBE_TEMP}/master-kube-env.yaml,user-data=${KUBE_ROOT}/cluster/gce/coreos/master.yaml,configure-sh=${KUBE_ROOT}/cluster/gce/coreos/configure.sh,cluster-name=${KUBE_TEMP}/cluster-name.txt" \
|
||||
"kube-env=${KUBE_TEMP}/master-kube-env.yaml,user-data=${KUBE_ROOT}/cluster/gce/container-linux/master.yaml,configure-sh=${KUBE_ROOT}/cluster/gce/container-linux/configure.sh,cluster-name=${KUBE_TEMP}/cluster-name.txt" \
|
||||
--disk "name=${master_name}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" \
|
||||
--boot-disk-size "${MASTER_ROOT_DISK_SIZE:-30}" \
|
||||
${preemptible_master}
|
|
@ -14,8 +14,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# A library of helper functions and constant for the CoreOS distro
|
||||
source "${KUBE_ROOT}/cluster/gce/coreos/helper.sh"
|
||||
# A library of helper functions and constant for the Container Linux distro.
|
||||
source "${KUBE_ROOT}/cluster/gce/container-linux/helper.sh"
|
||||
|
||||
# $1: template name (required).
|
||||
function create-node-instance-template {
|
||||
|
@ -23,8 +23,8 @@ function create-node-instance-template {
|
|||
|
||||
create-node-template "$template_name" "${scope_flags[*]}" \
|
||||
"kube-env=${KUBE_TEMP}/node-kube-env.yaml" \
|
||||
"user-data=${KUBE_ROOT}/cluster/gce/coreos/node.yaml" \
|
||||
"configure-sh=${KUBE_ROOT}/cluster/gce/coreos/configure.sh" \
|
||||
"user-data=${KUBE_ROOT}/cluster/gce/container-linux/node.yaml" \
|
||||
"configure-sh=${KUBE_ROOT}/cluster/gce/container-linux/configure.sh" \
|
||||
"cluster-name=${KUBE_TEMP}/cluster-name.txt"
|
||||
# TODO(euank): We should include update-strategy here. We should also switch to ignition
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
# CoreOS image
|
||||
|
||||
The [CoreOS operating system](https://coreos.com/why/) is a Linux distribution optimized for running containers securely at scale.
|
||||
CoreOS provides [an image](https://coreos.com/os/docs/latest/booting-on-google-compute-engine.html) for Google Cloud Platform (GCP).
|
||||
|
||||
This folder contains configuration and tooling to allow kube-up to create a Kubernetes cluster on Google Cloud Platform running on the official CoreOS image.
|
||||
|
||||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/gce/coreos/README.md?pixel)]()
|
|
@ -23,14 +23,14 @@ source "${KUBE_ROOT}/cluster/gce/${KUBE_CONFIG_FILE-"config-default.sh"}"
|
|||
source "${KUBE_ROOT}/cluster/common.sh"
|
||||
source "${KUBE_ROOT}/cluster/lib/util.sh"
|
||||
|
||||
if [[ "${NODE_OS_DISTRIBUTION}" == "debian" || "${NODE_OS_DISTRIBUTION}" == "coreos" || "${NODE_OS_DISTRIBUTION}" == "trusty" || "${NODE_OS_DISTRIBUTION}" == "gci" ]]; then
|
||||
if [[ "${NODE_OS_DISTRIBUTION}" == "debian" || "${NODE_OS_DISTRIBUTION}" == "container-linux" || "${NODE_OS_DISTRIBUTION}" == "trusty" || "${NODE_OS_DISTRIBUTION}" == "gci" ]]; then
|
||||
source "${KUBE_ROOT}/cluster/gce/${NODE_OS_DISTRIBUTION}/node-helper.sh"
|
||||
else
|
||||
echo "Cannot operate on cluster using node os distro: ${NODE_OS_DISTRIBUTION}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${MASTER_OS_DISTRIBUTION}" == "debian" || "${MASTER_OS_DISTRIBUTION}" == "coreos" || "${MASTER_OS_DISTRIBUTION}" == "trusty" || "${MASTER_OS_DISTRIBUTION}" == "gci" ]]; then
|
||||
if [[ "${MASTER_OS_DISTRIBUTION}" == "debian" || "${MASTER_OS_DISTRIBUTION}" == "container-linux" || "${MASTER_OS_DISTRIBUTION}" == "trusty" || "${MASTER_OS_DISTRIBUTION}" == "gci" ]]; then
|
||||
source "${KUBE_ROOT}/cluster/gce/${MASTER_OS_DISTRIBUTION}/master-helper.sh"
|
||||
else
|
||||
echo "Cannot operate on cluster using master os distro: ${MASTER_OS_DISTRIBUTION}" >&2
|
||||
|
@ -1666,7 +1666,7 @@ function check-resources() {
|
|||
# $1 - whether prepare push to node
|
||||
function prepare-push() {
|
||||
local node="${1-}"
|
||||
#TODO(dawnchen): figure out how to upgrade coreos node
|
||||
#TODO(dawnchen): figure out how to upgrade a Container Linux node
|
||||
if [[ "${node}" == "true" && "${NODE_OS_DISTRIBUTION}" != "debian" ]]; then
|
||||
echo "Updating nodes in a kubernetes cluster with ${NODE_OS_DISTRIBUTION} is not supported yet." >&2
|
||||
exit 1
|
||||
|
|
|
@ -12,7 +12,6 @@ spec:
|
|||
# When updating version also bump it in:
|
||||
# - cluster/images/hyperkube/static-pods/addon-manager-singlenode.json
|
||||
# - cluster/images/hyperkube/static-pods/addon-manager-multinode.json
|
||||
# - cluster/gce/coreos/kube-manifests/kube-addon-manager.yaml
|
||||
image: gcr.io/google-containers/kube-addon-manager:v6.1
|
||||
command:
|
||||
- /bin/bash
|
||||
|
|
Loading…
Reference in New Issue