mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 13:42:02 +00:00
Remove all traces of federation
This commit is contained in:
@@ -33,15 +33,6 @@ sh_binary(
|
||||
],
|
||||
)
|
||||
|
||||
sh_binary(
|
||||
name = "test-federation-cmd",
|
||||
srcs = ["test-federation-cmd.sh"],
|
||||
deps = [
|
||||
":test-cmd-util",
|
||||
"//hack/lib",
|
||||
],
|
||||
)
|
||||
|
||||
sh_binary(
|
||||
name = "test-integration",
|
||||
srcs = ["test-cmd.sh"],
|
||||
|
@@ -25,10 +25,8 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
ALL_TARGETS=$(make -C "${KUBE_ROOT}" PRINT_HELP=y -rpn | sed -n -e '/^$/ { n ; /^[^ .#][^ ]*:/ { s/:.*$// ; p ; } ; }' | sort)
|
||||
CMD_TARGETS=$(ls -l "${KUBE_ROOT}/cmd" |awk '/^d/ {print $NF}')
|
||||
PLUGIN_CMD_TARGETS=$(ls -l "${KUBE_ROOT}/plugin/cmd" |awk '/^d/ {print $NF}')
|
||||
FED_CMD_TARGETS=$(ls -l "${KUBE_ROOT}/federation/cmd" |awk '/^d/ {print $NF}')
|
||||
CMD_FLAG=false
|
||||
PLUGIN_CMD_FLAG=false
|
||||
FED_CMD_FLAG=false
|
||||
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
for tar in $ALL_TARGETS; do
|
||||
@@ -62,21 +60,6 @@ for tar in $ALL_TARGETS; do
|
||||
fi
|
||||
done
|
||||
|
||||
for fedcmdtar in $FED_CMD_TARGETS; do
|
||||
if [ $tar = $fedcmdtar ]; then
|
||||
if [ $FED_CMD_FLAG = true ]; then
|
||||
continue 2;
|
||||
fi
|
||||
|
||||
echo -e "${red}${FED_CMD_TARGETS}${reset}"
|
||||
make -C "${KUBE_ROOT}" $tar PRINT_HELP=y
|
||||
echo "---------------------------------------------------------------------------------"
|
||||
|
||||
FED_CMD_FLAG=true
|
||||
continue 2
|
||||
fi
|
||||
done
|
||||
|
||||
echo -e "${red}${tar}${reset}"
|
||||
make -C "${KUBE_ROOT}" $tar PRINT_HELP=y
|
||||
echo "---------------------------------------------------------------------------------"
|
||||
|
@@ -4587,8 +4587,6 @@ runTests() {
|
||||
fi
|
||||
|
||||
if kube::test::if_supports_resource "${pods}" ; then
|
||||
# TODO: Move apply tests to run on rs instead of pods so that they can be
|
||||
# run for federation apiserver as well.
|
||||
record_command run_kubectl_apply_tests
|
||||
record_command run_kubectl_run_tests
|
||||
record_command run_kubectl_create_filter_tests
|
||||
@@ -4603,8 +4601,6 @@ runTests() {
|
||||
###############
|
||||
|
||||
if kube::test::if_supports_resource "${pods}" ; then
|
||||
# TODO: Move get tests to run on rs instead of pods so that they can be
|
||||
# run for federation apiserver as well.
|
||||
record_command run_kubectl_get_tests
|
||||
fi
|
||||
|
||||
@@ -4621,8 +4617,6 @@ runTests() {
|
||||
##################
|
||||
|
||||
if kube::test::if_supports_resource "${pods}" ; then
|
||||
# TODO: Move request timeout tests to run on rs instead of pods so that they
|
||||
# can be run for federation apiserver as well.
|
||||
record_command run_kubectl_request_timeout_tests
|
||||
fi
|
||||
|
||||
|
@@ -1,91 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2016 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.
|
||||
|
||||
# This command checks that the built commands can function together for
|
||||
# simple scenarios. It does not require Docker.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
source "${KUBE_ROOT}/hack/lib/test.sh"
|
||||
source "${KUBE_ROOT}/hack/make-rules/test-cmd-util.sh"
|
||||
|
||||
function run_federation_apiserver() {
|
||||
kube::log::status "Building federation-apiserver"
|
||||
make -C "${KUBE_ROOT}" WHAT="federation/cmd/federation-apiserver"
|
||||
|
||||
# Start federation-apiserver
|
||||
kube::log::status "Starting federation-apiserver"
|
||||
|
||||
# Admission Controllers to invoke prior to persisting objects in cluster
|
||||
ADMISSION_CONTROL="NamespaceLifecycle"
|
||||
|
||||
"${KUBE_OUTPUT_HOSTBIN}/federation-apiserver" \
|
||||
--insecure-port="${API_PORT}" \
|
||||
--secure-port="${SECURE_API_PORT}" \
|
||||
--admission-control="${ADMISSION_CONTROL}" \
|
||||
--etcd-servers="http://${ETCD_HOST}:${ETCD_PORT}" \
|
||||
--storage-media-type="${KUBE_TEST_API_STORAGE_TYPE-}" \
|
||||
--cert-dir="${TMPDIR:-/tmp/}" \
|
||||
--token-auth-file=hack/testdata/auth-tokens.csv 1>&2 &
|
||||
APISERVER_PID=$!
|
||||
|
||||
kube::util::wait_for_url "http://127.0.0.1:${API_PORT}/healthz" "apiserver"
|
||||
}
|
||||
|
||||
function run_federation_controller_manager() {
|
||||
kube::log::status "Building federation-controller-manager"
|
||||
make -C "${KUBE_ROOT}" WHAT="federation/cmd/federation-controller-manager"
|
||||
|
||||
# Create a kubeconfig for federation apiserver.
|
||||
local kubeconfig="${KUBE_TEMP}/kubeconfig"
|
||||
touch "${kubeconfig}"
|
||||
kubectl config set-cluster "apiserver" --server="http://127.0.0.1:${API_PORT}" --insecure-skip-tls-verify=true --kubeconfig="${kubeconfig}"
|
||||
kubectl config set-context "context" --cluster="apiserver" --kubeconfig="${kubeconfig}"
|
||||
kubectl config use-context "context" --kubeconfig="${kubeconfig}"
|
||||
|
||||
# Start controller manager
|
||||
kube::log::status "Starting federation-controller-manager"
|
||||
"${KUBE_OUTPUT_HOSTBIN}/federation-controller-manager" \
|
||||
--port="${CTLRMGR_PORT}" \
|
||||
--kubeconfig="${kubeconfig}" \
|
||||
--kube-api-content-type="${KUBE_TEST_API_TYPE-}" \
|
||||
--controllers="service-dns=false" \
|
||||
--master="127.0.0.1:${API_PORT}" 1>&2 &
|
||||
CTLRMGR_PID=$!
|
||||
|
||||
kube::util::wait_for_url "http://127.0.0.1:${CTLRMGR_PORT}/healthz" "controller-manager"
|
||||
}
|
||||
|
||||
kube::log::status "Running kubectl tests for federation-apiserver"
|
||||
|
||||
setup
|
||||
run_federation_apiserver
|
||||
run_federation_controller_manager
|
||||
# TODO: Fix for replicasets and deployments.
|
||||
SUPPORTED_RESOURCES=("configmaps" "daemonsets" "events" "ingress" "namespaces" "services" "secrets")
|
||||
# Set wait for deletion to true for federation apiserver since resources are
|
||||
# deleted asynchronously.
|
||||
# This is a temporary workaround until https://github.com/kubernetes/kubernetes/issues/42594 is fixed.
|
||||
WAIT_FOR_DELETION="true"
|
||||
# WARNING: Do not wrap this call in a subshell to capture output, e.g. output=$(runTests)
|
||||
# Doing so will suppress errexit behavior inside runTests
|
||||
runTests
|
||||
|
||||
kube::log::status "TESTS PASSED"
|
@@ -49,9 +49,6 @@ kube::test::find_integration_test_dirs() {
|
||||
find vendor/k8s.io/apiextensions-apiserver/test/integration/ -name '*_test.go' -print0 \
|
||||
| xargs -0n1 dirname | sed "s|^|${KUBE_GO_PACKAGE}/|" \
|
||||
| LC_ALL=C sort -u
|
||||
find federation/test/integration/ -name '*_test.go' -print0 \
|
||||
| xargs -0n1 dirname | sed "s|^|${KUBE_GO_PACKAGE}/|" \
|
||||
| LC_ALL=C sort -u
|
||||
)
|
||||
}
|
||||
|
||||
|
@@ -61,7 +61,6 @@ kube::test::find_dirs() {
|
||||
-o -path './third_party/*' \
|
||||
-o -path './staging/*' \
|
||||
-o -path './vendor/*' \
|
||||
-o -path './federation/test/*' \
|
||||
\) -prune \
|
||||
\) -name '*_test.go' -print0 | xargs -0n1 dirname | sed "s|^\./|${KUBE_GO_PACKAGE}/|" | LC_ALL=C sort -u
|
||||
|
||||
@@ -113,7 +112,7 @@ KUBE_GOVERALLS_BIN=${KUBE_GOVERALLS_BIN:-}
|
||||
# "v1,compute/v1alpha1,experimental/v1alpha2;v1,compute/v2,experimental/v1alpha3"
|
||||
# FIXME: due to current implementation of a test client (see: pkg/api/testapi/testapi.go)
|
||||
# ONLY the last version is tested in each group.
|
||||
ALL_VERSIONS_CSV=$(IFS=',';echo "${KUBE_AVAILABLE_GROUP_VERSIONS[*]// /,}";IFS=$),federation/v1beta1
|
||||
ALL_VERSIONS_CSV=$(IFS=',';echo "${KUBE_AVAILABLE_GROUP_VERSIONS[*]// /,}";IFS=$)
|
||||
KUBE_TEST_API_VERSIONS="${KUBE_TEST_API_VERSIONS:-${ALL_VERSIONS_CSV}}"
|
||||
# once we have multiple group supports
|
||||
# Create a junit-style XML test report in this directory if set.
|
||||
|
Reference in New Issue
Block a user