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

Installplan Job template update #86

Merged
merged 1 commit into from
Feb 23, 2022

Conversation

jfilipcz
Copy link
Contributor

What is this PR About?

Installplan Job template update adds a new functionality on top of the legacy behavior. New approach triggers the approver job to check for installplan on a periodic basis, instead of legacy behavior of trying to approve installplan once and quitting.
Legacy behavior is still in place, and is used by default. New behavior is enabled by setting up WAIT_FOR_INSTALLPLAN to true when applying the template. In the new approach, job will run for maximum of 3600 seconds, it's going to exit once installplan for specified namespace is approved .

How do we test this?

Create a job based on the new template with WAIT_FOR_INSTALLPLAN set to true, create an operator subscription (approval mode: Manual), and observe how the installplan gets approved

cc: @redhat-cop/day-in-the-life

@garethahealy
Copy link
Contributor

/lgtm
/approve

@garethahealy garethahealy merged commit b064412 into redhat-cop:master Feb 23, 2022
Copy link
Contributor

@oybed oybed left a comment

Choose a reason for hiding this comment

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

Looks like this took a bit of a different approach than discussed as we should just add the "wait" and otherwise keep it the same IMHO. Since the PR was merged before we managed to review, let's submit some follow-up PRs and fine-tune.

Also some inline comment

echo "Found ${installplan}.."
if [ $(oc get installplan $installplan -o jsonpath="{.spec.approved}") = "false" ]; then
oc patch installplan $installplan -n ${NAMESPACE} --type=json -p='[{"op":"replace","path": "/spec/approved", "value": true}]'
echo "${installplan} approved, job completed succesfully. Your operator should now be in the process of installation"
Copy link
Contributor

Choose a reason for hiding this comment

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

/succesfully/successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants