Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "status <app-name>", Short: "Get status of a workload under wego control", Args: cobra.MinimumNArgs(1), SilenceUsage: true, SilenceErrors: true, Example: "wego app status podinfo", RunE: func(cmd *cobra.Command, args []string) error { params := app.StatusParams{} params.Name = args[0] params.Namespace, _ = cmd.Parent().Parent().Flags().GetString("namespace") cliRunner := &runner.CLIRunner{} osysClient := osys.New() fluxClient := flux.New(osysClient, cliRunner) kubeClient, err := kube.NewKubeHTTPClient() if err != nil { return fmt.Errorf("error initializing kube client: %w", err) } gitClient := git.New(nil) logger := logger.New(os.Stdout) appService := app.New(logger, gitClient, fluxClient, kubeClient, osysClient) fluxOutput, lastSuccessReconciliation, err := appService.Status(params) if err != nil { return fmt.Errorf("failed getting application status: %w", err) } logger.Printf("Last successful reconciliation: %s\n\n", lastSuccessReconciliation) logger.Println(fluxOutput) return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.