Commit Graph

104 Commits (b45a406aca6995a1da4856d6d02e5dc3d23cd495)

Author SHA1 Message Date
Irfan Ur Rehman 0ca82ab47e [Federation] Update to enable all apis in e2e tests 2017-07-19 21:26:25 +05:30
Christian Bell 81ba0cce90 [Federation] Handle federation up timeouts
Instead of relying on external timeout command.

First raised in #48756
2017-07-14 11:47:22 -07:00
Kubernetes Submit Queue 6c1552c58a Merge pull request #47130 from shashidharatd/fed-cluster-scripts-cleanup
Automatic merge from submit-queue (batch tested with PRs 44412, 44810, 47130, 46017, 47829)

federation: Cleanup cluster scripts of older federation bring up method

**What this PR does / why we need it**:
Remove older method of bringing up federation via scripts. Currently `kubefed` is the only supported mechanism and is well established and stable.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

```release-note
NONE
```
2017-07-11 20:00:20 -07:00
Christian Bell 27230004ec [Federation] Account for caching in kubectl 2017-06-23 11:39:56 -07:00
Madhusudan.C.S 0bf6178921 Add a spin-loop that waits for RBAC API's availability.
The very first thing that kubefed does when it comes up is run RBAC API
discovery. We believe this sometimes fail on new clusters and as
a result causes kubefed to assume that the RBAC API doesn't exist.
Therefore, we are applying this workaround for now to ensure that the
RBAC API is available before running kubefed.
2017-06-21 18:18:33 -07:00
shashidharatd 81f927d58c Auto generated file 2017-06-07 22:12:15 +05:30
shashidharatd d863c35546 Cleanup federation/cluster scripts from deprecated bringup method 2017-06-07 22:12:14 +05:30
Clayton Coleman 034f06d7e4
Remove Initializers from federation 2017-06-05 19:12:36 -04:00
Madhusudan.C.S c3d5113365 Delete cluster role and their bindings federated clusters.
This is part of the namespace deletion big hammer. `kubefed join` not
just creates federation-system namespace, but also cluster role and
cluster role bindings in the joining clusters. Sometimes unjoin fails
to delete them. So we use a big hammer here to delete them.

This smells like a real problem in kubefed and needs investigation.
This is a short term fix to unblock the submit queue.
2017-06-04 21:26:44 -07:00
Madhusudan.C.S c30afde32e Delete federation system namespace from all the federated clusters.
This is a big hammer. `kubefed join` creates federation-system namespace
in the joining clusters if they don't already exist. This namespace
usually exists in the host cluster and hence cannot be deleted while
unjoining. So in order to be safe, we don't delete the federation-system
namespace from any federated cluster while unjoining them. This causes
a problem in our test environment if certain resources are left in the
namespace. Therefore we are deleting all federation-system namespace in
all the clusters.
2017-06-04 21:26:42 -07:00
Madhusudan.C.S 60d10e9e27 Do not delete PVs with --all, instead delete them selectively.
PV is a non-namespaced resource. Running `kubectl delete pv --all`, even
with `--namespace` is going to delete all the PVs in the cluster. This
is a dangerous operation and should not be deleted this way.

Instead we now retrieve the PVs bound to the PVCs in the namespace we
are deleteing and delete only those PVs.

Fixes issue #46380.
2017-06-04 14:57:43 -07:00
Clayton Coleman 4ce3907639
Add Initializers to all admission control paths by default 2017-06-02 22:09:04 -04:00
Madhusudan.C.S 47de152365 Log kubefed operations at log level 4 in our test environments.
This is useful for debugging test failures that involve federation
control plane turn up/down.
2017-05-18 16:57:46 -07:00
Jonathan MacMillan 77e71a890e [Federation] Generate the secret name in kubefed join. 2017-05-01 14:05:23 -07:00
Jonathan MacMillan 7e15b924e7 [Federation] Only attempt to log information about pods in federation/cluster/log-dump.sh if those pods exist. 2017-04-24 14:12:03 -07:00
Madhusudan.C.S c2a8f0bae9 Remove "pods/" prefix from the pod names returned by kubectl get pods.
Note that the result returned by kubectl get -o name has plural prefixes "pods".
2017-04-19 07:39:56 -07:00
Kubernetes Submit Queue b9a5a5c9b3 Merge pull request #42748 from dcbw/cfssl-localup
Automatic merge from submit-queue (batch tested with PRs 43866, 42748)

hack/cluster: download cfssl if not present

