Skip to content

Conversation

@Thisora
Copy link

@Thisora Thisora commented Oct 22, 2025

SUMMARY

Adds support for the take_ownership for initial release installation operations.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/modules/helm.py

ADDITIONAL INFORMATION

I recently had to migrate a namespace k8s from flat manifest installation into helm a release.
I was so glad to see the take_ownership feature but realized that it work only after first installation of the release.
Seeing no reason to denied this use case i suggest this very simple changes.

To reproduce it:

  1. Create a new namespace in any cluster.
  2. Create a secret
  3. Install any helm chart that deploy the same secret using take_ownership: true.

SUMMARY
Adds support for the take_ownership for initial release installation operations.

ISSUE TYPE
Feature Pull Request

COMPONENT NAME
plugins/modules/helm.py
@gialloguitar
Copy link

I require the same behavior, need to migrate objects under Helm release with first install.
I have found problem here, this function invocation doesnt involve take_ownership arg:
https://github.com/ansible-collections/kubernetes.core/blob/main/plugins/modules/helm.py#L1056

Just put parameter here and all will be fine

        if release_status is None:  # Not installed
            helm_cmd = deploy(
                module,
                helm_cmd,
                release_name,
                ...
                take_ownership=take_ownership,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants