feat(helm): call ensureNamespace only if namespace != ""

Signed-off-by: Mathieu Benoit <mabenoit@microsoft.com>
pull/4600/head
Mathieu Benoit 7 years ago committed by GitHub
parent cfae1f6ad5
commit 4267685967
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -235,12 +235,14 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) {
// //
// Namespace will set the namespaces. // Namespace will set the namespaces.
func (c *Client) Update(namespace string, originalReader, targetReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error { func (c *Client) Update(namespace string, originalReader, targetReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error {
client, err := c.ClientSet() if namespace != "" {
if err != nil { client, err := c.ClientSet()
return err if err != nil {
} return err
if err := ensureNamespace(client, namespace); err != nil { }
return err if err := ensureNamespace(client, namespace); err != nil {
return err
}
} }
original, err := c.BuildUnstructured(namespace, originalReader) original, err := c.BuildUnstructured(namespace, originalReader)

Loading…
Cancel
Save