From ad546f16d55c7abb6328e507dd0214fca1855e67 Mon Sep 17 00:00:00 2001 From: Jared Allard Date: Wed, 30 May 2018 18:10:50 -0700 Subject: [PATCH] fix(pkg/kube): update with existing object if not in state --- pkg/kube/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 59cddff37..7496dca8b 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -278,6 +278,9 @@ func (c *Client) Update(namespace string, originalReader, targetReader io.Reader if originalInfo == nil { kind := info.Mapping.GroupVersionKind.Kind c.Log("Warning: no %s with the name %q found in internal state", kind, info.Name) + + originalInfo = &resource.Info{} + originalInfo.Object = info.Object } if err := updateResource(c, info, originalInfo.Object, force, recreate); err != nil {