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

conditionally wait for ibm-licensing-instance #2252

Open
wants to merge 2 commits into
base: scripts-dev
Choose a base branch
from
Open
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
10 changes: 9 additions & 1 deletion cp3pt0-deployment/setup_singleton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,15 @@ function is_migrate_licensing() {
fi

title "Check migrating LTSR ibm-licensing-operator"
wait_for_licensing_instance_deployment
# wait for ibm-licensing-operator instance
local licensing_operator_exist=$("$OC" get deployment -A | (grep ibm-licensing-operator || echo "fail"))
if [[ $licensing_operator_exist != "fail" ]]; then
wait_for_licensing_instance_deployment
else
info "No ibm-licensing-operator found, skipping"
return 0
fi

local ns=$("$OC" get deployments -A | grep ibm-licensing-service-instance | cut -d ' ' -f1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, one more comment, I noticed this line is also included in wait_for_licensing_instance_deployment, is it possible move this check under the above if condition? Thanks

if [ -z "$ns" ]; then
info "No LTSR ibm-licensing-operator to migrate, skipping"
Expand Down