Merge pull request #90343 from neolit123/1.19-remove-kubernetes-anywhere

remove kubernetes-anywhere from this repository
This commit is contained in:
Kubernetes Prow Robot 2020-04-22 19:22:24 -07:00 committed by GitHub
commit 53374fa519
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 74 deletions

View File

@ -22,12 +22,10 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${KUBE_ROOT}/cluster/skeleton/util.sh" source "${KUBE_ROOT}/cluster/skeleton/util.sh"
if [[ "${KUBERNETES_PROVIDER:-}" != "kubernetes-anywhere" ]]; then if [[ -n "${KUBERNETES_CONFORMANCE_TEST:-}" ]]; then
if [[ -n "${KUBERNETES_CONFORMANCE_TEST:-}" ]]; then KUBERNETES_PROVIDER=""
KUBERNETES_PROVIDER="" else
else KUBERNETES_PROVIDER="${KUBERNETES_PROVIDER:-gce}"
KUBERNETES_PROVIDER="${KUBERNETES_PROVIDER:-gce}"
fi
fi fi
# PROVIDER_VARS is a list of cloud provider specific variables. Note: # PROVIDER_VARS is a list of cloud provider specific variables. Note:

View File

@ -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"

View File

@ -37,9 +37,9 @@ else
readonly use_custom_instance_list= readonly use_custom_instance_list=
fi fi
readonly master_ssh_supported_providers="gce aws kubernetes-anywhere" readonly master_ssh_supported_providers="gce aws"
readonly node_ssh_supported_providers="gce gke aws kubernetes-anywhere" readonly node_ssh_supported_providers="gce gke aws"
readonly gcloud_supported_providers="gce gke kubernetes-anywhere" 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 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" readonly node_logfiles="kube-proxy.log fluentd.log node-problem-detector.log kubelet.cov"
@ -149,7 +149,7 @@ function save-logs() {
fi fi
else else
case "${KUBERNETES_PROVIDER}" in case "${KUBERNETES_PROVIDER}" in
gce|gke|kubernetes-anywhere) gce|gke)
files="${files} ${gce_logfiles}" files="${files} ${gce_logfiles}"
;; ;;
aws) aws)

View File

@ -20,7 +20,6 @@ import (
"fmt" "fmt"
"os" "os"
"path" "path"
"path/filepath"
"sync" "sync"
"time" "time"
@ -52,8 +51,6 @@ func MasterUpgrade(f *Framework, v string) error {
return masterUpgradeGCE(v, false) return masterUpgradeGCE(v, false)
case "gke": case "gke":
return MasterUpgradeGKE(f.Namespace.Name, v) return MasterUpgradeGKE(f.Namespace.Name, v)
case "kubernetes-anywhere":
return masterUpgradeKubernetesAnywhere(v)
default: default:
return fmt.Errorf("MasterUpgrade() is not implemented for provider %s", TestContext.Provider) 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 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.<version>
if err := os.Rename(originalConfigPath, updatedConfigPath); err != nil {
return err
}
return nil
}
// GCEUpgradeScript returns path of script for upgrading on GCE. // GCEUpgradeScript returns path of script for upgrading on GCE.
func GCEUpgradeScript() string { func GCEUpgradeScript() string {
if len(TestContext.GCEUpgradeScript) == 0 { if len(TestContext.GCEUpgradeScript) == 0 {

View File

@ -153,9 +153,6 @@ type TestContextType struct {
// Node e2e specific test context // Node e2e specific test context
NodeTestContextType NodeTestContextType
// Indicates what path the kubernetes-anywhere is installed on
KubernetesAnywherePath string
// The DNS Domain of the cluster. // The DNS Domain of the cluster.
ClusterDNSDomain string 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.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.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.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.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.") flags.BoolVar(&TestContext.ListImages, "list-images", false, "If true, will show list of images used for runnning tests.")