mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #9141 from thockin/services-e2e
Make a namespace before using it
This commit is contained in:
commit
52e5df7ebb
@ -64,6 +64,19 @@ function do_teardown() {
|
|||||||
${KUBECTL} delete namespace "${NAMESPACE}"
|
${KUBECTL} delete namespace "${NAMESPACE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function make_namespace() {
|
||||||
|
echo "Making namespace '${NAMESPACE}'"
|
||||||
|
${KUBECTL} create -f - << __EOF__
|
||||||
|
{
|
||||||
|
"kind": "Namespace",
|
||||||
|
"apiVersion": "v1beta3",
|
||||||
|
"metadata": {
|
||||||
|
"name": "${NAMESPACE}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__EOF__
|
||||||
|
}
|
||||||
|
|
||||||
# Args:
|
# Args:
|
||||||
# $1: service name
|
# $1: service name
|
||||||
# $2: service port
|
# $2: service port
|
||||||
@ -292,6 +305,9 @@ detect-minions
|
|||||||
test_node="${MINION_NAMES[0]}"
|
test_node="${MINION_NAMES[0]}"
|
||||||
master="${MASTER_NAME}"
|
master="${MASTER_NAME}"
|
||||||
|
|
||||||
|
# Make our namespace
|
||||||
|
make_namespace
|
||||||
|
|
||||||
# Launch some pods and services.
|
# Launch some pods and services.
|
||||||
svc1_name="service1"
|
svc1_name="service1"
|
||||||
svc1_port=80
|
svc1_port=80
|
||||||
|
Loading…
Reference in New Issue
Block a user