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

Apply updates from operator-sdk helm-operator #63

Open
6 of 10 tasks
joelanford opened this issue Nov 12, 2020 · 12 comments
Open
6 of 10 tasks

Apply updates from operator-sdk helm-operator #63

joelanford opened this issue Nov 12, 2020 · 12 comments
Assignees

Comments

@joelanford
Copy link
Member

joelanford commented Nov 12, 2020

@anmol372
Copy link
Contributor

anmol372 commented Dec 16, 2020

PR for Build info metric: 67
PR to add correct help text: kb-1830
PR for Plugin docker invocation: 68

@mikeshng
Copy link

FYI There is also this operator-framework/operator-sdk#4288 that was merged

@mikeshng
Copy link

If possible, could you please also consider operator-framework/operator-sdk#4297
Due to the unintended uninstall rollback, some of our customers were hit with unintended data loss.

@joelanford
Copy link
Member Author

Thanks @mikeshng if there are any other Helm-related PRs that you're aware of, please post them.

We're fairly confident that this repo has everything up to SDK v1.0.0.

Our goal is to eventually replace the SDK helm-operator implementation with this one, and we want to make sure all the bug fixes and added features from the SDK repo make it here.

@mikeshng
Copy link

Thanks @joelanford for all your help. Two PRs that I am less confident about and I am looking for your team's expert opinions on:

@joelanford
Copy link
Member Author

For operator-framework/operator-sdk#4288, is this just a defensive check, or is there actually a code path that results in a nil error and a nil UninstallReleaseResponse or nil Release? I'm not seeing a way for the existing Helm libraries to return both a nil Release and a nil error.

@joelanford
Copy link
Member Author

I don't think operator-framework/operator-sdk#4358 is applicable here. In this repo, there is nothing that deletes releases from the storage backend outside of running through an uninstall. manager.Sync has been mostly replaced by getReleaseState.

When a non-deployed release exists, it looks like this repo will attempt an upgrade rather than pre-deleting it and then attempting a clean install. If the last release is one of Deployed, Failed, or Superseded, then the upgrade will proceed. That seems reasonable in the context of the Helm operator too I think. I'll submit a PR here to make sure we attempt the upgrade in this scenario.

@mikeshng
Copy link

For operator-framework/operator-sdk#4288, is this just a defensive check, or is there actually a code path that results in a nil error and a nil UninstallReleaseResponse or nil Release? I'm not seeing a way for the existing Helm libraries to return both a nil Release and a nil error.

As I remember, I ran into a nil pointer in the old code. It was only doing:

uninstallResponse, err := uninstall.Run(m.releaseName)
return uninstallResponse.Release, err

So the primary goal of the fix was to avoid this nilpointer when uninstallResponse is nil.

As for the change if log.V(0).Enabled() && uninstalledRelease != nil { Yes, I think that's a defensive check that Eric suggested.

@joelanford
Copy link
Member Author

Re: operator-framework/operator-sdk#4288 - It looks like this is also not applicable in this repo since the client returns the uninstall response and then the caller correctly checks for errors before assuming the embedded release field is valid.

@mikeshng
Copy link

@joelanford if you have some cycles, could you please see my idea here and post a feedback message: https://lists.cncf.io/g/cncf-helm/message/351
I am trying to enhance the helm uninstall so the helm operator can leverage the new functionality and perform a more reliable resource cleanup upon CR delete. Thanks.

@jmrodri
Copy link
Member

jmrodri commented Nov 30, 2021

@varshaprasad96 please review to see where we are with this, close when done.

@varshaprasad96
Copy link
Member

varshaprasad96 commented Dec 6, 2021

Went through the updates with respect to helm-operator in operator-sdk after SDK 1.0 release till v1.15.0. These are the following updates:

PS: These are updates made to the library, the plugin was updated recently and is already upto date.

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

No branches or pull requests

5 participants