This is an automated email from the ASF dual-hosted git repository.

zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git


The following commit(s) were added to refs/heads/master by this push:
     new e5bfbbe1 [dubboctl] add profilecommand (#560)
e5bfbbe1 is described below

commit e5bfbbe145a9ca4bbc2fc4adf715df03bbbd9a7b
Author: Jian Zhong <[email protected]>
AuthorDate: Fri Jan 24 15:36:22 2025 +0800

    [dubboctl] add profilecommand (#560)
---
 dubboctl/cmd/root.go            |  6 +++++-
 operator/cmd/cluster/profile.go | 19 +++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/dubboctl/cmd/root.go b/dubboctl/cmd/root.go
index 68689603..403eee14 100644
--- a/dubboctl/cmd/root.go
+++ b/dubboctl/cmd/root.go
@@ -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
 }
 
diff --git a/operator/cmd/cluster/profile.go b/operator/cmd/cluster/profile.go
new file mode 100644
index 00000000..d377b7c5
--- /dev/null
+++ b/operator/cmd/cluster/profile.go
@@ -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
+}

Reply via email to