only do namespace check if not default
This commit is contained in:
parent
041d68b1ce
commit
c68226e9b0
@ -412,6 +412,8 @@ 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)
|
||||||
|
// only do this if the namespace is not default
|
||||||
|
if namespace != "default" {
|
||||||
if exist, err := k.namespaceExists(namespace); err == nil && !exist {
|
if exist, err := k.namespaceExists(namespace); err == nil && !exist {
|
||||||
if err := k.createNamespace(namespace); err != nil {
|
if err := k.createNamespace(namespace); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -419,6 +421,7 @@ func (k *kubernetes) Create(s *runtime.Service, opts ...runtime.CreateOption) er
|
|||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// determine the image from the source and options
|
// determine the image from the source and options
|
||||||
options.Image = k.getImage(s, options)
|
options.Image = k.getImage(s, options)
|
||||||
|
Loading…
Reference in New Issue
Block a user