fix(kube): make state miss not a error

This is a partial shot in the dark currently, but this appears to be
what's causing the deployment issues. I've been able to reproduce this
issue quite frequently in multiple different environments and across
helm versions, so, from the looks of this this should resolve it. Open
to any feedback on a better way of handling this. Ideally since this
appears to be just checking the internal state and seeing if it exists,
we should be able to ignore that and instead make it a warning. I'll
adjust the code as needed based on usage tests.

Fixes #1193
pull/4146/head
Jared Allard 7 years ago
parent 1c2592975b
commit 4886909e53
No known key found for this signature in database
GPG Key ID: 0CA9135F5BB08943

@ -277,7 +277,7 @@ func (c *Client) Update(namespace string, originalReader, targetReader io.Reader
originalInfo := original.Get(info) originalInfo := original.Get(info)
if originalInfo == nil { if originalInfo == nil {
kind := info.Mapping.GroupVersionKind.Kind kind := info.Mapping.GroupVersionKind.Kind
return fmt.Errorf("no %s with the name %q found", kind, info.Name) c.Log("Warning: no %s with the name %q found in internal state", kind, info.Name)
} }
if err := updateResource(c, info, originalInfo.Object, force, recreate); err != nil { if err := updateResource(c, info, originalInfo.Object, force, recreate); err != nil {

Loading…
Cancel
Save