From 0a6129af4b4b7413e643f5ca143ce1cffdd865e5 Mon Sep 17 00:00:00 2001 From: Mateusz Hawrus Date: Mon, 12 Aug 2024 15:29:21 +0200 Subject: [PATCH] bring back alerts project flag --- internal/flags.go | 3 +++ internal/get.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/flags.go b/internal/flags.go index 1c455b9..c76310a 100644 --- a/internal/flags.go +++ b/internal/flags.go @@ -67,6 +67,9 @@ var projectFlagSupportingKinds = map[manifest.Kind]struct{}{ manifest.KindDataExport: {}, manifest.KindRoleBinding: {}, manifest.KindAnnotation: {}, + // While Alert itself is not Project scoped per-se, + // it does support Project filtering. + manifest.KindAlert: {}, } func objectKindSupportsProjectFlag(kind manifest.Kind) bool { diff --git a/internal/get.go b/internal/get.go index 54ad989..c915799 100644 --- a/internal/get.go +++ b/internal/get.go @@ -249,7 +249,7 @@ func (g *GetCmd) newGetAlertCommand(cmd *cobra.Command) *cobra.Command { return err } if len(objects) == 0 { - fmt.Printf("No resources found.\n") + fmt.Printf("No resources found in '%s' project.\n", g.client.Config.Project) return nil } if err = g.printObjects(objects); err != nil {