From 13cb8d82441e452f5a3762dbc002dd7c1fa1e95c Mon Sep 17 00:00:00 2001 From: Timofey Kirillov Date: Wed, 27 Dec 2017 20:45:11 +0300 Subject: [PATCH] Show kind in resource-not-found-in-release error This error occures when resource is not found in helm release: `Error: UPGRADE FAILED: no resource with the name "redis-cluster-sentinel" found` Changed to: `Error: UPGRADE FAILED: no ConfigMap with the name "redis-cluster-sentinel" found` So now that resource can easily be found in cluster. --- pkg/kube/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index f117d7ee9..a6a156ee4 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -274,7 +274,8 @@ func (c *Client) Update(namespace string, originalReader, targetReader io.Reader originalInfo := original.Get(info) if originalInfo == nil { - return fmt.Errorf("no resource with the name %q found", info.Name) + kind := info.Mapping.GroupVersionKind.Kind + return fmt.Errorf("no %s with the name %q found", kind, info.Name) } if err := updateResource(c, info, originalInfo.Object, force, recreate); err != nil {