Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dubboctl] add profile command #560

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion dubboctl/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ func GetRootCmd(args []string) *cobra.Command {

repoCmd := RepoCmd(ctx, rootCmd, factory)
rootCmd.AddCommand(repoCmd)
hideFlags(createCmd, cli.NamespaceFlag, cli.DubboNamespaceFlag, cli.ChartFlag)
hideFlags(repoCmd, cli.NamespaceFlag, cli.DubboNamespaceFlag, cli.ChartFlag)

profileCmd := cluster.ProfileCmd(ctx)
rootCmd.AddCommand(profileCmd)
hideFlags(profileCmd, cli.NamespaceFlag, cli.DubboNamespaceFlag, cli.ChartFlag)
return rootCmd
}

Expand Down
19 changes: 19 additions & 0 deletions operator/cmd/cluster/profile.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package cluster

import (
"github.com/apache/dubbo-kubernetes/dubboctl/pkg/cli"
"github.com/spf13/cobra"
)

func ProfileCmd(ctx cli.Context) *cobra.Command {
rootArgs := &RootArgs{}
pc := &cobra.Command{
Use: "profile",
Short: "Commands related to Dubbo configuration profiles",
Long: "The profile command lists, dumps or diffs Dubbo configuration profiles.",
Example: "dubboctl profile list\n" +
"dubboctl install --set profile=demo # Use a profile from the list",
}
AddFlags(pc, rootArgs)
return pc
}
Loading