-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add healthcheck start-interval option #848
Add healthcheck start-interval option #848
Conversation
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.
Thanks for your contribution! Unfortunately the option for docker_swarm_service cannot be added at the moment, since Docker SDK for Python does not yet support it. For docker_container it is possible (since we directly talk to the API).
Please note that you also have to add a changelog fragment. Thanks.
921350a
to
9c99104
Compare
a33efb3
to
597c0b2
Compare
Thanks for your feedbacks, I've updated the PR but not sure about the good way to check the API version and not really familiar with some failing tests. |
changelogs/fragments/848-docker_api-healthcheck-start-interval.yml
Outdated
Show resolved
Hide resolved
3be4bf6
to
d507851
Compare
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.
Looks good to me! I'm currently looking at the CI failures, they seem to be unrelated.
All tests pass except CentOS 7, but that's totally unrelated to this PR (ansible/ansible#83225). |
a4a05e7
into
ansible-collections:main
@x4rd0o1Vtx thanks a lot for your contribution! |
Thanks for your help and the quick review! |
SUMMARY
Add new healthcheck start-interval docker option.
https://docs.docker.com/reference/dockerfile/#healthcheck
/!\ This option requires Docker Engine version 25.0 or later.
ex:
Unsupported parameter
ISSUE TYPE
COMPONENT NAME
docker_container
docker_swarm_service
ADDITIONAL INFORMATION
Only docker_container module was tested.
Not sure about modify unit tests for docker_swarm_service at tests/integration/targets/docker_swarm_service/tasks/tests/options.yml.
Don't know the good way to protect this option for Docker Engine version <25.0. (I think not necessary because older versions seems to ignore it)