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

podman-4.1.1 renames Healthcheck to Health #442

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 10 additions & 6 deletions plugins/module_utils/podman/podman_container_lib.py
Expand Up @@ -59,11 +59,11 @@
generate_systemd=dict(type='dict', default={}),
gidmap=dict(type='list', elements='str'),
group_add=dict(type='list', elements='str', aliases=['groups']),
healthcheck=dict(type='str'),
healthcheck_interval=dict(type='str'),
healthcheck_retries=dict(type='int'),
healthcheck_start_period=dict(type='str'),
healthcheck_timeout=dict(type='str'),
healthcheck=dict(type='str', aliases=['health_cmd']),
healthcheck_interval=dict(type='str', aliases=['health_interval']),
healthcheck_retries=dict(type='int', aliases=['health_retries']),
healthcheck_start_period=dict(type='str', aliases=['health_start_period']),
healthcheck_timeout=dict(type='str', aliases=['health_timeout']),
hostname=dict(type='str'),
http_proxy=dict(type='bool'),
image_volume=dict(type='str', choices=['bind', 'tmpfs', 'ignore']),
Expand Down Expand Up @@ -907,9 +907,13 @@ def diffparam_healthcheck(self):
# the "test" key is a list of 2 items where the first one is
# "CMD-SHELL" and the second one is the actual healthcheck command.
before = self.info['config']['healthcheck']['test'][1]
elif 'health' in self.info['config']:
before = self.info['config']['health']['test'][1]
else:
before = ''
after = self.params['healthcheck'] or before
after = self.params.get('health',
self.params.get('healthcheck',
None)) or before
return self._diff_update_and_compare('healthcheck', before, after)

# Because of hostname is random generated, this parameter has partial idempotency only.
Expand Down
10 changes: 10 additions & 0 deletions plugins/modules/podman_container.py
Expand Up @@ -374,29 +374,39 @@
description:
- Set or alter a healthcheck command for a container.
type: str
aliases:
- health_cmd
healthcheck_interval:
description:
- Set an interval for the healthchecks
(a value of disable results in no automatic timer setup)
(default "30s")
type: str
aliases:
- health_interval
healthcheck_retries:
description:
- The number of retries allowed before a healthcheck is considered to be
unhealthy. The default value is 3.
type: int
aliases:
- health_retries
healthcheck_start_period:
description:
- The initialization time needed for a container to bootstrap.
The value can be expressed in time format like 2m3s. The default value
is 0s
type: str
aliases:
- health_start_period
healthcheck_timeout:
description:
- The maximum time allowed to complete the healthcheck before an interval
is considered failed. Like start-period, the value can be expressed in
a time format such as 1m22s. The default value is 30s
type: str
aliases:
- health_timeout
hostname:
description:
- Container host name. Sets the container host name that is available
Expand Down