Skip to content

Commit

Permalink
feat(kubernetes): Log a warning if namespace doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Oct 26, 2023
1 parent 2a042b6 commit 2570c19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/util/cmd_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ func DefaultSetup(cmd *cobra.Command, conf *config.Global, opts SetupOptions) (e
return errors.New("The current action is disabled for namespace " + conf.Client.Namespace)
}

if _, err := conf.Client.Namespaces().Get(cmd.Context(), conf.Namespace, metav1.GetOptions{}); err != nil {
log.WithError(err).Warn("namespace may not exist")
}

podFlag, err := cmd.Flags().GetString(consts.PodFlag)
if err != nil {
panic(err)
Expand Down

0 comments on commit 2570c19

Please sign in to comment.