@@ -426,21 +426,19 @@ func RunRuntimeList(ctx context.Context) error {
426426 }
427427
428428 tb := ansiterm .NewTabWriter (os .Stdout , 0 , 0 , 4 , ' ' , 0 )
429- _ , err = fmt .Fprintln (tb , "NAME\t NAMESPACE\t CLUSTER\t STATUS \ t VERSION" )
429+ _ , err = fmt .Fprintln (tb , "NAME\t NAMESPACE\t CLUSTER\t VERSION\t SYNC_STATUS \t HEALTH_STATUS \t HEALTH_MESSAGE " )
430430 if err != nil {
431431 return err
432432 }
433433
434434 for _ , rt := range runtimes {
435- status := "N/A"
435+ name := rt . Metadata . Name
436436 namespace := "N/A"
437437 cluster := "N/A"
438- name := rt .Metadata .Name
439438 version := "N/A"
440-
441- if rt .Self .HealthMessage != nil {
442- status = * rt .Self .HealthMessage
443- }
439+ syncStatus := rt .SyncStatus
440+ healthStatus := rt .HealthStatus
441+ healthMessage := "N/A"
444442
445443 if rt .Metadata .Namespace != nil {
446444 namespace = * rt .Metadata .Namespace
@@ -454,12 +452,18 @@ func RunRuntimeList(ctx context.Context) error {
454452 version = * rt .RuntimeVersion
455453 }
456454
457- _ , err = fmt .Fprintf (tb , "%s\t %s\t %s\t %s\t %s\n " ,
455+ if rt .HealthMessage != nil {
456+ healthMessage = * rt .HealthMessage
457+ }
458+
459+ _ , err = fmt .Fprintf (tb , "%s\t %s\t %s\t %s\t %s\t %s\t %s\n " ,
458460 name ,
459461 namespace ,
460462 cluster ,
461- status ,
462463 version ,
464+ syncStatus ,
465+ healthStatus ,
466+ healthMessage ,
463467 )
464468 if err != nil {
465469 return err
@@ -818,7 +822,6 @@ func updateProject(repofs fs.FS, rt *runtime.Runtime) error {
818822 project .ObjectMeta .Labels = make (map [string ]string )
819823 }
820824
821-
822825 project .ObjectMeta .Labels [store .Get ().LabelKeyCFType ] = store .Get ().CFRuntimeType
823826
824827 return repofs .WriteYamls (projPath , project , appset )
0 commit comments