Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rapidast execution on minikube mode #22

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Sanity/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1155,9 +1155,15 @@ rlJournalStart
wget -O tang_operator.yaml https://raw.githubusercontent.com/latchset/tang-operator/main/tools/scan_tools/tang_operator_template.yaml

# 4 - adapt configuration file template (token, machine)
API_HOST_PORT=$("${OC_CLIENT}" whoami --show-server | tr -d ' ')
DEFAULT_TOKEN=$("${OC_CLIENT}" get secret -n "${OPERATOR_NAMESPACE}" $("${OC_CLIENT}" get secret -n "${OPERATOR_NAMESPACE}"\
| grep ^tang-operator | grep service-account | awk '{print $1}') -o json | jq -Mr '.data.token' | base64 -d)
if [ "${EXECUTION_MODE}" == "MINIKUBE" ];
then
API_HOST_PORT=$(minikube ip)
DEFAULT_TOKEN="TEST_TOKEN_UNREQUIRED_IN_MINIKUBE"
else
API_HOST_PORT=$("${OC_CLIENT}" whoami --show-server | tr -d ' ')
DEFAULT_TOKEN=$("${OC_CLIENT}" get secret -n "${OPERATOR_NAMESPACE}" $("${OC_CLIENT}" get secret -n "${OPERATOR_NAMESPACE}"\
| grep ^tang-operator | grep service-account | awk '{print $1}') -o json | jq -Mr '.data.token' | base64 -d)
fi
sed -i s@"API_HOST_PORT_HERE"@"${API_HOST_PORT}"@g tang_operator.yaml
sed -i s@"AUTH_TOKEN_HERE"@"${DEFAULT_TOKEN}"@g tang_operator.yaml
sed -i s@"OPERATOR_NAMESPACE_HERE"@"${OPERATOR_NAMESPACE}"@g tang_operator.yaml
Expand Down