mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #90343 from neolit123/1.19-remove-kubernetes-anywhere
remove kubernetes-anywhere from this repository
This commit is contained in:
commit
53374fa519
@ -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:
|
||||
|
@ -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"
|
@ -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)
|
||||
|
@ -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.<version>
|
||||
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 {
|
||||
|
@ -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.")
|
||||
|
Loading…
Reference in New Issue
Block a user