File tree Expand file tree Collapse file tree
tests/e2e/collections/ansible_collections/e2e/tests/roles
generate_namespaces/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ FORCE_RECREATE="false"
3939METALLB=" false"
4040SUBNET=" 1"
4141
42+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
43+ REPO_ROOT=" $( cd " ${SCRIPT_DIR} /.." && pwd) "
44+
4245verbose_log () {
4346 if [ " ${VERBOSE} " == " true" ]; then
4447 echo " (skdev) $1 "
175178}
176179
177180skupper::cluster::controller () {
178- SKUPPER_TESTING=true scripts/skupper-deployment-generator.sh cluster ${IMAGE_TAG} ${ROUTER_IMAGE_TAG} false
181+ SKUPPER_TESTING=true " ${REPO_ROOT} / scripts/skupper-deployment-generator.sh" cluster ${IMAGE_TAG} ${ROUTER_IMAGE_TAG} false
179182}
180183
181184main () {
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ readonly SKUPPER_TESTING=${SKUPPER_TESTING:-false}
2929
3030DEBUG=${DEBUG:= false}
3131
32+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
33+ REPO_ROOT=" $( cd " ${SCRIPT_DIR} /.." && pwd) "
34+
3235skupper::deployment::namespace () {
3336 cat << EOF
3437apiVersion: v1
276279}
277280
278281main () {
279- ktempdir=$( mktemp -d --tmpdir=./ )
282+ ktempdir=$( mktemp -d --tmpdir=" ${REPO_ROOT} " )
280283 if [ " ${DEBUG} " != " true" ]; then
281284 trap ' rm -rf $ktempdir' EXIT
282285 fi
Original file line number Diff line number Diff line change 1111 labels :
1212 e2e.id : " {{ generate_namespaces_namespace_label }}"
1313 kubeconfig : " {{ kubeconfig }}"
14- register : namespace
14+ register : namespace_result
1515
1616- name : Display namespace name
1717 ansible.builtin.debug :
18- msg : " Namespace Name: {{ namespace .result.metadata.labels['kubernetes.io/metadata.name'] }}"
18+ msg : " Namespace Name: {{ namespace_result .result.metadata.labels['kubernetes.io/metadata.name'] }}"
Original file line number Diff line number Diff line change 11---
22- name : Setting namespace name with prefix
33 ansible.builtin.set_fact :
4- namespace : " {{ namespace_prefix }}-{{ namespace_name }}"
4+ curl_namespace : " {{ namespace_prefix }}-{{ namespace_name }}"
55
66- name : Deploy curl pod
77 kubernetes.core.k8s :
88 api_version : v1
99 kind : Pod
1010 name : curl
11- namespace : " {{ namespace }}"
11+ namespace : " {{ curl_namespace }}"
1212 kubeconfig : " {{ kubeconfig }}"
1313 state : present
1414 definition :
2929
3030- name : Run curl command
3131 kubernetes.core.k8s_exec :
32- namespace : " {{ namespace }}"
32+ namespace : " {{ curl_namespace }}"
3333 kubeconfig : " {{ kubeconfig }}"
3434 pod : curl
3535 command : >-
You can’t perform that action at this time.
0 commit comments