1
0
mirror of synced 2026-02-13 13:06:56 +00:00

Add suspend status to get sources commands

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2020-11-26 17:17:50 +02:00
parent 26bc0a8100
commit 567ce7f987
14 changed files with 212 additions and 27 deletions

View File

@@ -70,7 +70,7 @@ func getReceiverCmdRun(cmd *cobra.Command, args []string) error {
return nil
}
header := []string{"Name", "Suspended", "Ready", "Message"}
header := []string{"Name", "Ready", "Message", "Suspended"}
if allNamespaces {
header = append([]string{"Namespace"}, header...)
}
@@ -80,16 +80,16 @@ func getReceiverCmdRun(cmd *cobra.Command, args []string) error {
if c := apimeta.FindStatusCondition(receiver.Status.Conditions, meta.ReadyCondition); c != nil {
row = []string{
receiver.GetName(),
strings.Title(strconv.FormatBool(receiver.Spec.Suspend)),
string(c.Status),
c.Message,
strings.Title(strconv.FormatBool(receiver.Spec.Suspend)),
}
} else {
row = []string{
receiver.GetName(),
strings.Title(strconv.FormatBool(receiver.Spec.Suspend)),
string(metav1.ConditionFalse),
"waiting to be reconciled",
strings.Title(strconv.FormatBool(receiver.Spec.Suspend)),
}
}
rows = append(rows, row)