non-reconciliable & readiness of static objects
Remove reconcile subcommand for static object APIs Alerts and Providers. Add a isStatic() method on all the object adapters to determine if they are static and don't have reconciler. The objects that don't have reconcilers are skipped from reconciliation and readiness checks like HelmRepository of type OCI. Add default ready message for `get` subcommand output for static objects, Alerts, Providers and HelmRepositories of type OCI, as ready message can't be derived for them from their status. Signed-off-by: Sunny <darkowlzz@protonmail.com>
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2"
|
||||
@@ -77,7 +78,7 @@ func init() {
|
||||
|
||||
func (s alertListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string {
|
||||
item := s.Items[i]
|
||||
status, msg := statusAndMessage(item.Status.Conditions)
|
||||
status, msg := string(metav1.ConditionTrue), "Alert is Ready"
|
||||
return append(nameColumns(&item, includeNamespace, includeKind),
|
||||
cases.Title(language.English).String(strconv.FormatBool(item.Spec.Suspend)), status, msg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user