From 42acb4f52b73cef5f309a0f1989c96ed239753de Mon Sep 17 00:00:00 2001 From: Thisora <43539043+Thisora@users.noreply.github.com> Date: Thu, 19 Feb 2026 14:59:23 +0100 Subject: [PATCH] Support take_ownership parameter in helm installation (#1034) * Support take_ownership parameter in helm installation SUMMARY Adds support for the take_ownership for initial release installation operations. ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/modules/helm.py * Update changelogs/fragments/20251224-take-ownership-helm-initialization.yaml Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> --------- Co-authored-by: Mathis Raemy Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> --- .../fragments/20251224-take-ownership-helm-initialization.yaml | 2 ++ plugins/modules/helm.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/20251224-take-ownership-helm-initialization.yaml diff --git a/changelogs/fragments/20251224-take-ownership-helm-initialization.yaml b/changelogs/fragments/20251224-take-ownership-helm-initialization.yaml new file mode 100644 index 00000000..df290668 --- /dev/null +++ b/changelogs/fragments/20251224-take-ownership-helm-initialization.yaml @@ -0,0 +1,2 @@ +bugfixes: + - Helm - Allow taking ownership of existing Kubernetes resources on the first installation of a Helm release. Previously, the ``take_ownership`` parameter was always disabled during the initial install, preventing resource adoption (https://github.com/ansible-collections/kubernetes.core/pull/1034). diff --git a/plugins/modules/helm.py b/plugins/modules/helm.py index c81bc6a8..e3e02559 100644 --- a/plugins/modules/helm.py +++ b/plugins/modules/helm.py @@ -246,7 +246,7 @@ options: version_added: 6.1.0 take_ownership: description: - - When upgrading, Helm will ignore the check for helm annotations and take ownership of the existing resources + - Helm will ignore the check for helm annotations and take ownership of the existing resources - This feature requires helm >= 3.17.0 type: bool default: False @@ -1092,6 +1092,7 @@ def main(): reset_then_reuse_values=reset_then_reuse_values, insecure_skip_tls_verify=insecure_skip_tls_verify, plain_http=plain_http, + take_ownership=take_ownership, skip_schema_validation=skip_schema_validation, ) changed = True