From 77dd2496d0eaccdf5073796e58d4936094264c2e Mon Sep 17 00:00:00 2001 From: Mike Graves Date: Tue, 10 May 2022 11:14:23 -0400 Subject: [PATCH] Bring docs changes over from latest release (#455) Bring docs changes over from latest release Depends-On: ansible/ansible-zuul-jobs#1526 SUMMARY Brings docs generation changes over from 2.3.1 release. ISSUE TYPE Docs Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis --- CHANGELOG.rst | 60 ++ Makefile | 2 +- README.md | 4 +- changelogs/changelog.yaml | 101 +++ .../fragments/408-fix-wait-on-exception.yml | 2 - .../417-fix-k8s-drain-delete-options.yaml | 3 - ...8s_cp-fix-issue-when-issue-local_path.yaml | 2 - ...x-issue-when-using-template-parameter.yaml | 3 - ...4-fix-k8s-delete-using-label_selector.yaml | 3 - ...ubernetes.core.k8s_cluster_info_module.rst | 35 + docs/kubernetes.core.k8s_cp_module.rst | 35 + docs/kubernetes.core.k8s_drain_module.rst | 35 + docs/kubernetes.core.k8s_exec_module.rst | 35 + docs/kubernetes.core.k8s_info_module.rst | 35 + .../kubernetes.core.k8s_json_patch_module.rst | 35 + docs/kubernetes.core.k8s_log_module.rst | 35 + docs/kubernetes.core.k8s_module.rst | 35 + docs/kubernetes.core.k8s_rollback_module.rst | 35 + docs/kubernetes.core.k8s_scale_module.rst | 35 + docs/kubernetes.core.k8s_service_module.rst | 35 + docs/kubernetes.core.k8s_taint_module.rst | 660 ++++++++++++++++++ galaxy.yml | 2 +- 22 files changed, 1211 insertions(+), 16 deletions(-) delete mode 100644 changelogs/fragments/408-fix-wait-on-exception.yml delete mode 100644 changelogs/fragments/417-fix-k8s-drain-delete-options.yaml delete mode 100644 changelogs/fragments/422-k8s_cp-fix-issue-when-issue-local_path.yaml delete mode 100644 changelogs/fragments/432-fix-issue-when-using-template-parameter.yaml delete mode 100644 changelogs/fragments/434-fix-k8s-delete-using-label_selector.yaml create mode 100644 docs/kubernetes.core.k8s_taint_module.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst index acfef9aa..9076315c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,66 @@ Kubernetes Collection Release Notes .. contents:: Topics +v2.3.1 +====== + +Bugfixes +-------- + +- Catch exception raised when the process is waiting for resources (https://github.com/ansible-collections/kubernetes.core/issues/407). +- Remove `omit` placeholder when defining resource using template parameter (https://github.com/ansible-collections/kubernetes.core/issues/431). +- k8s - fix the issue when trying to delete resources using label_selectors options (https://github.com/ansible-collections/kubernetes.core/issues/433). +- k8s_cp - fix issue when using parameter local_path with file on managed node. (https://github.com/ansible-collections/kubernetes.core/issues/421). +- k8s_drain - fix error occurring when trying to drain node with disable_eviction set to yes (https://github.com/ansible-collections/kubernetes.core/issues/416). + +v2.3.0 +====== + +Minor Changes +------------- + +- add support for dry run with kubernetes client version >=18.20 (https://github.com/ansible-collections/kubernetes.core/pull/245). +- fixed module_defaults by removing routing hacks from runtime.yml (https://github.com/ansible-collections/kubernetes.core/pull/347). +- helm - add support for timeout cli parameter to allow setting Helm timeout independent of wait (https://github.com/ansible-collections/kubernetes.core/issues/67). +- helm - add support for wait parameter for helm uninstall command. (https://github.com/ansible-collections/kubernetes/core/issues/33). +- helm - support repo location for helm diff (https://github.com/ansible-collections/kubernetes.core/issues/174). +- helm - when ansible is executed in check mode, return the diff between what's deployed and what will be deployed. +- helm_info - add release state as a module argument (https://github.com/ansible-collections/kubernetes.core/issues/377). +- helm_plugin - Add plugin_version parameter to the helm_plugin module (https://github.com/ansible-collections/kubernetes.core/issues/157). +- helm_plugin - Add support for helm plugin update using state=update. +- helm_repository - add support for pass-credentials cli parameter (https://github.com/ansible-collections/kubernetes.core/pull/282). +- helm_repository - added support for ``host``, ``api_key``, ``validate_certs``, and ``ca_cert``. +- helm_template - add show_only and release_namespace as module arguments (https://github.com/ansible-collections/kubernetes.core/issues/313). +- k8s - add no_proxy support to k8s* (https://github.com/ansible-collections/kubernetes.core/pull/272). +- k8s - add support for server_side_apply. (https://github.com/ansible-collections/kubernetes.core/issues/87). +- k8s - add support for user impersonation. (https://github.com/ansible-collections/kubernetes/core/issues/40). +- k8s - allow resource definition using metadata.generateName (https://github.com/ansible-collections/kubernetes.core/issues/35). +- k8s lookup plugin - Enable turbo mode via environment variable (https://github.com/ansible-collections/kubernetes.core/issues/291). +- k8s_drain - Adds ``delete_emptydir_data`` option to ``k8s_drain.delete_options`` to evict pods with an ``emptyDir`` volume attached (https://github.com/ansible-collections/kubernetes.core/pull/322). +- k8s_exec - select first container from the pod if none specified (https://github.com/ansible-collections/kubernetes.core/issues/358). +- k8s_rollback - add support for check_mode. (https://github.com/ansible-collections/kubernetes/core/issues/243). +- k8s_scale - add support for check_mode. (https://github.com/ansible-collections/kubernetes/core/issues/244). +- kubectl - wait for dd command to complete before proceeding (https://github.com/ansible-collections/kubernetes.core/pull/321). + +Bugfixes +-------- + +- Various modules and plugins - use vendored version of ``distutils.version`` instead of the deprecated Python standard library ``distutils`` (https://github.com/ansible-collections/kubernetes.core/pull/314). +- common - Ensure the label_selectors parameter of _wait_for method is optional. +- helm_template - evaluate release_values after values_files, insuring highest precedence (now same behavior as in helm module). (https://github.com/ansible-collections/kubernetes.core/pull/348) +- import exception from ``kubernetes.client.rest``. +- k8s_drain - fix error caused by accessing an undefined variable when pods have local storage (https://github.com/ansible-collections/kubernetes.core/issues/292). +- k8s_info - don't wait on empty List resources (https://github.com/ansible-collections/kubernetes.core/pull/253). +- k8s_scale - fix waiting on statefulset when scaled down to 0 replicas (https://github.com/ansible-collections/kubernetes.core/issues/203). +- module_utils.common - change default opening mode to read-bytes to avoid bad interpretation of non ascii characters and strings, often present in 3rd party manifests. +- remove binary file from k8s_cp test suite (https://github.com/ansible-collections/kubernetes.core/pull/298). +- use resource prefix when finding resource and apiVersion is v1 (https://github.com/ansible-collections/kubernetes.core/issues/351). + +New Modules +----------- + +- k8s_taint - Taint a node in a Kubernetes/OpenShift cluster + v2.2.0 ====== diff --git a/Makefile b/Makefile index 9f4e57d0..eb9cb1ec 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Also needs to be updated in galaxy.yml -VERSION = 2.2.0 +VERSION = 2.3.1 TEST_ARGS ?= "" PYTHON_VERSION ?= `python -c 'import platform; print(".".join(platform.python_version_tuple()[0:2]))'` diff --git a/README.md b/README.md index f236fd55..ac6addd1 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ The collection includes a variety of Ansible content to help automate the manage This collection has been tested against following Ansible versions: **>=2.9.17**. +For collections that support Ansible 2.9, please ensure you update your `network_os` to use the +fully qualified collection name (for example, `cisco.ios.ios`). Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible. @@ -89,7 +91,7 @@ You can also include it in a `requirements.yml` file and install it via `ansible --- collections: - name: kubernetes.core - version: 2.2.0 + version: 2.3.1 ``` ### Installing the Kubernetes Python Library diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 2a680a84..d31ce1ff 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -486,3 +486,104 @@ releases: name: kustomize namespace: null release_date: '2021-09-15' + 2.3.0: + changes: + bugfixes: + - Various modules and plugins - use vendored version of ``distutils.version`` + instead of the deprecated Python standard library ``distutils`` (https://github.com/ansible-collections/kubernetes.core/pull/314). + - common - Ensure the label_selectors parameter of _wait_for method is optional. + - helm_template - evaluate release_values after values_files, insuring highest + precedence (now same behavior as in helm module). (https://github.com/ansible-collections/kubernetes.core/pull/348) + - import exception from ``kubernetes.client.rest``. + - k8s_drain - fix error caused by accessing an undefined variable when pods + have local storage (https://github.com/ansible-collections/kubernetes.core/issues/292). + - k8s_info - don't wait on empty List resources (https://github.com/ansible-collections/kubernetes.core/pull/253). + - k8s_scale - fix waiting on statefulset when scaled down to 0 replicas (https://github.com/ansible-collections/kubernetes.core/issues/203). + - module_utils.common - change default opening mode to read-bytes to avoid bad + interpretation of non ascii characters and strings, often present in 3rd party + manifests. + - remove binary file from k8s_cp test suite (https://github.com/ansible-collections/kubernetes.core/pull/298). + - use resource prefix when finding resource and apiVersion is v1 (https://github.com/ansible-collections/kubernetes.core/issues/351). + minor_changes: + - add support for dry run with kubernetes client version >=18.20 (https://github.com/ansible-collections/kubernetes.core/pull/245). + - fixed module_defaults by removing routing hacks from runtime.yml (https://github.com/ansible-collections/kubernetes.core/pull/347). + - helm - add support for timeout cli parameter to allow setting Helm timeout + independent of wait (https://github.com/ansible-collections/kubernetes.core/issues/67). + - helm - add support for wait parameter for helm uninstall command. (https://github.com/ansible-collections/kubernetes/core/issues/33). + - helm - support repo location for helm diff (https://github.com/ansible-collections/kubernetes.core/issues/174). + - helm - when ansible is executed in check mode, return the diff between what's + deployed and what will be deployed. + - helm_info - add release state as a module argument (https://github.com/ansible-collections/kubernetes.core/issues/377). + - helm_plugin - Add plugin_version parameter to the helm_plugin module (https://github.com/ansible-collections/kubernetes.core/issues/157). + - helm_plugin - Add support for helm plugin update using state=update. + - helm_repository - add support for pass-credentials cli parameter (https://github.com/ansible-collections/kubernetes.core/pull/282). + - helm_repository - added support for ``host``, ``api_key``, ``validate_certs``, + and ``ca_cert``. + - helm_template - add show_only and release_namespace as module arguments (https://github.com/ansible-collections/kubernetes.core/issues/313). + - k8s - add no_proxy support to k8s* (https://github.com/ansible-collections/kubernetes.core/pull/272). + - k8s - add support for server_side_apply. (https://github.com/ansible-collections/kubernetes.core/issues/87). + - k8s - add support for user impersonation. (https://github.com/ansible-collections/kubernetes/core/issues/40). + - k8s - allow resource definition using metadata.generateName (https://github.com/ansible-collections/kubernetes.core/issues/35). + - k8s lookup plugin - Enable turbo mode via environment variable (https://github.com/ansible-collections/kubernetes.core/issues/291). + - k8s_drain - Adds ``delete_emptydir_data`` option to ``k8s_drain.delete_options`` + to evict pods with an ``emptyDir`` volume attached (https://github.com/ansible-collections/kubernetes.core/pull/322). + - k8s_exec - select first container from the pod if none specified (https://github.com/ansible-collections/kubernetes.core/issues/358). + - k8s_rollback - add support for check_mode. (https://github.com/ansible-collections/kubernetes/core/issues/243). + - k8s_scale - add support for check_mode. (https://github.com/ansible-collections/kubernetes/core/issues/244). + - kubectl - wait for dd command to complete before proceeding (https://github.com/ansible-collections/kubernetes.core/pull/321). + fragments: + - 0-copy_ignore_txt.yml + - 226-add-version-parameter-to-helm_plugin.yml + - 231-helm-add-timeout-parameter.yaml + - 238-helm-add-support-for-helm-uninstall-wait.yaml + - 238-k8s-add-support-for-generate_name.yml + - 245-add-dry-run.yaml + - 250-k8s-add-support-for-impersonation.yaml + - 253-dont-wait-on-list-resources.yaml + - 255-k8s_scale-k8s_rollback-add-support-for-check_mode.yml + - 260-k8s-add-support-for-server_side_apply.yml + - 272-k8s-add-support-no_proxy.yaml + - 282-helm-repository-add-pass-credentials.yaml + - 290-returns-diff-in-check-mode.yaml + - 295-fix-k8s-drain-variable-declaration.yaml + - 298-remove-binary-file.yaml + - 308-fix-for-common-non-ascii-characters-in-resources.yaml + - 313-helm-template-add-support-for-show-only-and-release-namespace.yml + - 321-kubectl_sleep.yml + - 322-Add-delete_emptydir_data-to-drain-delete_options.yaml + - 335-k8s-lookup-add-support-for-turbo-mode.yml + - 347-routing.yml + - 348-helm_template-fix-precedence-of-release-values-over-values-files.yaml + - 358-k8s_exec.yml + - 364-use-resource-prefix.yaml + - 377-helm-info-state.yml + - 389-helm-add-support-chart_repo_url-on-helm_diff.yml + - 391-fix-statefulset-wait.yaml + - _wait_for_label_selector_optional.yaml + - disutils.version.yml + - exception.yml + - helm_repository.yml + modules: + - description: Taint a node in a Kubernetes/OpenShift cluster + name: k8s_taint + namespace: '' + release_date: '2022-03-11' + 2.3.1: + changes: + bugfixes: + - Catch expectation raised when the process is waiting for resources (https://github.com/ansible-collections/kubernetes.core/issues/407). + - Remove `omit` placeholder when defining resource using template parameter + (https://github.com/ansible-collections/kubernetes.core/issues/431). + - k8s - fix the issue when trying to delete resources using label_selectors + options (https://github.com/ansible-collections/kubernetes.core/issues/433). + - k8s_cp - fix issue when using parameter local_path with file on managed node. + (https://github.com/ansible-collections/kubernetes.core/issues/421). + - k8s_drain - fix error occurring when trying to drain node with disable_eviction + set to yes (https://github.com/ansible-collections/kubernetes.core/issues/416). + fragments: + - 408-fix-wait-on-exception.yml + - 417-fix-k8s-drain-delete-options.yaml + - 422-k8s_cp-fix-issue-when-issue-local_path.yaml + - 432-fix-issue-when-using-template-parameter.yaml + - 434-fix-k8s-delete-using-label_selector.yaml + release_date: '2022-05-02' diff --git a/changelogs/fragments/408-fix-wait-on-exception.yml b/changelogs/fragments/408-fix-wait-on-exception.yml deleted file mode 100644 index 66171822..00000000 --- a/changelogs/fragments/408-fix-wait-on-exception.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - Catch expectation raised when the process is waiting for resources (https://github.com/ansible-collections/kubernetes.core/issues/407). diff --git a/changelogs/fragments/417-fix-k8s-drain-delete-options.yaml b/changelogs/fragments/417-fix-k8s-drain-delete-options.yaml deleted file mode 100644 index c897c7e0..00000000 --- a/changelogs/fragments/417-fix-k8s-drain-delete-options.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: - - k8s_drain - fix error occurring when trying to drain node with disable_eviction set to yes (https://github.com/ansible-collections/kubernetes.core/issues/416). diff --git a/changelogs/fragments/422-k8s_cp-fix-issue-when-issue-local_path.yaml b/changelogs/fragments/422-k8s_cp-fix-issue-when-issue-local_path.yaml deleted file mode 100644 index 5677ff8c..00000000 --- a/changelogs/fragments/422-k8s_cp-fix-issue-when-issue-local_path.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - k8s_cp - fix issue when using parameter local_path with file on managed node. (https://github.com/ansible-collections/kubernetes.core/issues/421). diff --git a/changelogs/fragments/432-fix-issue-when-using-template-parameter.yaml b/changelogs/fragments/432-fix-issue-when-using-template-parameter.yaml deleted file mode 100644 index ebbbe49d..00000000 --- a/changelogs/fragments/432-fix-issue-when-using-template-parameter.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: - - Remove `omit` placeholder when defining resource using template parameter (https://github.com/ansible-collections/kubernetes.core/issues/431). diff --git a/changelogs/fragments/434-fix-k8s-delete-using-label_selector.yaml b/changelogs/fragments/434-fix-k8s-delete-using-label_selector.yaml deleted file mode 100644 index d4c619bd..00000000 --- a/changelogs/fragments/434-fix-k8s-delete-using-label_selector.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: - - k8s - fix the issue when trying to delete resources using label_selectors options (https://github.com/ansible-collections/kubernetes.core/issues/433). diff --git a/docs/kubernetes.core.k8s_cluster_info_module.rst b/docs/kubernetes.core.k8s_cluster_info_module.rst index bdd83ae4..5e42983c 100644 --- a/docs/kubernetes.core.k8s_cluster_info_module.rst +++ b/docs/kubernetes.core.k8s_cluster_info_module.rst @@ -136,6 +136,41 @@ Parameters
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
+ + +
+ impersonate_groups + +
+ list + / elements=string +
+
added in 2.3.0
+ + + + +
Group(s) to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2
+ + + + +
+ impersonate_user + +
+ string +
+
added in 2.3.0
+ + + + +
Username to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.
+ +
diff --git a/docs/kubernetes.core.k8s_cp_module.rst b/docs/kubernetes.core.k8s_cp_module.rst index 1cf34449..c61e1c12 100644 --- a/docs/kubernetes.core.k8s_cp_module.rst +++ b/docs/kubernetes.core.k8s_cp_module.rst @@ -167,6 +167,41 @@ Parameters
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
+ + +
+ impersonate_groups + +
+ list + / elements=string +
+
added in 2.3.0
+ + + + +
Group(s) to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2
+ + + + +
+ impersonate_user + +
+ string +
+
added in 2.3.0
+ + + + +
Username to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.
+ +
diff --git a/docs/kubernetes.core.k8s_drain_module.rst b/docs/kubernetes.core.k8s_drain_module.rst index f719e04b..fa6e5ffb 100644 --- a/docs/kubernetes.core.k8s_drain_module.rst +++ b/docs/kubernetes.core.k8s_drain_module.rst @@ -286,6 +286,41 @@ Parameters
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
+ + +
+ impersonate_groups + +
+ list + / elements=string +
+
added in 2.3.0
+ + + + +
Group(s) to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2
+ + + + +
+ impersonate_user + +
+ string +
+
added in 2.3.0
+ + + + +
Username to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.
+ +
diff --git a/docs/kubernetes.core.k8s_exec_module.rst b/docs/kubernetes.core.k8s_exec_module.rst index efadf5b5..a928352e 100644 --- a/docs/kubernetes.core.k8s_exec_module.rst +++ b/docs/kubernetes.core.k8s_exec_module.rst @@ -166,6 +166,41 @@ Parameters
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
+ + +
+ impersonate_groups + +
+ list + / elements=string +
+
added in 2.3.0
+ + + + +
Group(s) to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2
+ + + + +
+ impersonate_user + +
+ string +
+
added in 2.3.0
+ + + + +
Username to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.
+ +
diff --git a/docs/kubernetes.core.k8s_info_module.rst b/docs/kubernetes.core.k8s_info_module.rst index 518a4599..e4d248af 100644 --- a/docs/kubernetes.core.k8s_info_module.rst +++ b/docs/kubernetes.core.k8s_info_module.rst @@ -173,6 +173,41 @@ Parameters
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
+ + +
+ impersonate_groups + +
+ list + / elements=string +
+
added in 2.3.0
+ + + + +
Group(s) to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2
+ + + + +
+ impersonate_user + +
+ string +
+
added in 2.3.0
+ + + + +
Username to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.
+ +
diff --git a/docs/kubernetes.core.k8s_json_patch_module.rst b/docs/kubernetes.core.k8s_json_patch_module.rst index dad68d7b..926c8410 100644 --- a/docs/kubernetes.core.k8s_json_patch_module.rst +++ b/docs/kubernetes.core.k8s_json_patch_module.rst @@ -155,6 +155,41 @@ Parameters
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
+ + +
+ impersonate_groups + +
+ list + / elements=string +
+
added in 2.3.0
+ + + + +
Group(s) to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2
+ + + + +
+ impersonate_user + +
+ string +
+
added in 2.3.0
+ + + + +
Username to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.
+ +
diff --git a/docs/kubernetes.core.k8s_log_module.rst b/docs/kubernetes.core.k8s_log_module.rst index 964c1527..a639fb7d 100644 --- a/docs/kubernetes.core.k8s_log_module.rst +++ b/docs/kubernetes.core.k8s_log_module.rst @@ -174,6 +174,41 @@ Parameters
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
+ + +
+ impersonate_groups + +
+ list + / elements=string +
+
added in 2.3.0
+ + + + +
Group(s) to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2
+ + + + +
+ impersonate_user + +
+ string +
+
added in 2.3.0
+ + + + +
Username to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.
+ +
diff --git a/docs/kubernetes.core.k8s_module.rst b/docs/kubernetes.core.k8s_module.rst index 058b6b96..9db23e05 100644 --- a/docs/kubernetes.core.k8s_module.rst +++ b/docs/kubernetes.core.k8s_module.rst @@ -351,6 +351,41 @@ Parameters
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
+ + +
+ impersonate_groups + +
+ list + / elements=string +
+
added in 2.3.0
+ + + + +
Group(s) to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2
+ + + + +
+ impersonate_user + +
+ string +
+
added in 2.3.0
+ + + + +
Username to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.
+ +
diff --git a/docs/kubernetes.core.k8s_rollback_module.rst b/docs/kubernetes.core.k8s_rollback_module.rst index a559ce2e..99ff84b9 100644 --- a/docs/kubernetes.core.k8s_rollback_module.rst +++ b/docs/kubernetes.core.k8s_rollback_module.rst @@ -172,6 +172,41 @@ Parameters
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
+ + +
+ impersonate_groups + +
+ list + / elements=string +
+
added in 2.3.0
+ + + + +
Group(s) to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2
+ + + + +
+ impersonate_user + +
+ string +
+
added in 2.3.0
+ + + + +
Username to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.
+ +
diff --git a/docs/kubernetes.core.k8s_scale_module.rst b/docs/kubernetes.core.k8s_scale_module.rst index 9f7ddebc..c1f56a08 100644 --- a/docs/kubernetes.core.k8s_scale_module.rst +++ b/docs/kubernetes.core.k8s_scale_module.rst @@ -189,6 +189,41 @@ Parameters
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
+ + +
+ impersonate_groups + +
+ list + / elements=string +
+
added in 2.3.0
+ + + + +
Group(s) to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2
+ + + + +
+ impersonate_user + +
+ string +
+
added in 2.3.0
+ + + + +
Username to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.
+ +
diff --git a/docs/kubernetes.core.k8s_service_module.rst b/docs/kubernetes.core.k8s_service_module.rst index fa40e51f..2941b917 100644 --- a/docs/kubernetes.core.k8s_service_module.rst +++ b/docs/kubernetes.core.k8s_service_module.rst @@ -172,6 +172,41 @@ Parameters
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
+ + +
+ impersonate_groups + +
+ list + / elements=string +
+
added in 2.3.0
+ + + + +
Group(s) to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2
+ + + + +
+ impersonate_user + +
+ string +
+
added in 2.3.0
+ + + + +
Username to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.
+ +
diff --git a/docs/kubernetes.core.k8s_taint_module.rst b/docs/kubernetes.core.k8s_taint_module.rst new file mode 100644 index 00000000..4c342a20 --- /dev/null +++ b/docs/kubernetes.core.k8s_taint_module.rst @@ -0,0 +1,660 @@ +.. _kubernetes.core.k8s_taint_module: + + +************************* +kubernetes.core.k8s_taint +************************* + +**Taint a node in a Kubernetes/OpenShift cluster** + + +Version added: 2.3.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Taint allows a node to refuse Pod to be scheduled unless that Pod has a matching toleration. +- Untaint will remove taints from nodes as needed. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.6 +- kubernetes >= 12.0.0 + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ api_key + +
+ string +
+
+ +
Token used to authenticate with the API. Can also be specified via K8S_AUTH_API_KEY environment variable.
+
+
+ ca_cert + +
+ path +
+
+ +
Path to a CA certificate used to authenticate with the API. The full certificate chain must be provided to avoid certificate validation errors. Can also be specified via K8S_AUTH_SSL_CA_CERT environment variable.
+

aliases: ssl_ca_cert
+
+
+ client_cert + +
+ path +
+
+ +
Path to a certificate used to authenticate with the API. Can also be specified via K8S_AUTH_CERT_FILE environment variable.
+

aliases: cert_file
+
+
+ client_key + +
+ path +
+
+ +
Path to a key file used to authenticate with the API. Can also be specified via K8S_AUTH_KEY_FILE environment variable.
+

aliases: key_file
+
+
+ context + +
+ string +
+
+ +
The name of a context found in the config file. Can also be specified via K8S_AUTH_CONTEXT environment variable.
+
+
+ host + +
+ string +
+
+ +
Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
+
+
+ impersonate_groups + +
+ list + / elements=string +
+
added in 2.3.0
+
+ +
Group(s) to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2
+
+
+ impersonate_user + +
+ string +
+
added in 2.3.0
+
+ +
Username to impersonate for the operation.
+
Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.
+
+
+ kubeconfig + +
+ raw +
+
+ +
Path to an existing Kubernetes config file. If not provided, and no other connection options are provided, the Kubernetes client will attempt to load the default configuration file from ~/.kube/config. Can also be specified via K8S_AUTH_KUBECONFIG environment variable.
+
The kubernetes configuration can be provided as dictionary. This feature requires a python kubernetes client version >= 17.17.0. Added in version 2.2.0.
+
+
+ name + +
+ string + / required +
+
+ +
The name of the node.
+
+
+ no_proxy + +
+ string +
+
added in 2.3.0
+
+ +
The comma separated list of hosts/domains/IP/CIDR that shouldn't go through proxy. Can also be specified via K8S_AUTH_NO_PROXY environment variable.
+
Please note that this module does not pick up typical proxy settings from the environment (e.g. NO_PROXY).
+
This feature requires kubernetes>=19.15.0. When kubernetes library is less than 19.15.0, it fails even no_proxy set in correct.
+
example value is "localhost,.local,.example.com,127.0.0.1,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
+
+
+ password + +
+ string +
+
+ +
Provide a password for authenticating with the API. Can also be specified via K8S_AUTH_PASSWORD environment variable.
+
Please read the description of the username option for a discussion of when this option is applicable.
+
+
+ persist_config + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Whether or not to save the kube config refresh tokens. Can also be specified via K8S_AUTH_PERSIST_CONFIG environment variable.
+
When the k8s context is using a user credentials with refresh tokens (like oidc or gke/gcloud auth), the token is refreshed by the k8s python client library but not saved by default. So the old refresh token can expire and the next auth might fail. Setting this flag to true will tell the k8s python client to save the new refresh token to the kube config file.
+
Default to false.
+
Please note that the current version of the k8s python client library does not support setting this flag to True yet.
+
The fix for this k8s python library is here: https://github.com/kubernetes-client/python-base/pull/169
+
+
+ proxy + +
+ string +
+
+ +
The URL of an HTTP proxy to use for the connection. Can also be specified via K8S_AUTH_PROXY environment variable.
+
Please note that this module does not pick up typical proxy settings from the environment (e.g. HTTP_PROXY).
+
+
+ proxy_headers + +
+ dictionary +
+
added in 2.0.0
+
+ +
The Header used for the HTTP proxy.
+ +
+
+ basic_auth + +
+ string +
+
+ +
Colon-separated username:password for basic authentication header.
+
Can also be specified via K8S_AUTH_PROXY_HEADERS_BASIC_AUTH environment.
+
+
+ proxy_basic_auth + +
+ string +
+
+ +
Colon-separated username:password for proxy basic authentication header.
+
Can also be specified via K8S_AUTH_PROXY_HEADERS_PROXY_BASIC_AUTH environment.
+
+
+ user_agent + +
+ string +
+
+ +
String representing the user-agent you want, such as foo/1.0.
+
Can also be specified via K8S_AUTH_PROXY_HEADERS_USER_AGENT environment.
+
+
+ replace + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
If true, allow taints to be replaced.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • present ←
  • +
  • absent
  • +
+
+
Determines whether to add or remove taints.
+
+
+ taints + +
+ list + / elements=dictionary + / required +
+
+ +
List containing the taints.
+
+
+ effect + +
+ string +
+
+
    Choices: +
  • NoSchedule
  • +
  • NoExecute
  • +
  • PreferNoSchedule
  • +
+
+
The effect of the taint on Pods that do not tolerate the taint.
+
Required when state=present.
+
+
+ key + +
+ string +
+
+ +
The taint key to be applied to a node.
+
+
+ value + +
+ string +
+
+ +
The taint value corresponding to the taint key.
+
+
+ username + +
+ string +
+
+ +
Provide a username for authenticating with the API. Can also be specified via K8S_AUTH_USERNAME environment variable.
+
Please note that this only works with clusters configured to use HTTP Basic Auth. If your cluster has a different form of authentication (e.g. OAuth2 in OpenShift), this option will not work as expected and you should look into the community.okd.k8s_auth module, as that might do what you need.
+
+
+ validate_certs + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
Whether or not to verify the API server's SSL certificates. Can also be specified via K8S_AUTH_VERIFY_SSL environment variable.
+

aliases: verify_ssl
+
+
+ + +Notes +----- + +.. note:: + - To avoid SSL certificate validation errors when ``validate_certs`` is *True*, the full certificate chain for the API server must be provided via ``ca_cert`` or in the kubeconfig file. + + + +Examples +-------- + +.. code-block:: yaml + + - name: Taint node "foo" + kubernetes.core.k8s_taint: + state: present + name: foo + taints: + - effect: NoExecute + key: "key1" + + - name: Taint node "foo" + kubernetes.core.k8s_taint: + state: present + name: foo + taints: + - effect: NoExecute + key: "key1" + value: "value1" + - effect: NoSchedule + key: "key1" + value: "value1" + + - name: Remove taint from "foo". + kubernetes.core.k8s_taint: + state: absent + name: foo + taints: + - effect: NoExecute + key: "key1" + value: "value1" + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ result + +
+ complex +
+
success +
The tainted Node object. Will be empty in the case of a deletion.
+
+
  +
+ api_version + +
+ string +
+
success +
The versioned schema of this representation of an object.
+
+
  +
+ kind + +
+ string +
+
success +
Represents the REST resource this object represents.
+
+
  +
+ metadata + +
+ complex +
+
success +
Standard object metadata. Includes name, namespace, annotations, labels, etc.
+
+
  +
+ spec + +
+ complex +
+
success +
Specific attributes of the object. Will vary based on the api_version and kind.
+
+
  +
+ status + +
+ complex +
+
success +
Current status details for the object.
+
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Alina Buzachis (@alinabuzachis) diff --git a/galaxy.yml b/galaxy.yml index fb9238b3..8365b02a 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -25,7 +25,7 @@ tags: - openshift - okd - cluster -version: 2.2.0 +version: 2.3.1 build_ignore: - .DS_Store - '*.tar.gz'