hack/local-up-cluster.sh uses cfssl to generate certificates and
will exit it cfssl is not already installed.  But other cluster-up
mechanisms (GCE) that generate certs just download cfssl if not
present.  Make local-up-cluster.sh do that too so users don't have
to bother installing it from somewhere.
2017-04-10 14:27:11 -07:00
Jonathan MacMillan 12eb965e9b [Federation] Create a script that dumps Federation pod logs after Federation e2e tests 2017-04-07 14:50:55 -07:00
Kubernetes Submit Queue 8c61829da8 Merge pull request #44117 from madhusudancs/fed-e2e-name-for-parallel-presubmit
Automatic merge from submit-queue (batch tested with PRs 44191, 44117, 44072)

Default FEDERATION_KUBE_CONTEXT to FEDERATION_NAME in federation e2e up/down scripts.

This is consistent with how kubefed creates kubeconfig contexts.

**Release note**:
-->
```release-note
NONE
```
2017-04-06 22:16:20 -07:00
Kubernetes Submit Queue b41e415ebd Merge pull request #43137 from shashidharatd/federation-domain
Automatic merge from submit-queue

[Federation] Remove FEDERATIONS_DOMAIN_MAP references

Remove all references to FEDERATIONS_DOMAIN_MAP as this method is no longer is used and is replaced by adding federation domain map to kube-dns configmap.

cc @madhusudancs @kubernetes/sig-federation-pr-reviews 

**Release note**:
```
[Federation] Mechanism of adding `federation domain maps` to kube-dns deployment via `--federations` flag is superseded by adding/updating `federations` key in `kube-system/kube-dns` configmap. If user is using kubefed tool to join cluster federation, adding federation domain maps to kube-dns is already taken care by `kubefed join` and does not need further action.
```
2017-04-06 02:05:42 -07:00
Madhusudan.C.S 5af5378fce Default FEDERATION_KUBE_CONTEXT to FEDERATION_NAME in federation e2e up/down scripts.
This is consistent with how kubefed creates kubeconfig contexts.
2017-04-05 18:47:03 -07:00
Dan Williams b3705b6e35 hack/cluster: consolidate cluster/ utils to hack/lib/util.sh
Per Clayton's suggestion, move stuff from cluster/lib/util.sh to
hack/lib/util.sh.  Also consolidate ensure-temp-dir and use the
hack/lib/util.sh implementation rather than cluster/common.sh.
2017-03-30 22:34:46 -05:00
Madhusudan.C.S bec6b64db3 Add the ability to customize federation system namespace in e2e turn up scripts. 2017-03-24 14:42:50 -07:00
Madhusudan.C.S f6e8ad9e83 [Federation] Increase the federation components logging verbosity level in e2e tests. 2017-03-21 14:48:32 -07:00
Christian Bell 699c3ad299 [Federation][e2e] Ensure kubefed times out in federation-up.sh
Although this should eventually be moved into kubefed itself, monitor kubefed from federation-up.sh and force it to timeout after being unable to initialize.
2017-03-21 09:20:19 -07:00
shashidharatd b09b20b598 Remove FEDERATIONS_DOMAIN_MAP references 2017-03-15 23:06:16 +05:30
Kubernetes Submit Queue e1ec10f248 Merge pull request #42851 from madhusudancs/fed-down-improvements
Automatic merge from submit-queue

[Federation] Unjoin only the joined clusters while bringing down the federation control plane.

A few other minor improvements.

**Release note**:

```release-note
NONE
```
2017-03-12 16:29:37 -07:00
Madhusudan.C.S ed10bb7643 [Federation] Unjoin only the joined clusters while bringing down the federation control plane.
A few other minor improvements.
2017-03-12 13:05:26 -07:00
shashidharatd 662f0ef531 Add framework for federation upgrade tests 2017-03-11 01:39:56 +05:30
Kubernetes Submit Queue 083a00dbea Merge pull request #42365 from madhusudancs/fed-kubefed-remove-joinunjoin-kubedns
Automatic merge from submit-queue (batch tested with PRs 42365, 42429, 41770, 42018, 35055)

Remove kube-dns ConfigMap modification code from federation-{up,down}.sh scripts

PR #39338 has merged now. This shouldn't be necessary. This unbreaks federation tests.

```release-note
NONE
```
2017-03-03 09:24:40 -08:00
Kubernetes Submit Queue 4672314029 Merge pull request #41682 from perotinus/unpwandtokens
Automatic merge from submit-queue (batch tested with PRs 41984, 41682, 41924, 41928)

Add options to kubefed telling it to generate HTTP Basic and/or token credentials for the Federated API server

fixes #41265.

