-
Notifications
You must be signed in to change notification settings - Fork 24
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
set Ready condition after running ansible #294
Merged
morningspace
merged 4 commits into
crossplane-contrib:main
from
d-honeybadger:unready-status-on-ansible-failures
Feb 1, 2024
Merged
set Ready condition after running ansible #294
morningspace
merged 4 commits into
crossplane-contrib:main
from
d-honeybadger:unready-status-on-ansible-failures
Feb 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Dasha Komsa <[email protected]>
d-honeybadger
force-pushed
the
unready-status-on-ansible-failures
branch
from
January 18, 2024 17:36
b7f9d34
to
88307de
Compare
Signed-off-by: Dasha Komsa <[email protected]>
d-honeybadger
force-pushed
the
unready-status-on-ansible-failures
branch
from
January 18, 2024 19:14
71035a4
to
5ebf707
Compare
configuration Signed-off-by: Dasha Komsa <[email protected]>
d-honeybadger
force-pushed
the
unready-status-on-ansible-failures
branch
from
January 18, 2024 22:20
01b40d5
to
b11dfd5
Compare
@d-honeybadger The CI lint is failing. Could you please fix it? The other changes look good to me! |
d-honeybadger
force-pushed
the
unready-status-on-ansible-failures
branch
from
January 29, 2024 17:58
5e9030c
to
5542434
Compare
Signed-off-by: Dasha Komsa <[email protected]>
d-honeybadger
force-pushed
the
unready-status-on-ansible-failures
branch
from
January 29, 2024 18:00
5542434
to
cb76ced
Compare
Oops fixed that, thank you! |
@morningspace ready for re-review 🙏 |
morningspace
approved these changes
Feb 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
3 tasks
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of your changes
Fixes #228
This sets
Ready
condition based on the result of an ansiblerun. Ansibleruns can't observed as a typical crossplane external resource, but interpreting the exit code as the availability indicator seems like the next best thing.I'd also like to extract a better error message than just
exit code X
(which is the error message), but that requires parsing ansible logs and there's some yak shaving to do to make that possible.I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
make local.xpkg.deploy.provider.provider-ansible
)ObserveAndDelete
. Here's my example:While ReconcileSuccess is true simply b/c lastappliedconfiguration matches the current spec, the resource is still marked as unavailable, as expected.
ansible.crossplane.io/runPolicy: CheckWhenObserve
annotation. It actually will be failing b/c ofCheckWhenObserve mode broken b/c ansible logs are not valid json #290, but at least make sure no other issues were introduced.