Skip to content

Commit

Permalink
Remove all traces of federation
Browse files Browse the repository at this point in the history
  • Loading branch information
marun committed Oct 26, 2017
1 parent 7c6f172 commit adc338d
Show file tree
Hide file tree
Showing 81 changed files with 114 additions and 1,649 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ test/test_owners.csv merge=union
**/generated.proto -diff
**/types_swagger_doc_generated.go -diff
docs/api-reference/** -diff
federation/docs/api-reference/** -diff
10 changes: 0 additions & 10 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -74546,11 +74546,6 @@
"kind": "DeleteOptions",
"version": "v1beta1"
},
{
"group": "federation",
"kind": "DeleteOptions",
"version": "v1beta1"
},
{
"group": "imagepolicy.k8s.io",
"kind": "DeleteOptions",
Expand Down Expand Up @@ -75065,11 +75060,6 @@
"kind": "WatchEvent",
"version": "v1beta1"
},
{
"group": "federation",
"kind": "WatchEvent",
"version": "v1beta1"
},
{
"group": "imagepolicy.k8s.io",
"kind": "WatchEvent",
Expand Down
4 changes: 0 additions & 4 deletions build/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ release_filegroup(
name = "client-targets",
srcs = [
"//cmd/kubectl",
"//federation/cmd/kubefed",
],
)

Expand Down Expand Up @@ -143,7 +142,6 @@ filegroup(
"//cmd/genyaml",
"//cmd/kubemark", # TODO: server platforms only
"//cmd/linkcheck",
"//federation/cmd/genfeddocs",
"//test/e2e:e2e.test",
"//test/e2e_node:e2e_node.test", # TODO: server platforms only
"//vendor/github.com/onsi/ginkgo/ginkgo",
Expand All @@ -154,9 +152,7 @@ filegroup(
filegroup(
name = "test-portable-targets",
srcs = [
"//federation/develop:all-srcs",
"//hack:e2e.go",
"//hack:federated-ginkgo-e2e.sh",
"//hack:get-build.sh",
"//hack:ginkgo-e2e.sh",
"//hack/e2e-internal:all-srcs",
Expand Down
5 changes: 0 additions & 5 deletions build/lib/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -503,11 +503,6 @@ EOF
mkdir -p "${release_stage}/third_party"
cp -R "${KUBE_ROOT}/third_party/htpasswd" "${release_stage}/third_party/htpasswd"

# Include only federation/cluster and federation/deploy
mkdir "${release_stage}/federation"
cp -R "${KUBE_ROOT}/federation/cluster" "${release_stage}/federation/"
cp -R "${KUBE_ROOT}/federation/deploy" "${release_stage}/federation/"

# Include hack/lib as a dependency for the cluster/ scripts
mkdir -p "${release_stage}/hack"
cp -R "${KUBE_ROOT}/hack/lib" "${release_stage}/hack/"
Expand Down
1 change: 0 additions & 1 deletion build/release-tars/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ pkg_tar(
strip_prefix = "//",
deps = [
":_full_server",
"//federation:release",
],
)

Expand Down
1 change: 0 additions & 1 deletion build/root/BUILD.root
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ filegroup(
"//cmd:all-srcs",
"//docs:all-srcs",
"//examples:all-srcs",
"//federation:all-srcs",
"//hack:all-srcs",
"//pkg:all-srcs",
"//plugin:all-srcs",
Expand Down
16 changes: 0 additions & 16 deletions build/root/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ else
test-cmd: generated_files
hack/make-rules/test-kubeadm-cmd.sh
hack/make-rules/test-cmd.sh
hack/make-rules/test-federation-cmd.sh
endif

define CLEAN_HELP_INFO
Expand Down Expand Up @@ -482,21 +481,6 @@ $(notdir $(abspath $(wildcard plugin/cmd/*/))): generated_files
hack/make-rules/build.sh plugin/cmd/$@
endif

