INNER CODE UNIT · Go

newGetCmd

rabbitmq/cluster-operator · kubectl-rabbitmq/commands.go:122

func newGetCmd(getExecutor func() *kubectlExecutor) *cobra.Command {
	return &cobra.Command{
		Use:   "get INSTANCE",
		Short: "Get a RabbitMQ cluster and dependent objects",
		Args:  cobra.ExactArgs(1),
		RunE: func(cmd *cobra.Command, args []string) error {
			executor := getExecutor()
			instance := args[0]
			return executor.Execute("get", "pods,cm,sts,svc,secrets,rs", "-l", fmt.Sprintf("app.kubernetes.io/name=%s", instance))
		},
	}
}

func newDebugCmd(getExecutor func() *kubectlExecutor) *cobra.Command {
	return &cobra.Command{
		Use:   "debug INSTANCE",
		Short: "Set log level to 'debug' on all nodes",
		Args:  cobra.ExactArgs(1),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…