mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-27 16:17:34 +00:00
Fix: prioritize namespace flag for vela up
Currently, CLI applies application to `default` namespace when there is no explicit namespace in application spec, even if the namespace flag is set. This commit fixes issue by overriding the namespace if the namespace flag is set. Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
This commit is contained in:
@@ -68,6 +68,10 @@ func NewUpCommand(c common2.Args, order string, ioStream cmdutil.IOStreams) *cob
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "File format is illegal, only support vela appfile format or OAM Application object yaml")
|
||||
}
|
||||
// override namespace if namespace flag is set
|
||||
if namespace != "" {
|
||||
app.SetNamespace(namespace)
|
||||
}
|
||||
err = common.ApplyApplication(app, ioStream, kubecli)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user