Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow migrate from HelmChart v1beta1 to v1beta2 if Helm --take-ownership is set #5046

Merged
merged 14 commits into from
Jan 22, 2025

Conversation

nvanthao
Copy link
Member

@nvanthao nvanthao commented Dec 12, 2024

What this PR does / why we need it:

We currently don't allow migration from existing Helm installation of v1beta1 with useHelmInstall: false to Helm v1beta2.

As Helm CLI will soon support --take-ownership flag, this will be possible.

This PR allows the application pull for Helm chart with same name in v1beta2, as long as there is --take-ownership flag in Helm additional upgrade flags.

Demo: https://www.loom.com/share/db17e620509843d884fbcf98605daaed?t=281

If no --take-ownership flag, pull will fail during update checks

image

Which issue(s) this PR fixes:

Story: sc-117029

Does this PR require a test?

NONE

Does this PR require a release note?

NONE

We will need a release note later when upstream Helm CLI supports --take-ownership flag.

Does this PR require documentation?

Current docs will have to be updated after the change is merged and upstream Helm CLI supports --take-ownership flag

@nvanthao nvanthao added the type::feature New feature or request label Dec 12, 2024
@xavpaice
Copy link
Member

This needs to be merged alongside updating Helm to either use the version with --take-ownership merged and released, or our fork of it that does.

@nvanthao
Copy link
Member Author

I've updated the PR with fetching from Helm PR that supports --take-ownership and build it.

@nvanthao nvanthao force-pushed the gerard/f-helm-migrate branch 2 times, most recently from edda4b7 to c0daf44 Compare December 19, 2024 02:33
deploy/melange.yaml.tmpl Outdated Show resolved Hide resolved
deploy/melange.yaml.tmpl Outdated Show resolved Hide resolved
deploy/melange.yaml.tmpl Outdated Show resolved Hide resolved
@nvanthao nvanthao force-pushed the gerard/f-helm-migrate branch from c0daf44 to 2ebd087 Compare December 19, 2024 22:25
@nvanthao nvanthao requested a review from sgalsaleh December 20, 2024 05:25
@nvanthao
Copy link
Member Author

Many thanks @sgalsaleh! I have made the requested changes accordingly and notice the Melange and Apko actions completed successfully. Please let me know how it goes.

sgalsaleh
sgalsaleh previously approved these changes Dec 20, 2024
@xavpaice
Copy link
Member

Now that the change is merged in Helm, we can use the 'main' branch rather than the PR branch

@nvanthao
Copy link
Member Author

Helm main branch is for their v4 and the "main" for current change is dev-v3

@nvanthao
Copy link
Member Author

apologies @sgalsaleh could you help me approve the change again? I removed the expected-commit because we are cloning Helm with depth 1 and the commit is gone with newer commits from Helm.

@nvanthao nvanthao requested a review from sgalsaleh December 22, 2024 22:50
@nvanthao nvanthao force-pushed the gerard/f-helm-migrate branch from ce8f18f to bd8fc5b Compare December 29, 2024 22:50
@nvanthao nvanthao force-pushed the gerard/f-helm-migrate branch from b6b04d4 to 6c4bc70 Compare January 6, 2025 03:35
@scottrigby
Copy link

Update: The new --take-ownership flag for install and upgrade commands has landed in Helm! Released yesterday Helm v3.17.0. Congrats to everyone who worked on this 👏🎉

@CLAassistant
Copy link

CLAassistant commented Jan 17, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@xavpaice xavpaice left a comment

Choose a reason for hiding this comment

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

needs update now that Helm got released.

deploy/melange.yaml.tmpl Outdated Show resolved Hide resolved
@nvanthao nvanthao requested a review from xavpaice January 19, 2025 14:21
@nvanthao
Copy link
Member Author

Hi @sgalsaleh @laverya,

I have removed the Helm PR setup due to --take-ownership flag is now in release v3.17.0.

Could you help me with the final approval?

Cheers,

Copy link
Member

@xavpaice xavpaice left a comment

Choose a reason for hiding this comment

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

Thanks for the update. Needs KOTS team to review.

@sgalsaleh
Copy link
Member

Product question: should we add the flag automatically for a more seamless migration?

@adamancini
Copy link
Member

@xavpaice signed CLA

@ajp-io
Copy link
Member

ajp-io commented Jan 21, 2025

Product question: should we add the flag automatically for a more seamless migration?

How would we detect this? And can we deterministically detect it, or could the vendor intend something else. I always like making things easier, but if this migration is being heavily moderated by Replicated (like we're helping vendors make these changes and whatnot), then the steps are pretty clear and the risk of doing it automatically might not be necessary.

So I could go either way depending on whether we think that's really necessary.

@sgalsaleh sgalsaleh merged commit c411894 into main Jan 22, 2025
127 checks passed
@sgalsaleh sgalsaleh deleted the gerard/f-helm-migrate branch January 22, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants