mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-22 14:07:03 +00:00
Fix: vela status --endpoint show no IP when only one master node
Add fallback if no worker node check app exist Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
This commit is contained in:
@@ -143,8 +143,18 @@ func NewAppStatusCommand(c common.Args, order string, ioStreams cmdutil.IOStream
|
||||
}
|
||||
return printAppPods(appName, namespace, f, c)
|
||||
}
|
||||
|
||||
newClient, err := c.GetClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
showEndpoints, err := cmd.Flags().GetBool("endpoint")
|
||||
if showEndpoints && err == nil {
|
||||
_, err := loadRemoteApplication(newClient, namespace, appName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
component, _ := cmd.Flags().GetString("component")
|
||||
cluster, _ := cmd.Flags().GetString("cluster")
|
||||
f := Filter{
|
||||
@@ -153,10 +163,6 @@ func NewAppStatusCommand(c common.Args, order string, ioStreams cmdutil.IOStream
|
||||
}
|
||||
return printAppEndpoints(ctx, appName, namespace, f, c, false)
|
||||
}
|
||||
newClient, err := c.GetClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if outputFormat != "" {
|
||||
return printRawApplication(context.Background(), c, outputFormat, cmd.OutOrStdout(), namespace, appName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user