From 4314ad6091f8b5c4a99c4a0c04e33e7cd4c3edfc Mon Sep 17 00:00:00 2001 From: Don Naro Date: Tue, 22 Sep 2026 10:53:20 +0100 Subject: [PATCH] Release v6.6.0 (#1261) (#1266) This change syncs the release prep v6.6.0 commit to the main branch. #1261 Reviewed-by: Alina Buzachis Reviewed-by: Bikouo Aubin --- CHANGELOG.rst | 42 +++++++ README.md | 2 +- changelogs/changelog.yaml | 109 ++++++++++++++++++ .../1253-k8s-lookup-turbo-version-check.yml | 5 - .../20250108-fix-empty-template-output.yaml | 2 - .../20251027-metadata-only-fetches.yaml | 2 - .../20260109-fix-deprecated-calls.yaml | 3 - .../20260723-remove-module-utils-six.yaml | 4 - .../20260805-add-job-wait-condition.yaml | 4 - .../20260807-helm-cleanup-on-fail.yaml | 3 - .../20260807-helm-wait-for-jobs.yaml | 5 - .../fragments/20260812-action-groups.yaml | 3 - .../fragments/20260813-k8s-cp-truncation.yaml | 8 -- ...7-helm-oci-registry-progress-on-stdout.yml | 3 - .../20260826-helm-value-reuse-options.yaml | 6 - ...260908-helm-repository-trailing-slash.yaml | 3 - .../20260911-deprecate-status-values.yaml | 6 - .../20260911-update-deprecation-notices.yaml | 8 -- .../fragments/deprecate-enable-turbo-mode.yml | 7 -- .../fragments/fix-ansible-lint-warnings.yaml | 3 - docs/kubernetes.core.helm_info_module.rst | 2 +- docs/kubernetes.core.helm_module.rst | 53 ++++++++- docs/kubernetes.core.k8s_cp_module.rst | 20 ++++ docs/kubernetes.core.k8s_exec_module.rst | 2 +- docs/kubernetes.core.k8s_info_module.rst | 29 +++++ docs/kubernetes.core.k8s_service_module.rst | 1 + docs/kubernetes.core.kubectl_connection.rst | 3 + 27 files changed, 255 insertions(+), 83 deletions(-) delete mode 100644 changelogs/fragments/1253-k8s-lookup-turbo-version-check.yml delete mode 100644 changelogs/fragments/20250108-fix-empty-template-output.yaml delete mode 100644 changelogs/fragments/20251027-metadata-only-fetches.yaml delete mode 100644 changelogs/fragments/20260109-fix-deprecated-calls.yaml delete mode 100644 changelogs/fragments/20260723-remove-module-utils-six.yaml delete mode 100644 changelogs/fragments/20260805-add-job-wait-condition.yaml delete mode 100644 changelogs/fragments/20260807-helm-cleanup-on-fail.yaml delete mode 100644 changelogs/fragments/20260807-helm-wait-for-jobs.yaml delete mode 100644 changelogs/fragments/20260812-action-groups.yaml delete mode 100644 changelogs/fragments/20260813-k8s-cp-truncation.yaml delete mode 100644 changelogs/fragments/20260817-helm-oci-registry-progress-on-stdout.yml delete mode 100644 changelogs/fragments/20260826-helm-value-reuse-options.yaml delete mode 100644 changelogs/fragments/20260908-helm-repository-trailing-slash.yaml delete mode 100644 changelogs/fragments/20260911-deprecate-status-values.yaml delete mode 100644 changelogs/fragments/20260911-update-deprecation-notices.yaml delete mode 100644 changelogs/fragments/deprecate-enable-turbo-mode.yml delete mode 100644 changelogs/fragments/fix-ansible-lint-warnings.yaml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index cda8c7cf..c10b3190 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,48 @@ Kubernetes Collection Release Notes .. contents:: Topics +v6.6.0 +====== + +Minor Changes +------------- + +- Remove the remaining ``ansible.module_utils.six`` import to avoid deprecation warnings, replacing it with the Python standard library equivalent (https://github.com/ansible-collections/kubernetes.core/pull/1197). +- helm - Add ``wait_for_jobs`` option to wait for all Jobs to complete before marking a Helm release as successful. Requires Helm >= 3.5.0 (https://github.com/ansible-collections/kubernetes.core/pull/1140). +- helm - add the ``cleanup_on_fail`` option, mapping to the ``--cleanup-on-fail`` flag, to allow deletion of new resources created during a failed upgrade. It complements ``atomic`` and can be combined with it, but cannot be used with ``replace``, since that deploys through ``helm install`` which does not accept the flag (https://github.com/ansible-collections/kubernetes.core/pull/1206). +- helm - warn when ``reuse_values`` or ``reset_then_reuse_values`` is requested in a combination helm ignores, which happens by default because ``reset_values`` defaults to ``true``, and whenever either is combined with ``replace``. The option descriptions and the examples now state that ``reset_values`` has to be set to ``false`` for either option to take effect (https://github.com/ansible-collections/kubernetes.core/pull/1230). +- k8s lookup - warn when ``ENABLE_TURBO_MODE`` is set but the ``cloud.common`` collection is not installed, instead of silently falling back to the standard lookup base (https://github.com/ansible-collections/kubernetes.core/pull/1242). +- k8s_cp - Add the ``copy_timeout`` option (default 300 seconds) bounding how long the module will spend streaming an archive to a pod and waiting for the remote ``tar`` to finish, so that a stalled copy fails instead of hanging indefinitely (https://github.com/ansible-collections/kubernetes.core/pull/1217). +- k8s_cp - Stream the tar archive to the pod chunk by chunk instead of building the whole archive in memory first, which cuts peak memory use when copying large files (https://github.com/ansible-collections/kubernetes.core/pull/1217). +- k8s_cp - When copying to a pod, the module now also uses ``/bin/sh`` and ``head`` in the container, when present, to confirm the copy completed. Containers without them keep the previous behaviour and get a warning that completion could not be verified (https://github.com/ansible-collections/kubernetes.core/pull/1217). +- k8s_info - Support for metadata-only fetches in k8s_info module (https://github.com/ansible-collections/kubernetes.core/pull/1030) +- meta - Add ``helm_plugin`` and ``helm_plugin_info`` to the ``helm`` action group, and ``k8s_taint`` to the ``k8s`` action group, so that ``module_defaults`` set on those groups applies to them (https://github.com/ansible-collections/kubernetes.core/pull/1216). +- use `collections.abc` instead of deprecated `ansible.module_utils.common._collections_compat` (https://github.com/ansible-collections/kubernetes.core/pull/1057). +- waiter - Add ``job_complete`` predicate to support waiting for Job resources to reach ``Complete`` or ``Failed`` condition (https://github.com/ansible-collections/kubernetes.core/issues/1201). + +Deprecated Features +------------------- + +- Ansible Turbo mode (``ENABLE_TURBO_MODE``) has been deprecated and will be removed in release 8.0.0, as it depends on the ``cloud.common`` collection, which is being retired (https://github.com/ansible-collections/kubernetes.core/pull/1242). +- helm - the ``status.values`` return value has been deprecated and will be removed in version 8.0.0. Use ``status.release_values`` instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). +- helm - the ``wait_timeout`` parameter has been deprecated and will be removed in version 7.0.0. Use ``timeout`` instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). +- helm_info - the ``status.values`` return value has been deprecated and will be removed in version 8.0.0. Use ``status.release_values`` instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). +- k8s_exec - the ``return_code`` return value has been deprecated and will be removed in version 7.0.0. Use ``rc`` instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). +- k8s_service - the ``merge_type=json`` option has been deprecated and will be removed in version 7.0.0. Use ``kubernetes.core.k8s_json_patch`` module instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). + +Bugfixes +-------- + +- Ansible Turbo mode - ignore ``ENABLE_TURBO_MODE`` on ansible-core 2.19.0 and later, where the ``cloud.common`` collection is not supported, and fall back to the standard ``AnsibleModule`` instead of failing with ``byte indices must be integers or slices, not str`` (https://github.com/ansible-collections/kubernetes.core/pull/1242). +- helm - do not pass the upgrade-only ``--reuse-values`` and ``--reset-then-reuse-values`` flags to ``helm install``, which rejected them with ``unknown flag`` whenever ``reuse_values`` or ``reset_then_reuse_values`` was combined with ``replace`` (https://github.com/ansible-collections/kubernetes.core/pull/1230). +- helm - fix the ``reuse_values`` example, which set only ``reuse_values=true``. ``reset_values`` defaults to ``true`` and helm ignores ``--reuse-values`` whenever ``--reset-values`` is passed, so following the example reset the release values instead of reusing them (https://github.com/ansible-collections/kubernetes.core/pull/1230). +- helm - skip Helm's OCI registry progress messages when parsing the output of ``helm show chart``. As of Helm 4.2.1 these are printed to stdout instead of stderr (https://github.com/helm/helm/pull/32056), which made installing a chart from an OCI registry fail with a YAML scanner error when the chart version contained a ``+`` (https://github.com/ansible-collections/kubernetes.core/pull/1223). +- helm_repository - normalize both sides of the repository URL comparison, so that a repository already registered with a trailing slash is recognized as matching instead of failing with ``Repository already have a repository named `` (https://github.com/ansible-collections/kubernetes.core/pull/1236). +- helm_template - strip Helm's OCI registry progress messages from the returned ``stdout``, which is documented to contain only the rendered templates (https://github.com/ansible-collections/kubernetes.core/pull/1223). +- k8s lookup - ignore ``ENABLE_TURBO_MODE`` on ansible-core 2.19.0 and later, where the ``cloud.common`` collection is not supported. Fall back to the standard ``LookupBase`` instead of failing with a traceback (https://github.com/ansible-collections/kubernetes.core/pull/1253). +- k8s_cp - Fix silent truncation when copying to a pod. The module closed the exec connection immediately after writing the last chunk of the tar archive, which killed the remote ``tar`` before it had finished extracting, and never checked the process exit status, so a partial copy was reported as a success. The archive is now bounded with ``head -c`` so ``tar`` gets a clean EOF and exits on its own, and the module waits for that exit and fails on a non-zero status (https://github.com/ansible-collections/kubernetes.core/pull/1217). +- k8s_info - Handle empty template output gracefully by returning ``changed=false`` instead of failing when Jinja2 template renders to an empty string (https://github.com/ansible-collections/kubernetes.core/issues/1042). + v6.5.0 ====== diff --git a/README.md b/README.md index 6390d94c..aed77502 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ You can also include it in a `requirements.yml` file and install it via `ansible --- collections: - name: kubernetes.core - version: 6.5.0 + version: 6.6.0 ``` ### Installing the Kubernetes Python Library diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 4114e288..e433348d 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1320,3 +1320,112 @@ releases: name: kubeconfig namespace: '' release_date: '2026-07-08' + 6.6.0: + changes: + bugfixes: + - Ansible Turbo mode - ignore ``ENABLE_TURBO_MODE`` on ansible-core 2.19.0 and + later, where the ``cloud.common`` collection is not supported, and fall back + to the standard ``AnsibleModule`` instead of failing with ``byte indices must + be integers or slices, not str`` (https://github.com/ansible-collections/kubernetes.core/pull/1242). + - helm - do not pass the upgrade-only ``--reuse-values`` and ``--reset-then-reuse-values`` + flags to ``helm install``, which rejected them with ``unknown flag`` whenever + ``reuse_values`` or ``reset_then_reuse_values`` was combined with ``replace`` + (https://github.com/ansible-collections/kubernetes.core/pull/1230). + - helm - fix the ``reuse_values`` example, which set only ``reuse_values=true``. + ``reset_values`` defaults to ``true`` and helm ignores ``--reuse-values`` + whenever ``--reset-values`` is passed, so following the example reset the + release values instead of reusing them (https://github.com/ansible-collections/kubernetes.core/pull/1230). + - helm - skip Helm's OCI registry progress messages when parsing the output + of ``helm show chart``. As of Helm 4.2.1 these are printed to stdout instead + of stderr (https://github.com/helm/helm/pull/32056), which made installing + a chart from an OCI registry fail with a YAML scanner error when the chart + version contained a ``+`` (https://github.com/ansible-collections/kubernetes.core/pull/1223). + - helm_repository - normalize both sides of the repository URL comparison, so + that a repository already registered with a trailing slash is recognized as + matching instead of failing with ``Repository already have a repository named + `` (https://github.com/ansible-collections/kubernetes.core/pull/1236). + - helm_template - strip Helm's OCI registry progress messages from the returned + ``stdout``, which is documented to contain only the rendered templates (https://github.com/ansible-collections/kubernetes.core/pull/1223). + - k8s lookup - ignore ``ENABLE_TURBO_MODE`` on ansible-core 2.19.0 and later, + where the ``cloud.common`` collection is not supported. Fall back to the standard + ``LookupBase`` instead of failing with a traceback (https://github.com/ansible-collections/kubernetes.core/pull/1253). + - k8s_cp - Fix silent truncation when copying to a pod. The module closed the + exec connection immediately after writing the last chunk of the tar archive, + which killed the remote ``tar`` before it had finished extracting, and never + checked the process exit status, so a partial copy was reported as a success. + The archive is now bounded with ``head -c`` so ``tar`` gets a clean EOF and + exits on its own, and the module waits for that exit and fails on a non-zero + status (https://github.com/ansible-collections/kubernetes.core/pull/1217). + - k8s_info - Handle empty template output gracefully by returning ``changed=false`` + instead of failing when Jinja2 template renders to an empty string (https://github.com/ansible-collections/kubernetes.core/issues/1042). + deprecated_features: + - Ansible Turbo mode (``ENABLE_TURBO_MODE``) has been deprecated and will be + removed in release 8.0.0, as it depends on the ``cloud.common`` collection, + which is being retired (https://github.com/ansible-collections/kubernetes.core/pull/1242). + - helm - the ``status.values`` return value has been deprecated and will be + removed in version 8.0.0. Use ``status.release_values`` instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). + - helm - the ``wait_timeout`` parameter has been deprecated and will be removed + in version 7.0.0. Use ``timeout`` instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). + - helm_info - the ``status.values`` return value has been deprecated and will + be removed in version 8.0.0. Use ``status.release_values`` instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). + - k8s_exec - the ``return_code`` return value has been deprecated and will be + removed in version 7.0.0. Use ``rc`` instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). + - k8s_service - the ``merge_type=json`` option has been deprecated and will + be removed in version 7.0.0. Use ``kubernetes.core.k8s_json_patch`` module + instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). + minor_changes: + - Remove the remaining ``ansible.module_utils.six`` import to avoid deprecation + warnings, replacing it with the Python standard library equivalent (https://github.com/ansible-collections/kubernetes.core/pull/1197). + - helm - Add ``wait_for_jobs`` option to wait for all Jobs to complete before + marking a Helm release as successful. Requires Helm >= 3.5.0 (https://github.com/ansible-collections/kubernetes.core/pull/1140). + - helm - add the ``cleanup_on_fail`` option, mapping to the ``--cleanup-on-fail`` + flag, to allow deletion of new resources created during a failed upgrade. + It complements ``atomic`` and can be combined with it, but cannot be used + with ``replace``, since that deploys through ``helm install`` which does not + accept the flag (https://github.com/ansible-collections/kubernetes.core/pull/1206). + - helm - warn when ``reuse_values`` or ``reset_then_reuse_values`` is requested + in a combination helm ignores, which happens by default because ``reset_values`` + defaults to ``true``, and whenever either is combined with ``replace``. The + option descriptions and the examples now state that ``reset_values`` has to + be set to ``false`` for either option to take effect (https://github.com/ansible-collections/kubernetes.core/pull/1230). + - k8s lookup - warn when ``ENABLE_TURBO_MODE`` is set but the ``cloud.common`` + collection is not installed, instead of silently falling back to the standard + lookup base (https://github.com/ansible-collections/kubernetes.core/pull/1242). + - k8s_cp - Add the ``copy_timeout`` option (default 300 seconds) bounding how + long the module will spend streaming an archive to a pod and waiting for the + remote ``tar`` to finish, so that a stalled copy fails instead of hanging + indefinitely (https://github.com/ansible-collections/kubernetes.core/pull/1217). + - k8s_cp - Stream the tar archive to the pod chunk by chunk instead of building + the whole archive in memory first, which cuts peak memory use when copying + large files (https://github.com/ansible-collections/kubernetes.core/pull/1217). + - k8s_cp - When copying to a pod, the module now also uses ``/bin/sh`` and ``head`` + in the container, when present, to confirm the copy completed. Containers + without them keep the previous behaviour and get a warning that completion + could not be verified (https://github.com/ansible-collections/kubernetes.core/pull/1217). + - k8s_info - Support for metadata-only fetches in k8s_info module (https://github.com/ansible-collections/kubernetes.core/pull/1030) + - meta - Add ``helm_plugin`` and ``helm_plugin_info`` to the ``helm`` action + group, and ``k8s_taint`` to the ``k8s`` action group, so that ``module_defaults`` + set on those groups applies to them (https://github.com/ansible-collections/kubernetes.core/pull/1216). + - use `collections.abc` instead of deprecated `ansible.module_utils.common._collections_compat` + (https://github.com/ansible-collections/kubernetes.core/pull/1057). + - waiter - Add ``job_complete`` predicate to support waiting for Job resources + to reach ``Complete`` or ``Failed`` condition (https://github.com/ansible-collections/kubernetes.core/issues/1201). + fragments: + - 1253-k8s-lookup-turbo-version-check.yml + - 20250108-fix-empty-template-output.yaml + - 20251027-metadata-only-fetches.yaml + - 20260109-fix-deprecated-calls.yaml + - 20260723-remove-module-utils-six.yaml + - 20260805-add-job-wait-condition.yaml + - 20260807-helm-cleanup-on-fail.yaml + - 20260807-helm-wait-for-jobs.yaml + - 20260812-action-groups.yaml + - 20260813-k8s-cp-truncation.yaml + - 20260817-helm-oci-registry-progress-on-stdout.yml + - 20260826-helm-value-reuse-options.yaml + - 20260908-helm-repository-trailing-slash.yaml + - 20260911-deprecate-status-values.yaml + - 20260911-update-deprecation-notices.yaml + - deprecate-enable-turbo-mode.yml + - fix-ansible-lint-warnings.yaml + release_date: '2026-09-16' diff --git a/changelogs/fragments/1253-k8s-lookup-turbo-version-check.yml b/changelogs/fragments/1253-k8s-lookup-turbo-version-check.yml deleted file mode 100644 index 1bea8754..00000000 --- a/changelogs/fragments/1253-k8s-lookup-turbo-version-check.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -bugfixes: - - k8s lookup - ignore ``ENABLE_TURBO_MODE`` on ansible-core 2.19.0 and later, where the ``cloud.common`` collection is not supported. - Fall back to the standard ``LookupBase`` instead of failing with a traceback - (https://github.com/ansible-collections/kubernetes.core/pull/1253). diff --git a/changelogs/fragments/20250108-fix-empty-template-output.yaml b/changelogs/fragments/20250108-fix-empty-template-output.yaml deleted file mode 100644 index 5582ad47..00000000 --- a/changelogs/fragments/20250108-fix-empty-template-output.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- k8s_info - Handle empty template output gracefully by returning ``changed=false`` instead of failing when Jinja2 template renders to an empty string (https://github.com/ansible-collections/kubernetes.core/issues/1042). diff --git a/changelogs/fragments/20251027-metadata-only-fetches.yaml b/changelogs/fragments/20251027-metadata-only-fetches.yaml deleted file mode 100644 index 4fac2cfd..00000000 --- a/changelogs/fragments/20251027-metadata-only-fetches.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - k8s_info - Support for metadata-only fetches in k8s_info module (https://github.com/ansible-collections/kubernetes.core/pull/1030) diff --git a/changelogs/fragments/20260109-fix-deprecated-calls.yaml b/changelogs/fragments/20260109-fix-deprecated-calls.yaml deleted file mode 100644 index 60e3e65d..00000000 --- a/changelogs/fragments/20260109-fix-deprecated-calls.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -minor_changes: - - use `collections.abc` instead of deprecated `ansible.module_utils.common._collections_compat` (https://github.com/ansible-collections/kubernetes.core/pull/1057). diff --git a/changelogs/fragments/20260723-remove-module-utils-six.yaml b/changelogs/fragments/20260723-remove-module-utils-six.yaml deleted file mode 100644 index bdbe2187..00000000 --- a/changelogs/fragments/20260723-remove-module-utils-six.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -minor_changes: - - Remove the remaining ``ansible.module_utils.six`` import to avoid deprecation - warnings, replacing it with the Python standard library equivalent (https://github.com/ansible-collections/kubernetes.core/pull/1197). diff --git a/changelogs/fragments/20260805-add-job-wait-condition.yaml b/changelogs/fragments/20260805-add-job-wait-condition.yaml deleted file mode 100644 index cf15b7da..00000000 --- a/changelogs/fragments/20260805-add-job-wait-condition.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -minor_changes: - - "waiter - Add ``job_complete`` predicate to support waiting for Job resources - to reach ``Complete`` or ``Failed`` condition (https://github.com/ansible-collections/kubernetes.core/issues/1201)." diff --git a/changelogs/fragments/20260807-helm-cleanup-on-fail.yaml b/changelogs/fragments/20260807-helm-cleanup-on-fail.yaml deleted file mode 100644 index 1876aa3d..00000000 --- a/changelogs/fragments/20260807-helm-cleanup-on-fail.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -minor_changes: - - helm - add the ``cleanup_on_fail`` option, mapping to the ``--cleanup-on-fail`` flag, to allow deletion of new resources created during a failed upgrade. It complements ``atomic`` and can be combined with it, but cannot be used with ``replace``, since that deploys through ``helm install`` which does not accept the flag (https://github.com/ansible-collections/kubernetes.core/pull/1206). diff --git a/changelogs/fragments/20260807-helm-wait-for-jobs.yaml b/changelogs/fragments/20260807-helm-wait-for-jobs.yaml deleted file mode 100644 index 920031da..00000000 --- a/changelogs/fragments/20260807-helm-wait-for-jobs.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -minor_changes: - - "helm - Add ``wait_for_jobs`` option to wait for all Jobs to complete before - marking a Helm release as successful. Requires Helm >= 3.5.0 - (https://github.com/ansible-collections/kubernetes.core/pull/1140)." diff --git a/changelogs/fragments/20260812-action-groups.yaml b/changelogs/fragments/20260812-action-groups.yaml deleted file mode 100644 index bba10ffe..00000000 --- a/changelogs/fragments/20260812-action-groups.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -minor_changes: - - meta - Add ``helm_plugin`` and ``helm_plugin_info`` to the ``helm`` action group, and ``k8s_taint`` to the ``k8s`` action group, so that ``module_defaults`` set on those groups applies to them (https://github.com/ansible-collections/kubernetes.core/pull/1216). diff --git a/changelogs/fragments/20260813-k8s-cp-truncation.yaml b/changelogs/fragments/20260813-k8s-cp-truncation.yaml deleted file mode 100644 index bfb5955e..00000000 --- a/changelogs/fragments/20260813-k8s-cp-truncation.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -bugfixes: - - k8s_cp - Fix silent truncation when copying to a pod. The module closed the exec connection immediately after writing the last chunk of the tar archive, which killed the remote ``tar`` before it had finished extracting, and never checked the process exit status, so a partial copy was reported as a success. The archive is now bounded with ``head -c`` so ``tar`` gets a clean EOF and exits on its own, and the module waits for that exit and fails on a non-zero status (https://github.com/ansible-collections/kubernetes.core/pull/1217). - -minor_changes: - - k8s_cp - Add the ``copy_timeout`` option (default 300 seconds) bounding how long the module will spend streaming an archive to a pod and waiting for the remote ``tar`` to finish, so that a stalled copy fails instead of hanging indefinitely (https://github.com/ansible-collections/kubernetes.core/pull/1217). - - k8s_cp - Stream the tar archive to the pod chunk by chunk instead of building the whole archive in memory first, which cuts peak memory use when copying large files (https://github.com/ansible-collections/kubernetes.core/pull/1217). - - k8s_cp - When copying to a pod, the module now also uses ``/bin/sh`` and ``head`` in the container, when present, to confirm the copy completed. Containers without them keep the previous behaviour and get a warning that completion could not be verified (https://github.com/ansible-collections/kubernetes.core/pull/1217). diff --git a/changelogs/fragments/20260817-helm-oci-registry-progress-on-stdout.yml b/changelogs/fragments/20260817-helm-oci-registry-progress-on-stdout.yml deleted file mode 100644 index 71ab839d..00000000 --- a/changelogs/fragments/20260817-helm-oci-registry-progress-on-stdout.yml +++ /dev/null @@ -1,3 +0,0 @@ -bugfixes: - - helm - skip Helm's OCI registry progress messages when parsing the output of ``helm show chart``. As of Helm 4.2.1 these are printed to stdout instead of stderr (https://github.com/helm/helm/pull/32056), which made installing a chart from an OCI registry fail with a YAML scanner error when the chart version contained a ``+`` (https://github.com/ansible-collections/kubernetes.core/pull/1223). - - helm_template - strip Helm's OCI registry progress messages from the returned ``stdout``, which is documented to contain only the rendered templates (https://github.com/ansible-collections/kubernetes.core/pull/1223). diff --git a/changelogs/fragments/20260826-helm-value-reuse-options.yaml b/changelogs/fragments/20260826-helm-value-reuse-options.yaml deleted file mode 100644 index b84a1b20..00000000 --- a/changelogs/fragments/20260826-helm-value-reuse-options.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -bugfixes: - - helm - fix the ``reuse_values`` example, which set only ``reuse_values=true``. ``reset_values`` defaults to ``true`` and helm ignores ``--reuse-values`` whenever ``--reset-values`` is passed, so following the example reset the release values instead of reusing them (https://github.com/ansible-collections/kubernetes.core/pull/1230). - - helm - do not pass the upgrade-only ``--reuse-values`` and ``--reset-then-reuse-values`` flags to ``helm install``, which rejected them with ``unknown flag`` whenever ``reuse_values`` or ``reset_then_reuse_values`` was combined with ``replace`` (https://github.com/ansible-collections/kubernetes.core/pull/1230). -minor_changes: - - helm - warn when ``reuse_values`` or ``reset_then_reuse_values`` is requested in a combination helm ignores, which happens by default because ``reset_values`` defaults to ``true``, and whenever either is combined with ``replace``. The option descriptions and the examples now state that ``reset_values`` has to be set to ``false`` for either option to take effect (https://github.com/ansible-collections/kubernetes.core/pull/1230). diff --git a/changelogs/fragments/20260908-helm-repository-trailing-slash.yaml b/changelogs/fragments/20260908-helm-repository-trailing-slash.yaml deleted file mode 100644 index 732b9cc6..00000000 --- a/changelogs/fragments/20260908-helm-repository-trailing-slash.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: - - helm_repository - normalize both sides of the repository URL comparison, so that a repository already registered with a trailing slash is recognized as matching instead of failing with ``Repository already have a repository named `` (https://github.com/ansible-collections/kubernetes.core/pull/1236). diff --git a/changelogs/fragments/20260911-deprecate-status-values.yaml b/changelogs/fragments/20260911-deprecate-status-values.yaml deleted file mode 100644 index 430ee711..00000000 --- a/changelogs/fragments/20260911-deprecate-status-values.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -deprecated_features: - - helm - the ``status.values`` return value has been deprecated and will be removed in version 8.0.0. - Use ``status.release_values`` instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). - - helm_info - the ``status.values`` return value has been deprecated and will be removed in version 8.0.0. - Use ``status.release_values`` instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). diff --git a/changelogs/fragments/20260911-update-deprecation-notices.yaml b/changelogs/fragments/20260911-update-deprecation-notices.yaml deleted file mode 100644 index 96c86c77..00000000 --- a/changelogs/fragments/20260911-update-deprecation-notices.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -deprecated_features: - - helm - the ``wait_timeout`` parameter has been deprecated and will be removed in version 7.0.0. - Use ``timeout`` instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). - - k8s_exec - the ``return_code`` return value has been deprecated and will be removed in version 7.0.0. - Use ``rc`` instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). - - k8s_service - the ``merge_type=json`` option has been deprecated and will be removed in version 7.0.0. - Use ``kubernetes.core.k8s_json_patch`` module instead (https://github.com/ansible-collections/kubernetes.core/issues/1239). diff --git a/changelogs/fragments/deprecate-enable-turbo-mode.yml b/changelogs/fragments/deprecate-enable-turbo-mode.yml deleted file mode 100644 index d25854cc..00000000 --- a/changelogs/fragments/deprecate-enable-turbo-mode.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -deprecated_features: - - Ansible Turbo mode (``ENABLE_TURBO_MODE``) has been deprecated and will be removed in release 8.0.0, as it depends on the ``cloud.common`` collection, which is being retired (https://github.com/ansible-collections/kubernetes.core/pull/1242). -bugfixes: - - Ansible Turbo mode - ignore ``ENABLE_TURBO_MODE`` on ansible-core 2.19.0 and later, where the ``cloud.common`` collection is not supported, and fall back to the standard ``AnsibleModule`` instead of failing with ``byte indices must be integers or slices, not str`` (https://github.com/ansible-collections/kubernetes.core/pull/1242). -minor_changes: - - k8s lookup - warn when ``ENABLE_TURBO_MODE`` is set but the ``cloud.common`` collection is not installed, instead of silently falling back to the standard lookup base (https://github.com/ansible-collections/kubernetes.core/pull/1242). diff --git a/changelogs/fragments/fix-ansible-lint-warnings.yaml b/changelogs/fragments/fix-ansible-lint-warnings.yaml deleted file mode 100644 index 19a0f0e3..00000000 --- a/changelogs/fragments/fix-ansible-lint-warnings.yaml +++ /dev/null @@ -1,3 +0,0 @@ -trivial: - - "kubectl connection plugin - added ``changed_when: false`` to example ``ansible.builtin.command`` tasks to resolve ansible-lint ``no-changed-when`` warnings." - - "ee - added ``version: 3`` to ``meta/execution-environment.yml`` to resolve ansible-lint ``schema[execution-environment]`` warning." diff --git a/docs/kubernetes.core.helm_info_module.rst b/docs/kubernetes.core.helm_info_module.rst index 967ea88c..29bc9bba 100644 --- a/docs/kubernetes.core.helm_info_module.rst +++ b/docs/kubernetes.core.helm_info_module.rst @@ -488,7 +488,7 @@ Common return values are documented `here always
Dict of Values used to deploy
-
This return value has been deprecated and will be removed in a release after 2027-01-08. Use RV(status.release_values) instead.
+
This return value has been deprecated and will be removed in version 8.0.0. Use RV(status.release_values) instead.

diff --git a/docs/kubernetes.core.helm_module.rst b/docs/kubernetes.core.helm_module.rst index f5a4838e..c74670e7 100644 --- a/docs/kubernetes.core.helm_module.rst +++ b/docs/kubernetes.core.helm_module.rst @@ -545,7 +545,9 @@ Parameters
When upgrading package, reset the values to the ones built into the chart, apply the last release's values and merge in any overrides from parameters O(release_values), O(values_files) or O(set_values).
-
If O(reset_values) or O(reuse_values) is set to V(True), this is ignored.
+
Helm ignores this when --reset-values or --reuse-values is passed. Since O(reset_values) defaults to V(true), it has to be set to V(false), and O(reuse_values) left unset or V(false), for this option to take any effect.
+
helm install does not accept --reset-then-reuse-values, so this option is ignored when O(replace) is set.
+
The module warns whenever one of those combinations makes this option a no-op.
This feature requires helm diff >= 3.9.12.
@@ -567,6 +569,7 @@ Parameters
When upgrading package, reset the values to the ones built into the chart.
+
Defaults to V(true), which makes helm ignore O(reuse_values) and O(reset_then_reuse_values). Set it to V(false) to use either of them.
@@ -586,8 +589,10 @@ Parameters -
When upgrading package, specifies wether to reuse the last release's values and merge in any overrides from parameters release_values, values_files or set_values.
-
If reset_values is set to True, this is ignored.
+
When upgrading package, specifies whether to reuse the last release's values and merge in any overrides from parameters O(release_values), O(values_files) or O(set_values).
+
Helm ignores this when --reset-values is passed. Since O(reset_values) defaults to V(true), it has to be set to V(false) for this option to take any effect.
+
helm install does not accept --reuse-values, so this option is ignored when O(replace) is set.
+
The module warns whenever one of those combinations makes this option a no-op.
@@ -834,6 +839,28 @@ Parameters
When release_state is set to absent, will wait until all the resources are deleted before returning. It will wait for as long as wait_timeout. This feature requires helm>=3.7.0. Added in version 2.3.0.
+ + +
+ wait_for_jobs + +
+ boolean +
+
added in 6.6.0
+ + +
    Choices: +
  • no ←
  • +
  • yes
  • +
+ + +
When release_state is set to present, and wait is set to True, wait until all jobs are in a completed state before marking the release as successful.
+
Ignored when used without O(wait).
+
Requires Helm >= 3.5.0
+ +
@@ -847,7 +874,7 @@ Parameters
Timeout when wait option is enabled (helm2 is a number of seconds, helm3 is a duration).
-
The use of wait_timeout to wait for kubernetes commands to complete has been deprecated and will be removed after 2022-12-01.
+
The use of wait_timeout to wait for kubernetes commands to complete has been deprecated and will be removed in version 7.0.0. Use O(timeout) instead.
@@ -958,6 +985,7 @@ Examples release_namespace: default force: True wait: True + wait_for_jobs: True replace: True update_repo_cache: True disable_hook: True @@ -977,16 +1005,31 @@ Examples enabled: True # Deploy latest version + # 'reset_values' defaults to true and helm ignores '--reuse-values' when it is set, + # so it has to be turned off explicitly. - name: Deploy latest version of Grafana chart using reuse_values kubernetes.core.helm: name: test chart_ref: stable/grafana release_namespace: monitoring reuse_values: true + reset_values: false values: replicas: 2 version: 3e8ec0b2dffa40fb97d5342e4af887de95faa8c61a62480dd7f8aa03dffcf533 + # Same for 'reset_then_reuse_values', which helm ignores when either + # '--reset-values' or '--reuse-values' is set. + - name: Deploy latest version of Grafana chart using reset_then_reuse_values + kubernetes.core.helm: + name: test + chart_ref: stable/grafana + release_namespace: monitoring + reset_then_reuse_values: true + reset_values: false + values: + replicas: 2 + Return Values @@ -1175,7 +1218,7 @@ Common return values are documented `here always
Dict of Values used to deploy.
-
This return value has been deprecated and will be removed in a release after 2027-01-08. Use RV(status.release_values) instead.
+
This return value has been deprecated and will be removed in version 8.0.0. Use RV(status.release_values) instead.

diff --git a/docs/kubernetes.core.k8s_cp_module.rst b/docs/kubernetes.core.k8s_cp_module.rst index 3ca9cf9e..d71ea898 100644 --- a/docs/kubernetes.core.k8s_cp_module.rst +++ b/docs/kubernetes.core.k8s_cp_module.rst @@ -152,6 +152,25 @@ Parameters
The name of a context found in the config file. Can also be specified via K8S_AUTH_CONTEXT environment variable.
+ + +
+ copy_timeout + +
+ integer +
+
added in 6.6.0
+ + + Default:
300
+ + +
Maximum time in seconds to spend streaming the archive to the pod and waiting for the remote tar process to finish extracting it.
+
Raise this when copying large files over a slow connection.
+
This option is ignored when state is set to from_pod.
+ +
@@ -512,6 +531,7 @@ Notes .. note:: - the tar binary is required on the container when copying from local filesystem to pod. + - a POSIX shell at ``/bin/sh`` and ``head`` are also used, when present, to bound the archive sent to the container so that the module can confirm the copy finished. Without them the copy still runs but completion cannot be verified, and a warning is emitted. - the (init) container has to be started before you copy files or directories to it. - 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. diff --git a/docs/kubernetes.core.k8s_exec_module.rst b/docs/kubernetes.core.k8s_exec_module.rst index a46c7f14..883801ce 100644 --- a/docs/kubernetes.core.k8s_exec_module.rst +++ b/docs/kubernetes.core.k8s_exec_module.rst @@ -535,7 +535,7 @@ Common return values are documented `here -
The command status code. This attribute is deprecated and will be removed in a future release. Please use rc instead.
+
The command status code. This attribute is deprecated and will be removed in version 7.0.0. Use RV(result.rc) instead.

diff --git a/docs/kubernetes.core.k8s_info_module.rst b/docs/kubernetes.core.k8s_info_module.rst index c0c2c436..405ef0dc 100644 --- a/docs/kubernetes.core.k8s_info_module.rst +++ b/docs/kubernetes.core.k8s_info_module.rst @@ -280,6 +280,29 @@ Parameters
List of label selectors to use to filter results
+ + +
+ metadata_only + +
+ boolean +
+
added in 6.6.0
+ + +
    Choices: +
  • no ←
  • +
  • yes
  • +
+ + +
Request metadata only response from the Kubernetes API server.
+
This feature is useful for clients that only need to check for the existence of an object,
+
or that only need to read its metadata.
+
It can significantly reduce the size of the response from the API server.
+ +
@@ -716,6 +739,12 @@ Examples retries: 60 delay: 15 + - name: Get a list of all pods metadata only + kubernetes.core.k8s_info: + kind: Pod + metadata_only: true + register: pod_metadata_list + Return Values diff --git a/docs/kubernetes.core.k8s_service_module.rst b/docs/kubernetes.core.k8s_service_module.rst index de0b4336..26219fe8 100644 --- a/docs/kubernetes.core.k8s_service_module.rst +++ b/docs/kubernetes.core.k8s_service_module.rst @@ -247,6 +247,7 @@ Parameters
If more than one merge_type is given, the merge_types will be tried in order
This defaults to ['strategic-merge', 'merge'], which is ideal for using the same parameters on resource kinds that combine Custom Resources and built-in resources.
+
merge_type=json has been deprecated and will be removed in version 7.0.0. Use kubernetes.core.k8s_json_patch instead.
diff --git a/docs/kubernetes.core.kubectl_connection.rst b/docs/kubernetes.core.kubectl_connection.rst index 97e60f9c..76bd87d1 100644 --- a/docs/kubernetes.core.kubectl_connection.rst +++ b/docs/kubernetes.core.kubectl_connection.rst @@ -383,6 +383,7 @@ Examples # and requires python to be installed in the image - name: Run a command in a pod ansible.builtin.command: echo "Hello, World!" + changed_when: false - name: Run a command in a pod using local kubectl with inventory variables # Example inventory: @@ -407,6 +408,7 @@ Examples # and requires python to be installed in the image - name: Run a command in a pod ansible.builtin.command: echo "Hello, World!" + changed_when: false - name: Run a command in a pod using dynamic inventory hosts: localhost @@ -440,6 +442,7 @@ Examples # be aware that the command is executed as the user that started the container # and requires python to be installed in the image ansible.builtin.command: echo "Hello, World!" + changed_when: false delegate_to: "{{ my_app_pod_name }}"