Skip to content

Conversation

@alexeysofin
Copy link

Adds TakeOwnership flag to helm install/upgrade

Fixes #345

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 30, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: alexeysofin
Once this PR has been reviewed and has the lgtm label, please assign mboersma for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from Jont828 and mboersma July 30, 2025 13:12
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 30, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @alexeysofin. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 30, 2025
@alexeysofin alexeysofin changed the title Add TakeOwnership optional flag to helm options ✨ 🌱 Add TakeOwnership optional flag to helm options Jul 30, 2025
@alexeysofin alexeysofin changed the title ✨ 🌱 Add TakeOwnership optional flag to helm options ✨ Add TakeOwnership optional flag to helm options Jul 30, 2025
@alexeysofin alexeysofin changed the title ✨ Add TakeOwnership optional flag to helm options ✨ 🌱 Add TakeOwnership optional flag to helm options Jul 30, 2025
@dmvolod
Copy link
Member

dmvolod commented Aug 1, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 1, 2025
@mboersma
Copy link
Contributor

This looks good, thank you! Could you add a test that exercises this option, maybe in controllers/helmchartproxy/helmchartproxy_controller_phases_test.go?


// TakeOwnership represents CLI --take-ownership flag passed to Helm upgrade or install operation. If set, install will ignore the check for helm annotations and take ownership of the existing resources
// +optional
TakeOwnership bool `json:"takeOwnership,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to this flag should be tested with e2e tests, as it's related to helm behavior.

The test may look like this: before starting the test, in the namespace where the chart will be installed, you need to create one or more objects from this chart (but without helm specific labels and annotations). Then install the HelmChartProxy and check that it is successfully installed and now helm chart owns these objects.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, will do that soon, alright

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for --take-ownership

4 participants