@@ -426,21 +426,19 @@ func RunRuntimeList(ctx context.Context) error {
426
426
}
427
427
428
428
tb := ansiterm.NewTabWriter(os.Stdout, 0, 0, 4, ' ', 0)
429
- _, err = fmt.Fprintln(tb, "NAME\tNAMESPACE\tCLUSTER\tSTATUS\ tVERSION")
429
+ _, err = fmt.Fprintln(tb, "NAME\tNAMESPACE\tCLUSTER\tVERSION\tSYNC_STATUS\tHEALTH_STATUS\tHEALTH_MESSAGE ")
430
430
if err != nil {
431
431
return err
432
432
}
433
433
434
434
for _, rt := range runtimes {
435
- status := "N/A"
435
+ name := rt.Metadata.Name
436
436
namespace := "N/A"
437
437
cluster := "N/A"
438
- name := rt.Metadata.Name
439
438
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"
444
442
445
443
if rt.Metadata.Namespace != nil {
446
444
namespace = *rt.Metadata.Namespace
@@ -454,12 +452,18 @@ func RunRuntimeList(ctx context.Context) error {
454
452
version = *rt.RuntimeVersion
455
453
}
456
454
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",
458
460
name,
459
461
namespace,
460
462
cluster,
461
- status,
462
463
version,
464
+ syncStatus,
465
+ healthStatus,
466
+ healthMessage,
463
467
)
464
468
if err != nil {
465
469
return err
@@ -818,7 +822,6 @@ func updateProject(repofs fs.FS, rt *runtime.Runtime) error {
818
822
project.ObjectMeta.Labels = make(map[string]string)
819
823
}
820
824
821
-
822
825
project.ObjectMeta.Labels[store.Get().LabelKeyCFType] = store.Get().CFRuntimeType
823
826
824
827
return repofs.WriteYamls(projPath, project, appset)
0 commit comments