mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-26 21:33:02 +00:00
* Cleanup gha * test by removing matrix excludes * Rename sanity tests * trigger integration tests * Fix ansible-lint workflow * Fix concurrency * Add ansible-lint config * Add ansible-lint config * Fix integration and lint issues * integration wf * fix yamllint issues * fix yamllint issues * update readme and add ignore-2.16.txt * fix ansible-doc * Add version * Use /dev/random to generate random data The GHA environment has difficultly generating entropy. Trying to read from /dev/urandom just blocks forever. We don't care if the random data is cryptographically secure; it's just garbage data for the test. Read from /dev/random, instead. This is only used during the k8s_copy test target. This also removes the custom test module that was being used to generate the files. It's not worth maintaining this for two task that can be replaced with some simple command/shell tasks. * Fix saniry errors * test github_action fix * Address review comments * Remove default types * review comments * isort fixes * remove tags * Add setuptools to venv * Test gh changes * update changelog * update ignore-2.16 * Fix indentation in inventory plugin example * Update .github/workflows/integration-tests.yaml * Update integration-tests.yaml --------- Co-authored-by: Mike Graves <mgraves@redhat.com> Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com>
68 lines
2.5 KiB
Python
68 lines
2.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
# Copyright: (c) 2020, Red Hat | Ansible
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
# Options for specifying object wait
|
|
|
|
from __future__ import absolute_import, division, print_function
|
|
|
|
__metaclass__ = type
|
|
|
|
|
|
class ModuleDocFragment(object):
|
|
DOCUMENTATION = r"""
|
|
options:
|
|
wait:
|
|
description:
|
|
- Whether to wait for certain resource kinds to end up in the desired state.
|
|
- By default the module exits once Kubernetes has received the request.
|
|
- Implemented for C(state=present) for C(Deployment), C(DaemonSet) and C(Pod), and for C(state=absent) for all resource kinds.
|
|
- For resource kinds without an implementation, C(wait) returns immediately unless C(wait_condition) is set.
|
|
default: no
|
|
type: bool
|
|
wait_sleep:
|
|
description:
|
|
- Number of seconds to sleep between checks.
|
|
default: 5
|
|
type: int
|
|
wait_timeout:
|
|
description:
|
|
- How long in seconds to wait for the resource to end up in the desired state.
|
|
- Ignored if C(wait) is not set.
|
|
default: 120
|
|
type: int
|
|
wait_condition:
|
|
description:
|
|
- Specifies a custom condition on the status to wait for.
|
|
- Ignored if C(wait) is not set or is set to False.
|
|
suboptions:
|
|
type:
|
|
type: str
|
|
description:
|
|
- The type of condition to wait for.
|
|
- For example, the C(Pod) resource will set the C(Ready) condition (among others).
|
|
- Required if you are specifying a C(wait_condition).
|
|
- If left empty, the C(wait_condition) field will be ignored.
|
|
- The possible types for a condition are specific to each resource type in Kubernetes.
|
|
- See the API documentation of the status field for a given resource to see possible choices.
|
|
status:
|
|
type: str
|
|
description:
|
|
- The value of the status field in your desired condition.
|
|
- For example, if a C(Deployment) is paused, the C(Progressing) C(type) will have the C(Unknown) status.
|
|
choices:
|
|
- "True"
|
|
- "False"
|
|
- "Unknown"
|
|
default: "True"
|
|
reason:
|
|
type: str
|
|
description:
|
|
- The value of the reason field in your desired condition
|
|
- For example, if a C(Deployment) is paused, The C(Progressing) C(type) will have the C(DeploymentPaused) reason.
|
|
- The possible reasons in a condition are specific to each resource type in Kubernetes.
|
|
- See the API documentation of the status field for a given resource to see possible choices.
|
|
type: dict
|
|
"""
|