diff --git a/cluster/kube-util.sh b/cluster/kube-util.sh index b33b4ae9f16..e7680f53ecf 100755 --- a/cluster/kube-util.sh +++ b/cluster/kube-util.sh @@ -22,12 +22,10 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. source "${KUBE_ROOT}/cluster/skeleton/util.sh" -if [[ "${KUBERNETES_PROVIDER:-}" != "kubernetes-anywhere" ]]; then - if [[ -n "${KUBERNETES_CONFORMANCE_TEST:-}" ]]; then - KUBERNETES_PROVIDER="" - else - KUBERNETES_PROVIDER="${KUBERNETES_PROVIDER:-gce}" - fi +if [[ -n "${KUBERNETES_CONFORMANCE_TEST:-}" ]]; then + KUBERNETES_PROVIDER="" +else + KUBERNETES_PROVIDER="${KUBERNETES_PROVIDER:-gce}" fi # PROVIDER_VARS is a list of cloud provider specific variables. Note: diff --git a/cluster/kubernetes-anywhere/util.sh b/cluster/kubernetes-anywhere/util.sh deleted file mode 100755 index 46fedc14042..00000000000 --- a/cluster/kubernetes-anywhere/util.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -x - -NODE_INSTANCE_PREFIX=${NODE_INSTANCE_PREFIX:-"${INSTANCE_PREFIX}-node"} - -source "${KUBE_ROOT}/cluster/gce/util.sh" diff --git a/cluster/log-dump/log-dump.sh b/cluster/log-dump/log-dump.sh index 3d23f2cf1e4..74051fe9b4a 100755 --- a/cluster/log-dump/log-dump.sh +++ b/cluster/log-dump/log-dump.sh @@ -37,9 +37,9 @@ else readonly use_custom_instance_list= fi -readonly master_ssh_supported_providers="gce aws kubernetes-anywhere" -readonly node_ssh_supported_providers="gce gke aws kubernetes-anywhere" -readonly gcloud_supported_providers="gce gke kubernetes-anywhere" +readonly master_ssh_supported_providers="gce aws" +readonly node_ssh_supported_providers="gce gke aws" +readonly gcloud_supported_providers="gce gke" readonly master_logfiles="kube-apiserver.log kube-apiserver-audit.log kube-scheduler.log kube-controller-manager.log etcd.log etcd-events.log glbc.log cluster-autoscaler.log kube-addon-manager.log konnectivity-server.log fluentd.log kubelet.cov" readonly node_logfiles="kube-proxy.log fluentd.log node-problem-detector.log kubelet.cov" @@ -149,7 +149,7 @@ function save-logs() { fi else case "${KUBERNETES_PROVIDER}" in - gce|gke|kubernetes-anywhere) + gce|gke) files="${files} ${gce_logfiles}" ;; aws) diff --git a/test/e2e/framework/nodes_util.go b/test/e2e/framework/nodes_util.go index 6d8439ea456..17a910a85c2 100644 --- a/test/e2e/framework/nodes_util.go +++ b/test/e2e/framework/nodes_util.go @@ -20,7 +20,6 @@ import ( "fmt" "os" "path" - "path/filepath" "sync" "time" @@ -52,8 +51,6 @@ func MasterUpgrade(f *Framework, v string) error { return masterUpgradeGCE(v, false) case "gke": return MasterUpgradeGKE(f.Namespace.Name, v) - case "kubernetes-anywhere": - return masterUpgradeKubernetesAnywhere(v) default: return fmt.Errorf("MasterUpgrade() is not implemented for provider %s", TestContext.Provider) } @@ -138,43 +135,6 @@ func MasterUpgradeGKE(namespace string, v string) error { return nil } -func masterUpgradeKubernetesAnywhere(v string) error { - Logf("Upgrading master to %q", v) - - kaPath := TestContext.KubernetesAnywherePath - originalConfigPath := filepath.Join(kaPath, ".config") - backupConfigPath := filepath.Join(kaPath, ".config.bak") - updatedConfigPath := filepath.Join(kaPath, fmt.Sprintf(".config-%s", v)) - - // modify config with specified k8s version - if _, _, err := RunCmd("sed", - "-i.bak", // writes original to .config.bak - fmt.Sprintf(`s/kubernetes_version=.*$/kubernetes_version=%q/`, v), - originalConfigPath); err != nil { - return err - } - - defer func() { - // revert .config.bak to .config - if err := os.Rename(backupConfigPath, originalConfigPath); err != nil { - Logf("Could not rename %s back to %s", backupConfigPath, originalConfigPath) - } - }() - - // invoke ka upgrade - if _, _, err := RunCmd("make", "-C", TestContext.KubernetesAnywherePath, - "WAIT_FOR_KUBECONFIG=y", "upgrade-master"); err != nil { - return err - } - - // move .config to .config. - if err := os.Rename(originalConfigPath, updatedConfigPath); err != nil { - return err - } - - return nil -} - // GCEUpgradeScript returns path of script for upgrading on GCE. func GCEUpgradeScript() string { if len(TestContext.GCEUpgradeScript) == 0 { diff --git a/test/e2e/framework/test_context.go b/test/e2e/framework/test_context.go index 9e3e1b332aa..329d65648ce 100644 --- a/test/e2e/framework/test_context.go +++ b/test/e2e/framework/test_context.go @@ -153,9 +153,6 @@ type TestContextType struct { // Node e2e specific test context NodeTestContextType - // Indicates what path the kubernetes-anywhere is installed on - KubernetesAnywherePath string - // The DNS Domain of the cluster. ClusterDNSDomain string @@ -300,7 +297,6 @@ func RegisterCommonFlags(flags *flag.FlagSet) { flags.BoolVar(&TestContext.DumpSystemdJournal, "dump-systemd-journal", false, "Whether to dump the full systemd journal.") flags.StringVar(&TestContext.ImageServiceEndpoint, "image-service-endpoint", "", "The image service endpoint of cluster VM instances.") flags.StringVar(&TestContext.DockershimCheckpointDir, "dockershim-checkpoint-dir", "/var/lib/dockershim/sandbox", "The directory for dockershim to store sandbox checkpoints.") - flags.StringVar(&TestContext.KubernetesAnywherePath, "kubernetes-anywhere-path", "/workspace/k8s.io/kubernetes-anywhere", "Which directory kubernetes-anywhere is installed to.") flags.StringVar(&TestContext.NonblockingTaints, "non-blocking-taints", `node-role.kubernetes.io/master`, "Nodes with taints in this comma-delimited list will not block the test framework from starting tests.") flags.BoolVar(&TestContext.ListImages, "list-images", false, "If true, will show list of images used for runnning tests.")