**Release notes**:
```release-note
Adds two options to kubefed, `-apiserver-enable-basic-auth` and `-apiserver-enable-token-auth`, which generate an HTTP Basic username/password and a token respectively for the Federated API server.
```
2017-03-02 10:51:10 -08:00
Kubernetes Submit Queue f12db38d5c Merge pull request #42322 from madhusudancs/fed-unbound-e2ezone
Automatic merge from submit-queue (batch tested with PRs 42128, 42064, 42253, 42309, 42322)

Default E2E_ZONES to empty string.

Also print an error message and exit if host cluster context cannot be derived.

I don't think we should do any of this magic. This is a stop gap solution to get all our tests to stable state. I will actively get rid of all this defaulting magic once our main tests are stable.

cc @kubernetes/sig-federation-pr-reviews
2017-03-02 05:01:00 -08:00
Madhusudan.C.S 00df442cae Remove kube-dns ConfigMap modification code from federation-{up,down}.sh scripts
PR #39338 has merged now. This shouldn't be necessary.
2017-03-01 14:56:28 -08:00
Madhusudan.C.S 97fbc65897 Default E2E_ZONES to empty string.
Also print an error message and exit if host cluster context
cannot be derived.
2017-03-01 13:35:01 -08:00
Jonathan MacMillan 3d3941c6d8 Adds support for HTTP basic and token authentication to kubefed. 2017-03-01 11:04:05 -08:00
Irfan Ur Rehman f1832830d4 [Federation][kubefed] Explicitly use the storage backend as etcd2 to bring up federation 2017-02-28 16:25:34 +05:30
Maru Newby d1b6192f10 kubefed: make --dns-provider mandatory 2017-02-27 08:48:03 -08:00
Madhusudan.C.S edef3af34f Split federation-{up,down} from e2e-{up,down}. 2017-02-24 14:27:31 -08:00
Madhusudan.C.S 80d946dc8b Remove changes that accidentally sneaked in during a rebase. 2017-02-21 23:34:49 -08:00
Madhusudan.C.S 2cb2200847 Move kube-dns ConfigMap creation/deletion out of federated services e2e tests to federation-up.sh/federation-down.sh where the clusters are joined/unjoined. 2017-02-21 10:27:31 -08:00
Madhusudan.C.S ceb88b3869 Make join cluster function in federation-up.sh a little more succinct. 2017-02-16 16:45:43 -08:00
Madhusudan.C.S 48d7842211 Move common global variables to common.sh script that is sourced in both federation-up.sh and federation-down.sh. 2017-02-16 13:30:17 -08:00
Kubernetes Submit Queue d953402cdf Merge pull request #40919 from shashidharatd/fed-e2e-1
Automatic merge from submit-queue (batch tested with PRs 40175, 41107, 41111, 40893, 40919)

[Federation][e2e] Move Cluster Registration to federation-up.sh

**What this PR does / why we need it**:
Remove cluster register/unregister calls from test case BeforeEach/AfterEach blocks.
Register clusters once in federation-up.sh


**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #40768

**Special notes for your reviewer**:

**Release note**: `NONE`

cc: @madhusudancs @kubernetes/sig-federation-pr-reviews
2017-02-08 01:47:44 -08:00
shashidharatd b9b252fb63 Move Cluster Registration to federation-up.sh 2017-02-08 09:29:28 +05:30
Madhusudan.C.S 80d22785e7 Address review comments. 2017-02-07 17:28:37 -08:00
Madhusudan.C.S b26c28d666 Default the version to the information in federation versions file if $KUBERNETES_RELEASE isn't set.
Also, slightly unrelated fix: copy the output from the build container
to the host filesystem while building hyperkube image. The recent change
in the build scripts has caused the binaries to be not copied to the
required locations. It must be explicitly copied by calling the build copy
function.
2017-02-07 16:50:53 -08:00
Madhusudan.C.S 709d43edac Replace + with _ in the image tag version since + is not a valid image tag character.
We already push the image to the registry by replacing + with _ in the
previous build and push stage. This change is just propagating the same
to the deploy stage.
2017-01-30 12:44:57 -08:00
Madhusudan.C.S c1d5c6db38 Use a wrapper script to locate kubefed and kubectl binaries instead of directly constructing their paths.
Binaries are not available at the same path in all the environments, esp.
in CI environment. So we use this wrapper to locate the binary.
2017-01-27 13:52:22 -08:00
Madhusudan.C.S 41468fb312 Read the VERSIONS file for the FEDERATION_IMAGE_TAG value.
This is particularly important in the local builds where there is
no $KUBERNETES_RELEASE defined.
2017-01-19 15:44:35 -08:00
Jeff Grafton 19aafd291c Always --pull in docker build to ensure recent base images 2017-01-10 16:21:05 -08:00