Repository navigation
Conversation
|
Hi @dastrobu. Would you mind looking into the failing tests? |
|
@bacongobbler thanks for looking at the code already. As mentioned in the pr description this pr is still WIP. I just wanted to implement the feature quickly to play around with it and get feedback if we should implement it like that. I am aware of the API change, see my TODO comment in interface.go#L48. However I don't have a good idea to do it non-breaking. Hints would be welcome.
Any better ideas? from: Semantic Versioning
I would appreciate some advice how to do it non breaking without cluttering the code base too much or if we should consider it an acceptable API change. If we would change method signatures from to it would have been easier to add more optional flags. But this is also not possible without a breaking API change. Of course I will look into failing tests and add new tests where appropriate (maybe next week). |
You could try adding |
|
this is looking really close, by the way. Nice work! |
5e3bf42 to
3aa36ba
Compare
|
hey @dastrobu. We discussed during today's dev call that we are looking at a Helm 3.1 RC in the next week or so. Are you going to have the time to work on this in that timeframe? |
|
@bacongobbler I plan to work on this today, so PR should be ready for review on Monday hopefully. Would be great to see this feature in 3.1. |
The problem I see is that |
3aa36ba to
508a864
Compare
508a864 to
fdd7369
Compare
|
Thanks for looking into possible solutions. This is going to take a bit more time to review, so we'll have to reschedule this for 3.2. |
|
We have rebased this PR solving merge conflicts on top of |
|
@knrt10 do you want to create a new PR here? |
|
@invidian thats nice. One question here. The helm maintainer spents already a lot of time to review the code here. Did you do just a rebase of the existing code or does your new pull request already gain some benefits from the existing reviews here? |
I only did a rebase. I don't see any review comments here and I don't really have time to go trough all the 70+ comments here and addressing them. I only published the rebase efforts, so they don't get lost. Perhaps resetting number of comments on the PR will also help to get it merged? Or maybe maintainers would have time to look and push some fixes to it if it's not significant? |
Four of the current Helm core maintainers have reviewed the code and weighed in here.
Part of the review process is to discuss a feature's motivation, explain its technical details, and describe how to test, maintain, and teach this new feature. It is important to read and consider those comments in future work. If you're going to ask maintainers to review your code, please be respectful of other's time and make sure to read prior feedback - core maintainers and community members alike. I'm going to close your PR because a rebase is not going to fix the issues laid out in earlier discussions. |
|
I would recommend to close this pull request, too. This is PR is staled for almost one year. In addition, I would strongly appreciate it that one of the maintainer take this topic and provide a complain solution. This is PR is a dead end. |
|
@dastrobu has expressed continued interest in this matter. For that reason I'm happy to keep it open for further discussion. Should he decide he's no longer interested in pursuing this feature, he can close this PR. |
|
@bacongobbler I see, but there is no open review anymore, I saw that @mattfarina (#7431 (comment)) and you (#7431 (comment)) do a general non in-code review and @dastrobu wrote answers to the review points here. By going through the comments, I would agree. I do not see any opened/unanswered reviews here or I could not see them, too. Maybe I do not understand them. A summary the opened key point would help some motivated people, too. |
|
I am still motivated to work on a feature, solving #7082. As @jkroepke pointed out, code review is not the issue with this PR. There are conceptual concerns (#7431 (comment)), which is why I proposed an alternative approach in #9174. Unfortunately, I did not receive much feedback on this alternative yet, which is why I paused working on this as long as there is no clear path, to get one of the proposals merged. |
|
Are you still interested, @dastrobu, another year later? I think I agree that an annotation seems more "correct" (for some definition of correct). Perhaps the very idea of what should be an annotation and what should be a flag should be decided in a hip. |
|
Closing this as abandoned. |
Add annotation handling of new annotation helm.sh/update-policy with values recreate-on-conflict and recreate-on-invalid values to better deal with the following cases. The server responds with 'invalid' e.g. if a certain resource contains an immutable field, which cannot be patched or updated by a PUT. In theses cases it can be helpful to delete the resource and recreate it. Examples for theses cases are: * roleRef in RoleBinding * spec.clusterIP in Service * parameters in StorageClass If a chart developer has made sure that recreating a resource is safe, the annotation can be added to a resource template. Alternatively a user may add the annotation manually to an existing resource to allow Helm to recreate a certain resource. Adding the new annotation in general by default or changing the default behaviour of Helm is not a good idea, since deletion and recreation of certain resources can lead to an unwanted or undefined state as described in detail in helm#7431 (comment): "[...] selectively deleting/re-creating volume-backed resources (Secrets, Services, ConfigMaps, PVCs) without touching the Deployment. If a Persistent Volume Claim is deleted and re-created, there is a risk that an application (Deployment) consuming that Persistent Volume Claim will not receive the new volume's mount point. The same can be said for Secrets, Configmaps, Services, and other resources which are deployed and relied upon by another resource. Environment variables populated in a Deployment from a Service won't be updated until the Pods are destroyed." Closes helm#7082. Signed-off-by: Daniel Strobusch <[email protected]>
Add annotation handling of new annotation helm.sh/update-policy with values recreate-on-conflict and recreate-on-invalid values to better deal with the following cases. The server responds with 'invalid' e.g. if a certain resource contains an immutable field, which cannot be patched or updated by a PUT. In theses cases it can be helpful to delete the resource and recreate it. Examples for theses cases are: * roleRef in RoleBinding * spec.clusterIP in Service * parameters in StorageClass If a chart developer has made sure that recreating a resource is safe, the annotation can be added to a resource template. Alternatively a user may add the annotation manually to an existing resource to allow Helm to recreate a certain resource. Adding the new annotation in general by default or changing the default behaviour of Helm is not a good idea, since deletion and recreation of certain resources can lead to an unwanted or undefined state as described in detail in helm#7431 (comment): "[...] selectively deleting/re-creating volume-backed resources (Secrets, Services, ConfigMaps, PVCs) without touching the Deployment. If a Persistent Volume Claim is deleted and re-created, there is a risk that an application (Deployment) consuming that Persistent Volume Claim will not receive the new volume's mount point. The same can be said for Secrets, Configmaps, Services, and other resources which are deployed and relied upon by another resource. Environment variables populated in a Deployment from a Service won't be updated until the Pods are destroyed." Closes helm#7082. Signed-off-by: Daniel Strobusch <[email protected]>
Add annotation handling of new annotation helm.sh/update-policy with values recreate-on-conflict and recreate-on-invalid values to better deal with the following cases. The server responds with 'invalid' e.g. if a certain resource contains an immutable field, which cannot be patched or updated by a PUT. In theses cases it can be helpful to delete the resource and recreate it. Examples for theses cases are: * roleRef in RoleBinding * spec.clusterIP in Service * parameters in StorageClass If a chart developer has made sure that recreating a resource is safe, the annotation can be added to a resource template. Alternatively a user may add the annotation manually to an existing resource to allow Helm to recreate a certain resource. Adding the new annotation in general by default or changing the default behaviour of Helm is not a good idea, since deletion and recreation of certain resources can lead to an unwanted or undefined state as described in detail in helm#7431 (comment): "[...] selectively deleting/re-creating volume-backed resources (Secrets, Services, ConfigMaps, PVCs) without touching the Deployment. If a Persistent Volume Claim is deleted and re-created, there is a risk that an application (Deployment) consuming that Persistent Volume Claim will not receive the new volume's mount point. The same can be said for Secrets, Configmaps, Services, and other resources which are deployed and relied upon by another resource. Environment variables populated in a Deployment from a Service won't be updated until the Pods are destroyed." Closes helm#7082. Signed-off-by: Daniel Strobusch <[email protected]>
Add annotation handling of new annotation helm.sh/update-policy with values recreate-on-conflict and recreate-on-invalid values to better deal with the following cases. The server responds with 'invalid' e.g. if a certain resource contains an immutable field, which cannot be patched or updated by a PUT. In theses cases it can be helpful to delete the resource and recreate it. Examples for theses cases are: * roleRef in RoleBinding * spec.clusterIP in Service * parameters in StorageClass If a chart developer has made sure that recreating a resource is safe, the annotation can be added to a resource template. Alternatively a user may add the annotation manually to an existing resource to allow Helm to recreate a certain resource. Adding the new annotation in general by default or changing the default behaviour of Helm is not a good idea, since deletion and recreation of certain resources can lead to an unwanted or undefined state as described in detail in helm#7431 (comment): "[...] selectively deleting/re-creating volume-backed resources (Secrets, Services, ConfigMaps, PVCs) without touching the Deployment. If a Persistent Volume Claim is deleted and re-created, there is a risk that an application (Deployment) consuming that Persistent Volume Claim will not receive the new volume's mount point. The same can be said for Secrets, Configmaps, Services, and other resources which are deployed and relied upon by another resource. Environment variables populated in a Deployment from a Service won't be updated until the Pods are destroyed." Closes helm#7082. Signed-off-by: Daniel Strobusch <[email protected]>
Add annotation handling of new annotation helm.sh/update-policy with values recreate-on-conflict and recreate-on-invalid values to better deal with the following cases. The server responds with 'invalid' e.g. if a certain resource contains an immutable field, which cannot be patched or updated by a PUT. In theses cases it can be helpful to delete the resource and recreate it. Examples for theses cases are: * roleRef in RoleBinding * spec.clusterIP in Service * parameters in StorageClass If a chart developer has made sure that recreating a resource is safe, the annotation can be added to a resource template. Alternatively a user may add the annotation manually to an existing resource to allow Helm to recreate a certain resource. Adding the new annotation in general by default or changing the default behaviour of Helm is not a good idea, since deletion and recreation of certain resources can lead to an unwanted or undefined state as described in detail in helm#7431 (comment): "[...] selectively deleting/re-creating volume-backed resources (Secrets, Services, ConfigMaps, PVCs) without touching the Deployment. If a Persistent Volume Claim is deleted and re-created, there is a risk that an application (Deployment) consuming that Persistent Volume Claim will not receive the new volume's mount point. The same can be said for Secrets, Configmaps, Services, and other resources which are deployed and relied upon by another resource. Environment variables populated in a Deployment from a Service won't be updated until the Pods are destroyed." Closes helm#7082. Signed-off-by: Daniel Strobusch <[email protected]>
Add annotation handling of new annotation helm.sh/update-policy with values recreate-on-conflict and recreate-on-invalid values to better deal with the following cases. The server responds with 'invalid' e.g. if a certain resource contains an immutable field, which cannot be patched or updated by a PUT. In theses cases it can be helpful to delete the resource and recreate it. Examples for theses cases are: * roleRef in RoleBinding * spec.clusterIP in Service * parameters in StorageClass If a chart developer has made sure that recreating a resource is safe, the annotation can be added to a resource template. Alternatively a user may add the annotation manually to an existing resource to allow Helm to recreate a certain resource. Adding the new annotation in general by default or changing the default behaviour of Helm is not a good idea, since deletion and recreation of certain resources can lead to an unwanted or undefined state as described in detail in helm#7431 (comment): "[...] selectively deleting/re-creating volume-backed resources (Secrets, Services, ConfigMaps, PVCs) without touching the Deployment. If a Persistent Volume Claim is deleted and re-created, there is a risk that an application (Deployment) consuming that Persistent Volume Claim will not receive the new volume's mount point. The same can be said for Secrets, Configmaps, Services, and other resources which are deployed and relied upon by another resource. Environment variables populated in a Deployment from a Service won't be updated until the Pods are destroyed." Closes helm#7082. Signed-off-by: Daniel Strobusch <[email protected]>
Add annotation handling of new annotation helm.sh/update-policy with values recreate-on-conflict and recreate-on-invalid values to better deal with the following cases. The server responds with 'invalid' e.g. if a certain resource contains an immutable field, which cannot be patched or updated by a PUT. In theses cases it can be helpful to delete the resource and recreate it. Examples for theses cases are: * roleRef in RoleBinding * spec.clusterIP in Service * parameters in StorageClass If a chart developer has made sure that recreating a resource is safe, the annotation can be added to a resource template. Alternatively a user may add the annotation manually to an existing resource to allow Helm to recreate a certain resource. Adding the new annotation in general by default or changing the default behaviour of Helm is not a good idea, since deletion and recreation of certain resources can lead to an unwanted or undefined state as described in detail in helm#7431 (comment): "[...] selectively deleting/re-creating volume-backed resources (Secrets, Services, ConfigMaps, PVCs) without touching the Deployment. If a Persistent Volume Claim is deleted and re-created, there is a risk that an application (Deployment) consuming that Persistent Volume Claim will not receive the new volume's mount point. The same can be said for Secrets, Configmaps, Services, and other resources which are deployed and relied upon by another resource. Environment variables populated in a Deployment from a Service won't be updated until the Pods are destroyed." Closes helm#7082. Signed-off-by: Daniel Strobusch <[email protected]>
Add annotation handling of new annotation helm.sh/update-policy with values recreate-on-conflict and recreate-on-invalid values to better deal with the following cases. The server responds with 'invalid' e.g. if a certain resource contains an immutable field, which cannot be patched or updated by a PUT. In theses cases it can be helpful to delete the resource and recreate it. Examples for theses cases are: * roleRef in RoleBinding * spec.clusterIP in Service * parameters in StorageClass If a chart developer has made sure that recreating a resource is safe, the annotation can be added to a resource template. Alternatively a user may add the annotation manually to an existing resource to allow Helm to recreate a certain resource. Adding the new annotation in general by default or changing the default behaviour of Helm is not a good idea, since deletion and recreation of certain resources can lead to an unwanted or undefined state as described in detail in helm#7431 (comment): "[...] selectively deleting/re-creating volume-backed resources (Secrets, Services, ConfigMaps, PVCs) without touching the Deployment. If a Persistent Volume Claim is deleted and re-created, there is a risk that an application (Deployment) consuming that Persistent Volume Claim will not receive the new volume's mount point. The same can be said for Secrets, Configmaps, Services, and other resources which are deployed and relied upon by another resource. Environment variables populated in a Deployment from a Service won't be updated until the Pods are destroyed." Closes helm#7082. Signed-off-by: Daniel Strobusch <[email protected]>
An additional optional flag
--recreatecan be passed on upgrade (or rollback) of a release.In combination with the
--forceflag the following strategies are employed when updating a resource (which can be directly compared to kubectl):The 'on error' column should be interpreted as follows. The server responds with 'invalid' e.g. if a certain resource contains an immutable field, which cannot be patched or updated by a PUT. In theses cases it can be helpful to delete the resource and recreate it. Examples for theses cases are:
Closes #7082.