diff --git a/build/lib/release.sh b/build/lib/release.sh index ee9b12c6c6a..b6dc998a1f8 100644 --- a/build/lib/release.sh +++ b/build/lib/release.sh @@ -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) diff --git a/cluster/common.sh b/cluster/common.sh index 4bfab9e0b5a..d06e40eccd3 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -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 <>$file <> /etc/hosts echo "::1 localhost" >> /etc/hosts diff --git a/cluster/gce/coreos/health-monitor.sh b/cluster/gce/container-linux/health-monitor.sh similarity index 100% rename from cluster/gce/coreos/health-monitor.sh rename to cluster/gce/container-linux/health-monitor.sh diff --git a/cluster/gce/coreos/helper.sh b/cluster/gce/container-linux/helper.sh similarity index 89% rename from cluster/gce/coreos/helper.sh rename to cluster/gce/container-linux/helper.sh index 714f49d231c..ddd45791266 100755 --- a/cluster/gce/coreos/helper.sh +++ b/cluster/gce/container-linux/helper.sh @@ -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 diff --git a/cluster/gce/coreos/master-helper.sh b/cluster/gce/container-linux/master-helper.sh similarity index 92% rename from cluster/gce/coreos/master-helper.sh rename to cluster/gce/container-linux/master-helper.sh index c43ce748510..1d250d5ef27 100755 --- a/cluster/gce/coreos/master-helper.sh +++ b/cluster/gce/container-linux/master-helper.sh @@ -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} diff --git a/cluster/gce/coreos/master.yaml b/cluster/gce/container-linux/master.yaml similarity index 100% rename from cluster/gce/coreos/master.yaml rename to cluster/gce/container-linux/master.yaml diff --git a/cluster/gce/coreos/node-helper.sh b/cluster/gce/container-linux/node-helper.sh similarity index 77% rename from cluster/gce/coreos/node-helper.sh rename to cluster/gce/container-linux/node-helper.sh index 347a41524d5..784d36af05a 100755 --- a/cluster/gce/coreos/node-helper.sh +++ b/cluster/gce/container-linux/node-helper.sh @@ -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 } diff --git a/cluster/gce/coreos/node.yaml b/cluster/gce/container-linux/node.yaml similarity index 100% rename from cluster/gce/coreos/node.yaml rename to cluster/gce/container-linux/node.yaml diff --git a/cluster/gce/coreos/README.md b/cluster/gce/coreos/README.md deleted file mode 100644 index e285379d437..00000000000 --- a/cluster/gce/coreos/README.md +++ /dev/null @@ -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)]() diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index be85fd853e3..436deb50c1d 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -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 diff --git a/cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml b/cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml index 05316f36e78..542afdb9e5a 100644 --- a/cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml +++ b/cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml @@ -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