diff --git a/storage/kubernetes/client.go b/storage/kubernetes/client.go index d6d81f9865..802a94da44 100644 --- a/storage/kubernetes/client.go +++ b/storage/kubernetes/client.go @@ -161,6 +161,7 @@ func (c *client) get(resource, name string, v interface{}) error { } func (c *client) getResource(apiVersion, namespace, resource, name string, v interface{}) error { + c.logger.Debugf("Retrieving resource: %s/%s %s/%s", apiVersion, namespace, resource, name) url := c.urlFor(apiVersion, namespace, resource, name) resp, err := c.client.Get(url) if err != nil { diff --git a/storage/kubernetes/storage.go b/storage/kubernetes/storage.go index 193c050302..553ae0773d 100644 --- a/storage/kubernetes/storage.go +++ b/storage/kubernetes/storage.go @@ -281,8 +281,7 @@ func (cli *client) GetClient(id string) (storage.Client, error) { func (cli *client) getClient(id string) (Client, error) { var c Client - name := cli.idToName(id) - if err := cli.get(resourceClient, name, &c); err != nil { + if err := cli.get(resourceClient, id, &c); err != nil { return Client{}, err } if c.ID != id { diff --git a/storage/kubernetes/types.go b/storage/kubernetes/types.go index 5324998e38..4d78dbe2ef 100644 --- a/storage/kubernetes/types.go +++ b/storage/kubernetes/types.go @@ -257,7 +257,7 @@ func (cli *client) fromStorageClient(c storage.Client) Client { APIVersion: cli.apiVersion, }, ObjectMeta: k8sapi.ObjectMeta{ - Name: cli.idToName(c.ID), + Name: c.ID, Namespace: cli.namespace, }, ID: c.ID,