INNER CODE UNIT · Go
newInstallClusterOperatorCmd
rabbitmq/cluster-operator · kubectl-rabbitmq/commands.go:20
func newInstallClusterOperatorCmd(getExecutor func() *kubectlExecutor) *cobra.Command {
return &cobra.Command{
Use: "install-cluster-operator",
Short: "Install the latest released RabbitMQ Cluster Operator",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
executor := getExecutor()
return executor.Execute("apply", "-f", "https://github.com/rabbitmq/cluster-operator/releases/latest/download/cluster-operator-ghcr-io.yml")
},
}
}
func newListCmd(getExecutor func() *kubectlExecutor) *cobra.Command {
return &cobra.Command{
Use: "list",
Short: "List all RabbitMQ clusters",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {