Merge pull request #53816 from marun/remove-federation
Automatic merge from submit-queue (batch tested with PRs 54112, 54150, 53816, 54321, 54338). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Remove federation This PR removes the federation codebase and associated tooling from the tree. The first commit just removes the `federation` path and should be uncontroversial. The second commit removes references and associated tooling and suggests careful review. Requirements for merge: - [x] Bazel jobs no longer hard-code federation as a target ([test infra #4983](https://github.com/kubernetes/test-infra/pull/4983)) - [x] `federation-e2e` jobs are not run by default for k/k **Release note**: ```release-note Development of Kubernetes Federation has moved to github.com/kubernetes/federation. This move out of tree also means that Federation will begin releasing separately from Kubernetes. The impact of this is Federation-specific behavior will no longer be included in kubectl, kubefed will no longer be released as part of Kubernetes, and the Federation servers will no longer be included in the hyperkube binary and image. ``` cc: @kubernetes/sig-multicluster-pr-reviews @kubernetes/sig-testing-pr-reviews
This commit is contained in:
@@ -160,20 +160,6 @@ function clear-kubeconfig() {
|
||||
echo "Cleared config for ${CONTEXT} from ${KUBECONFIG}"
|
||||
}
|
||||
|
||||
# Creates a kubeconfig file with the credentials for only the current-context
|
||||
# cluster. This is used by federation to create secrets in test setup.
|
||||
function create-kubeconfig-for-federation() {
|
||||
if [[ "${FEDERATION:-}" == "true" ]]; then
|
||||
echo "creating kubeconfig for federation secret"
|
||||
local kubectl="${KUBE_ROOT}/cluster/kubectl.sh"
|
||||
local cc=$("${kubectl}" config view -o jsonpath='{.current-context}')
|
||||
KUBECONFIG_DIR=$(dirname ${KUBECONFIG:-$DEFAULT_KUBECONFIG})
|
||||
KUBECONFIG_PATH="${KUBECONFIG_DIR}/federation/kubernetes-apiserver/${cc}"
|
||||
mkdir -p "${KUBECONFIG_PATH}"
|
||||
"${kubectl}" config view --minify --flatten > "${KUBECONFIG_PATH}/kubeconfig"
|
||||
fi
|
||||
}
|
||||
|
||||
function tear_down_alive_resources() {
|
||||
local kubectl="${KUBE_ROOT}/cluster/kubectl.sh"
|
||||
"${kubectl}" delete deployments --all || true
|
||||
@@ -936,17 +922,6 @@ AUTOSCALER_EXPANDER_CONFIG: $(yaml-quote ${AUTOSCALER_EXPANDER_CONFIG})
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Federation specific environment variables.
|
||||
if [[ -n "${FEDERATION:-}" ]]; then
|
||||
cat >>$file <<EOF
|
||||
FEDERATION: $(yaml-quote ${FEDERATION})
|
||||
EOF
|
||||
fi
|
||||
if [ -n "${FEDERATION_NAME:-}" ]; then
|
||||
cat >>$file <<EOF
|
||||
FEDERATION_NAME: $(yaml-quote ${FEDERATION_NAME})
|
||||
EOF
|
||||
fi
|
||||
if [ -n "${DNS_ZONE_NAME:-}" ]; then
|
||||
cat >>$file <<EOF
|
||||
DNS_ZONE_NAME: $(yaml-quote ${DNS_ZONE_NAME})
|
||||
|
@@ -95,11 +95,7 @@ function get-cluster-ip-range {
|
||||
if [[ "${NUM_NODES}" -gt 4000 ]]; then
|
||||
suggested_range="10.64.0.0/11"
|
||||
fi
|
||||
echo "${suggested_range}"
|
||||
echo "${suggested_range}"
|
||||
}
|
||||
|
||||
if [[ "${FEDERATION:-}" == true ]]; then
|
||||
NODE_SCOPES="${NODE_SCOPES:-monitoring,logging-write,storage-ro,https://www.googleapis.com/auth/ndev.clouddns.readwrite}"
|
||||
else
|
||||
NODE_SCOPES="${NODE_SCOPES:-monitoring,logging-write,storage-ro}"
|
||||
fi
|
||||
NODE_SCOPES="${NODE_SCOPES:-monitoring,logging-write,storage-ro}"
|
||||
|
@@ -103,11 +103,7 @@ MASTER_IP_RANGE="${MASTER_IP_RANGE:-10.246.0.0/24}"
|
||||
# It is the primary range in the subnet and is the range used for node instance IPs.
|
||||
NODE_IP_RANGE="$(get-node-ip-range)"
|
||||
|
||||
if [[ "${FEDERATION:-}" == true ]]; then
|
||||
NODE_SCOPES="${NODE_SCOPES:-monitoring,logging-write,storage-ro,https://www.googleapis.com/auth/ndev.clouddns.readwrite}"
|
||||
else
|
||||
NODE_SCOPES="${NODE_SCOPES:-monitoring,logging-write,storage-ro}"
|
||||
fi
|
||||
NODE_SCOPES="${NODE_SCOPES:-monitoring,logging-write,storage-ro}"
|
||||
|
||||
# Extra docker options for nodes.
|
||||
EXTRA_DOCKER_OPTS="${EXTRA_DOCKER_OPTS:-}"
|
||||
|
@@ -1506,8 +1506,6 @@ function check-cluster() {
|
||||
|
||||
# Update the user's kubeconfig to include credentials for this apiserver.
|
||||
create-kubeconfig
|
||||
|
||||
create-kubeconfig-for-federation
|
||||
)
|
||||
|
||||
# ensures KUBECONFIG is set
|
||||
|
@@ -11,16 +11,12 @@ docker_build(
|
||||
for path in [
|
||||
"/apiserver",
|
||||
"/controller-manager",
|
||||
"/federation-apiserver",
|
||||
"/federation-controller-manager",
|
||||
"/kubectl",
|
||||
"/kubelet",
|
||||
"/proxy",
|
||||
"/scheduler",
|
||||
"/usr/local/bin/kube-apiserver",
|
||||
"/usr/local/bin/kube-controller-manager",
|
||||
"/usr/local/bin/federation-apiserver",
|
||||
"/usr/local/bin/federation-controller-manager",
|
||||
"/usr/local/bin/kubectl",
|
||||
"/usr/local/bin/kubelet",
|
||||
"/usr/local/bin/kube-proxy",
|
||||
|
@@ -22,8 +22,6 @@ FROM BASEIMAGE
|
||||
# RUN /hyperkube --make-symlinks
|
||||
RUN ln -s /hyperkube /apiserver \
|
||||
&& ln -s /hyperkube /controller-manager \
|
||||
&& ln -s /hyperkube /federation-apiserver \
|
||||
&& ln -s /hyperkube /federation-controller-manager \
|
||||
&& ln -s /hyperkube /kubectl \
|
||||
&& ln -s /hyperkube /kubelet \
|
||||
&& ln -s /hyperkube /proxy \
|
||||
@@ -31,8 +29,6 @@ RUN ln -s /hyperkube /apiserver \
|
||||
&& ln -s /hyperkube /aggerator \
|
||||
&& ln -s /hyperkube /usr/local/bin/kube-apiserver \
|
||||
&& ln -s /hyperkube /usr/local/bin/kube-controller-manager \
|
||||
&& ln -s /hyperkube /usr/local/bin/federation-apiserver \
|
||||
&& ln -s /hyperkube /usr/local/bin/federation-controller-manager \
|
||||
&& ln -s /hyperkube /usr/local/bin/kubectl \
|
||||
&& ln -s /hyperkube /usr/local/bin/kubelet \
|
||||
&& ln -s /hyperkube /usr/local/bin/kube-proxy \
|
||||
|
@@ -38,59 +38,3 @@ PROVIDER_UTILS="${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh"
|
||||
if [ -f ${PROVIDER_UTILS} ]; then
|
||||
source "${PROVIDER_UTILS}"
|
||||
fi
|
||||
|
||||
# Federation utils
|
||||
|
||||
# Sets the kubeconfig context value for the current cluster.
|
||||
# Args:
|
||||
# $1: zone (required)
|
||||
#
|
||||
# Vars set:
|
||||
# CLUSTER_CONTEXT
|
||||
function kubeconfig-federation-context() {
|
||||
if [[ -z "${1:-}" ]]; then
|
||||
echo "zone parameter is required"
|
||||
exit 1
|
||||
fi
|
||||
CLUSTER_CONTEXT="federation-e2e-${KUBERNETES_PROVIDER}-${1}"
|
||||
}
|
||||
|
||||
# Should NOT be called within the global scope, unless setting the desired global zone vars
|
||||
# This function is currently NOT USED in the global scope
|
||||
function set-federation-zone-vars {
|
||||
zone="$1"
|
||||
kubeconfig-federation-context "${zone}"
|
||||
export OVERRIDE_CONTEXT="${CLUSTER_CONTEXT}"
|
||||
echo "Setting zone vars to: $OVERRIDE_CONTEXT"
|
||||
if [[ "$KUBERNETES_PROVIDER" == "gce" ]];then
|
||||
# This needs a revamp, but for now e2e zone name is used as the unique
|
||||
# cluster identifier in our e2e tests and we will continue to use that
|
||||
# pattern.
|
||||
export CLUSTER_NAME="${zone}"
|
||||
|
||||
export KUBE_GCE_ZONE="${zone}"
|
||||
# gcloud has a 61 character limit, and for firewall rules this
|
||||
# prefix gets appended to itself, with some extra information
|
||||
# need tot keep it short
|
||||
export KUBE_GCE_INSTANCE_PREFIX="${USER}-${zone}"
|
||||
|
||||
elif [[ "$KUBERNETES_PROVIDER" == "gke" ]];then
|
||||
|
||||
export CLUSTER_NAME="${USER}-${zone}"
|
||||
|
||||
elif [[ "$KUBERNETES_PROVIDER" == "aws" ]];then
|
||||
|
||||
export KUBE_AWS_ZONE="$zone"
|
||||
export KUBE_AWS_INSTANCE_PREFIX="${USER}-${zone}"
|
||||
|
||||
# WARNING: This is hack
|
||||
# After KUBE_AWS_INSTANCE_PREFIX is changed,
|
||||
# we need to make sure the config-xxx.sh file is
|
||||
# re-sourced so the change propogates to dependent computed values
|
||||
# (eg: MASTER_SG_NAME, NODE_SG_NAME, etc)
|
||||
source "${KUBE_ROOT}/cluster/aws/util.sh"
|
||||
else
|
||||
echo "Provider \"${KUBERNETES_PROVIDER}\" is not supported"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
@@ -296,8 +296,6 @@ function kube-up {
|
||||
|
||||
# Update the user's kubeconfig to include credentials for this apiserver.
|
||||
create-kubeconfig
|
||||
|
||||
create-kubeconfig-for-federation
|
||||
)
|
||||
|
||||
verify-cluster
|
||||
|
Reference in New Issue
Block a user