define FED_CMD_HELP_INFO
# Add rules for all directories in federation/cmd/
#
# Example:
# make federation-apiserver federation-controller-manager
endef
.PHONY: $(notdir $(abspath $(wildcard federation/cmd/*/)))
ifeq ($(PRINT_HELP),y)
$(notdir $(abspath $(wildcard federation/cmd/*/))):
@echo "$$FED_CMD_HELP_INFO"
else
$(notdir $(abspath $(wildcard federation/cmd/*/))): generated_files
hack/make-rules/build.sh federation/cmd/$@
endif

define GENERATED_FILES_HELP_INFO
# Produce auto-generated files needed for the build.
#
Expand Down
47 changes: 0 additions & 47 deletions build/visible_to/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ package_group(
],
)

package_group(
name = "FEDERATION_BAD",
packages = [
"//federation/cmd/genfeddocs",
"//federation/cmd/kubefed/app",
"//federation/pkg/kubefed",
"//federation/pkg/kubefed/init",
"//federation/pkg/kubefed/testing",
"//federation/pkg/kubefed/util",
],
)

package_group(
name = "cluster",
packages = [
Expand Down Expand Up @@ -93,7 +81,6 @@ package_group(
package_group(
name = "pkg_kubectl_CONSUMERS_BAD",
includes = [
":FEDERATION_BAD",
":KUBEADM_BAD",
],
packages = [
Expand Down Expand Up @@ -125,9 +112,6 @@ package_group(

package_group(
name = "pkg_kubectl_cmd_CONSUMERS_BAD",
includes = [
":FEDERATION_BAD",
],
packages = [
"//cmd/clicheck",
"//cmd/hyperkube",
Expand Down Expand Up @@ -178,19 +162,11 @@ package_group(
],
)

package_group(
name = "pkg_kubectl_cmd_templates_CONSUMERS_BAD",
packages = [
"//federation/pkg/kubefed/init",
],
)

package_group(
name = "pkg_kubectl_cmd_templates_CONSUMERS",
includes = [
":COMMON_generators",
":COMMON_testing",
":FEDERATION_BAD",
],
packages = [
"//cmd/kubectl",
Expand All @@ -213,19 +189,8 @@ package_group(
],
)

package_group(
name = "pkg_kubectl_cmd_testing_CONSUMERS_BAD",
packages = [
"//federation/pkg/kubefed",
"//federation/pkg/kubefed/init",
],
)

package_group(
name = "pkg_kubectl_cmd_testing_CONSUMERS",
includes = [
":pkg_kubectl_cmd_testing_CONSUMERS_BAD",
],
packages = [
"//pkg/kubectl/cmd",
"//pkg/kubectl/cmd/auth",
Expand All @@ -236,7 +201,6 @@ package_group(
package_group(
name = "pkg_kubectl_cmd_util_CONSUMERS_BAD",
includes = [
":FEDERATION_BAD",
":KUBEADM_BAD",
],
packages = [
Expand Down Expand Up @@ -293,9 +257,6 @@ package_group(

package_group(
name = "pkg_kubectl_metricsutil_CONSUMERS_BAD",
includes = [
":FEDERATION_BAD",
],
packages = [
"//cmd/clicheck",
"//cmd/hyperkube",
Expand All @@ -316,19 +277,11 @@ package_group(
],
)

package_group(
name = "pkg_kubectl_resource_CONSUMERS_BAD",
packages = [
"//federation/pkg/kubefed",
],
)

package_group(
name = "pkg_kubectl_resource_CONSUMERS",
includes = [
":COMMON_generators",
":COMMON_testing",
":pkg_kubectl_resource_CONSUMERS_BAD",
],
packages = [
"//cmd/kubectl",
Expand Down
8 changes: 4 additions & 4 deletions build/visible_to/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ generally inhibit progress.
one can specify the following visibility rule in any `BUILD` rule:
```
visibility = [ "//build/visible_to:database_CONSUMERS" ],
```
```

* A visibility rule takes a list of package groups as its
argument - or one of the pre-defined groups
Expand All @@ -59,7 +59,7 @@ generally inhibit progress.
* One set of `OWNERS` to manage visibility.

The alternative is to use special [package literals] directly
in visibility rules, e.g.
in visibility rules, e.g.

```
visibility = [
Expand Down Expand Up @@ -114,7 +114,7 @@ visibility = ["//visible_to:client_foo,//visible_to:server_foo"],
#### Quickly check for visibility violations
```
bazel build --check_visibility --nobuild \
//cmd/... //pkg/... //federation/... //plugin/... \
//cmd/... //pkg/... //plugin/... \
//third_party/... //examples/... //test/... //vendor/k8s.io/...
```

Expand Down Expand Up @@ -179,6 +179,6 @@ bazel query --nohost_deps --noimplicit_deps \
bazel query "somepath(cmd/kubectl:kubectl, pkg/util/parsers:go_default_library)"
```



[package literals]: https://bazel.build/versions/master/docs/be/common-definitions.html#common.visibility
25 changes: 0 additions & 25 deletions cluster/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -946,17 +932,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})
Expand Down
8 changes: 2 additions & 6 deletions cluster/gce/config-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
6 changes: 1 addition & 5 deletions cluster/gce/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:-}"
Expand Down
2 changes: 0 additions & 2 deletions cluster/gce/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions cluster/images/hyperkube/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 0 additions & 4 deletions cluster/images/hyperkube/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,13 @@ 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 \
&& ln -s /hyperkube /scheduler \
&& 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 \
Expand Down
Loading

0 comments on commit adc338d

Please sign in to comment.