Conversation
Signed-off-by: Jacob LeGrone <git@jacob.work>
|
thanks @jlegrone! Will give this a spin later this afternoon. |
|
First off: this is MUCH cleaner of an implementation. Thank you. Here's what I tested:
In case 3, I found an issue with this PR's behaviour. Helm 3.1.0:
With this PR: A failed pre-flight check should not deploy a release in a failed state. Would you mind looking further into this? |
|
Thanks @jlegrone for this PR. It seems like a clean way to handle the API deprecation issue. I did some testing similar to @bacongobbler but unfortunately didn't have the same success. My angle of testing is from the #7219 view point. I tested as follows:
$ helm ls
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
chrt-7625 default 1 2020-02-19 14:51:41.390839657 +0000 UTC deployed chrt-7625-0.1.0 1.0
$ helm upgrade chrt-7625 chrt-7625/
Error: UPGRADE FAILED: unable to build kubernetes objects from current release manifest: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"
|
|
Talking to @bacongobbler on Slack confirms that my testing is more concerned with the upgrading the cluster which automatically updates the resources APIs (to the latest version) in the cluster, which are then at odds with the API versions in the Helm release metadata. This is the issue #7219 . |
|
Still working on this, unfortunately it's more involved than it appeared at first glance. |
|
Superseded by #7649 |
When upgrading a component that had an apiVersion change, Helm would complain with "rendered manifests contain a new resource that already exists". This was fixed in Helm 3.2.0 by adding labels and annotations to mark a resource as managed by Helm. This adds those labels and annotations to problematic objects in Lokomotive components. We'll probably need to add them to more objects as apiVersions change, since we'll check upgrades when releasing new versions, we'll handle those as they happen. See helm/helm#7625 and helm/helm#7649.
When upgrading a component that had an apiVersion change, Helm would complain with "rendered manifests contain a new resource that already exists". This was fixed in Helm 3.2.0 by adding labels and annotations to mark a resource as managed by Helm. This adds those labels and annotations to problematic objects in Lokomotive components. We'll probably need to add them to more objects as apiVersions change, since we'll check upgrades when releasing new versions, we'll handle those as they happen. See helm/helm#7625 and helm/helm#7649.
When upgrading a component that had an apiVersion change, Helm would complain with "rendered manifests contain a new resource that already exists". This was fixed in Helm 3.2.0 by adding labels and annotations to mark a resource as managed by Helm. This adds those labels and annotations to problematic objects in Lokomotive components. We'll probably need to add them to more objects as apiVersions change, since we'll check upgrades when releasing new versions, we'll handle those as they happen. See helm/helm#7625 and helm/helm#7649.
When upgrading a component that had an apiVersion change, Helm would complain with "rendered manifests contain a new resource that already exists". This was fixed in Helm 3.2.0 by adding labels and annotations to mark a resource as managed by Helm. This adds those labels and annotations to problematic objects in Lokomotive components. We'll probably need to add them to more objects as apiVersions change, since we'll check upgrades when releasing new versions, we'll handle those as they happen. See helm/helm#7625 and helm/helm#7649.
When upgrading a component that had an apiVersion change, Helm would complain with "rendered manifests contain a new resource that already exists". This was fixed in Helm 3.2.0 by adding labels and annotations to mark a resource as managed by Helm. This adds those labels and annotations to problematic objects in Lokomotive components. We'll probably need to add them to more objects as apiVersions change, since we'll check upgrades when releasing new versions, we'll handle those as they happen. See helm/helm#7625 and helm/helm#7649.
Related to #6850, and an alternative implementation to #7575.
Steps to Reproduce
Create a chart with
Deploy a release of that chart, then switch to apps/v1:
Run
upgrade, and you should get the following error before this patch: