Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
edef3af3
Commit
edef3af3
authored
Feb 19, 2017
by
Madhusudan.C.S
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split federation-{up,down} from e2e-{up,down}.
parent
ee88325f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
52 deletions
+26
-52
kube-util.sh
cluster/kube-util.sh
+0
-1
federation-down.sh
federation/cluster/federation-down.sh
+14
-14
federation-up.sh
federation/cluster/federation-up.sh
+0
-1
e2e-down.sh
hack/e2e-internal/e2e-down.sh
+2
-17
e2e-up.sh
hack/e2e-internal/e2e-up.sh
+10
-19
No files found.
cluster/kube-util.sh
View file @
edef3af3
...
@@ -49,7 +49,6 @@ function kubeconfig-federation-context() {
...
@@ -49,7 +49,6 @@ function kubeconfig-federation-context() {
CLUSTER_CONTEXT
=
"federation-e2e-
${
KUBERNETES_PROVIDER
}
-
${
1
}
"
CLUSTER_CONTEXT
=
"federation-e2e-
${
KUBERNETES_PROVIDER
}
-
${
1
}
"
}
}
# Should NOT be called within the global scope, unless setting the desired global zone vars
# 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
# This function is currently NOT USED in the global scope
function
set-federation-zone-vars
{
function
set-federation-zone-vars
{
...
...
federation/cluster/federation-down.sh
View file @
edef3af3
...
@@ -49,17 +49,17 @@ function unjoin_clusters() {
...
@@ -49,17 +49,17 @@ function unjoin_clusters() {
unjoin_clusters
unjoin_clusters
cleanup-federation-api-objects
||
echo
"Couldn't cleanup federation api objects"
if
cleanup-federation-api-objects
;
then
# TODO(madhusudancs): This is an arbitrary amount of sleep to give
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
delete namespace
\
# Kubernetes clusters enough time to delete the underlying cloud
--context
=
"
${
HOST_CLUSTER_CONTEXT
}
"
\
# provider resources corresponding to the Kubernetes resources we
"
${
FEDERATION_NAMESPACE
}
"
# deleted as part of the test tear downs. It is shameful that we
# are doing this, but this is just a bandage to stop the bleeding.
# TODO(madhusudancs): This is an arbitrary amount of sleep to give Kubernetes
# Please don't use this pattern anywhere. Remove this when proper
# clusters enough time to delete the underlying cloud provider resources
# cloud provider cleanups are implemented in the individual test
# corresponding to the Kubernetes resources we deleted as part of the test
# `AfterEach` blocks.
# teardowns. It is shameful that we are doing this, but this is just a bandage
# Also, we wait only if the cleanup succeeds.
# to stop the bleeding. Please don't use this pattern anywhere. Remove this
sleep
2m
# when proper cloud provider cleanups are implemented in the individual test
else
# `AfterEach` blocks.
echo
"Couldn't cleanup federation api objects"
sleep
2m
fi
federation/cluster/federation-up.sh
View file @
edef3af3
...
@@ -97,7 +97,6 @@ function join_clusters() {
...
@@ -97,7 +97,6 @@ function join_clusters() {
--context
=
"
${
FEDERATION_NAME
}
"
\
--context
=
"
${
FEDERATION_NAME
}
"
\
--secret-name
=
"
${
context
//_/-
}
"
# Replace "_" by "-"
--secret-name
=
"
${
context
//_/-
}
"
# Replace "_" by "-"
# Create kube-dns configmap in each cluster for kube-dns to accept
# Create kube-dns configmap in each cluster for kube-dns to accept
# federation queries.
# federation queries.
# TODO: This shouldn't be required after
# TODO: This shouldn't be required after
...
...
hack/e2e-internal/e2e-down.sh
View file @
edef3af3
...
@@ -29,25 +29,10 @@ source "${KUBE_ROOT}/cluster/kube-util.sh"
...
@@ -29,25 +29,10 @@ source "${KUBE_ROOT}/cluster/kube-util.sh"
prepare-e2e
prepare-e2e
if
[[
"
${
FEDERATION
:-}
"
==
"true"
]]
;
then
if
[[
"
${
FEDERATION
:-}
"
==
"true"
]]
;
then
source
"
${
KUBE_ROOT
}
/federation/cluster/common.sh"
source
"
${
KUBE_ROOT
}
/federation/cluster/common.sh"
if
cleanup-federation-api-objects
;
then
for
zone
in
${
E2E_ZONES
}
;
do
# TODO(madhusudancs): This is an arbitrary amount of sleep to give
# Kubernetes clusters enough time to delete the underlying cloud
# provider resources corresponding to the Kubernetes resources we
# deleted as part of the test tear downs. It is shameful that we
# are doing this, but this is just a bandage to stop the bleeding.
# Please don't use this pattern anywhere. Remove this when proper
# cloud provider cleanups are implemented in the individual test
# `AfterEach` blocks.
# Also, we wait only if the cleanup succeeds.
sleep
2m
else
echo
"Couldn't cleanup federation api objects"
fi
for
zone
in
${
E2E_ZONES
}
;
do
# bring down an e2e cluster
# bring down an e2e cluster
(
(
set-federation-zone-vars
"
$zone
"
set-federation-zone-vars
"
$zone
"
...
...
hack/e2e-internal/e2e-up.sh
View file @
edef3af3
...
@@ -30,24 +30,15 @@ source "${KUBE_ROOT}/cluster/kube-util.sh"
...
@@ -30,24 +30,15 @@ source "${KUBE_ROOT}/cluster/kube-util.sh"
prepare-e2e
prepare-e2e
if
[[
"
${
FEDERATION
:-}
"
==
"true"
]]
;
then
if
[[
"
${
FEDERATION
:-}
"
==
"true"
]]
;
then
cur_ip_octet2
=
180
cur_ip_octet2
=
180
# TODO(colhom): the last cluster that was created in the loop above is the current context.
for
zone
in
${
E2E_ZONES
}
;
do
# Hence, it will be the cluster that hosts the federated components.
(
# In the future, we will want to loop through the all the federated contexts,
export
CLUSTER_IP_RANGE
=
"10.
${
cur_ip_octet2
}
.0.0/16"
# select each one and call federated-up
set-federation-zone-vars
"
$zone
"
for
zone
in
${
E2E_ZONES
}
;
do
test-setup
(
)
export
CLUSTER_IP_RANGE
=
"10.
${
cur_ip_octet2
}
.0.0/16"
cur_ip_octet2
=
"
$((
cur_ip_octet2
+
1
))
"
set-federation-zone-vars
"
$zone
"
done
test-setup
)
cur_ip_octet2
=
"
$((
cur_ip_octet2
+
1
))
"
done
# Sets ${CLUSTER_CONTEXT}
kubeconfig-federation-context
"
${
zone
}
"
"
${
KUBE_ROOT
}
/federation/cluster/federation-up.sh"
"
${
CLUSTER_CONTEXT
}
"
else
else
test-setup
test-setup
fi
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment