only do namespace check if not default
This commit is contained in:
parent
041d68b1ce
commit
c68226e9b0
@ -412,12 +412,15 @@ func (k *kubernetes) Create(s *runtime.Service, opts ...runtime.CreateOption) er
|
|||||||
|
|
||||||
// ensure the namespace exists
|
// ensure the namespace exists
|
||||||
namespace := client.SerializeResourceName(options.Namespace)
|
namespace := client.SerializeResourceName(options.Namespace)
|
||||||
if exist, err := k.namespaceExists(namespace); err == nil && !exist {
|
// only do this if the namespace is not default
|
||||||
if err := k.createNamespace(namespace); err != nil {
|
if namespace != "default" {
|
||||||
|
if exist, err := k.namespaceExists(namespace); err == nil && !exist {
|
||||||
|
if err := k.createNamespace(namespace); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// determine the image from the source and options
|
// determine the image from the source and options
|
||||||
|
Loading…
Reference in New Issue
Block a user