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 2a15c740 [navi] initial navi agent and discovery (#757)
2a15c740 is described below

commit 2a15c740fce286e6daed41c5f4b937bac32207bf
Author: Jian Zhong <[email protected]>
AuthorDate: Wed Jul 30 19:51:18 2025 +0800

    [navi] initial navi agent and discovery (#757)
---
 README.md                                    |  2 ++
 navigator/cmd/navigator-agent/app/cmd.go     | 28 ++++++++++++++++++++++++++++
 navigator/cmd/navigator-agent/main.go        | 13 +++++++++++++
 navigator/cmd/navigator-discovery/app/cmd.go | 11 +++++++++++
 navigator/cmd/navigator-discovery/main.go    | 13 +++++++++++++
 navigator/pkg/cmd/cmd.go                     | 10 ++++++++++
 6 files changed, 77 insertions(+)

diff --git a/README.md b/README.md
index f56678c3..2f988303 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,8 @@
 The Dubbo Kubernetes Integration
 </h1>
 
+[![Build](https://github.com/apache/dubbo-kubernetes/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/dubbo-kubernetes/actions/workflows/ci.yml)
+[![codecov](https://codecov.io/gh/apache/dubbo-kubernetes/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/dubbo-kubernetes)
 ![license](https://img.shields.io/badge/license-Apache--2.0-green.svg)
 
 Provides support for building and deploying Dubbo applications in various 
environments, including Kubernetes and Alibaba Cloud ACK.
diff --git a/navigator/cmd/navigator-agent/app/cmd.go 
b/navigator/cmd/navigator-agent/app/cmd.go
new file mode 100644
index 00000000..a1f91952
--- /dev/null
+++ b/navigator/cmd/navigator-agent/app/cmd.go
@@ -0,0 +1,28 @@
+package app
+
+import (
+       "github.com/apache/dubbo-kubernetes/navigator/pkg/cmd"
+       "github.com/spf13/cobra"
+)
+
+func NewRootCommand() *cobra.Command {
+       rootCmd := &cobra.Command{
+               Use:          "navi-agent",
+               SilenceUsage: true,
+       }
+       cmd.AddFlags(rootCmd)
+       return rootCmd
+}
+
+func newProxyCommand() *cobra.Command {
+       return &cobra.Command{
+               Use:   "proxy",
+               Short: "XDS proxy agent",
+               FParseErrWhitelist: cobra.FParseErrWhitelist{
+                       UnknownFlags: true,
+               },
+               RunE: func(c *cobra.Command, args []string) error {
+                       return nil
+               },
+       }
+}
diff --git a/navigator/cmd/navigator-agent/main.go 
b/navigator/cmd/navigator-agent/main.go
new file mode 100644
index 00000000..f72b5ea8
--- /dev/null
+++ b/navigator/cmd/navigator-agent/main.go
@@ -0,0 +1,13 @@
+package main
+
+import (
+       "github.com/apache/dubbo-kubernetes/navigator/cmd/navigator-agent/app"
+       "os"
+)
+
+func main() {
+       rootCmd := app.NewRootCommand()
+       if err := rootCmd.Execute(); err != nil {
+               os.Exit(-1)
+       }
+}
diff --git a/navigator/cmd/navigator-discovery/app/cmd.go 
b/navigator/cmd/navigator-discovery/app/cmd.go
new file mode 100644
index 00000000..f6d5e4aa
--- /dev/null
+++ b/navigator/cmd/navigator-discovery/app/cmd.go
@@ -0,0 +1,11 @@
+package app
+
+import "github.com/spf13/cobra"
+
+func NewRootCommand() *cobra.Command {
+       rootCmd := &cobra.Command{
+               Use:          "navi-discovery",
+               SilenceUsage: true,
+       }
+       return rootCmd
+}
diff --git a/navigator/cmd/navigator-discovery/main.go 
b/navigator/cmd/navigator-discovery/main.go
new file mode 100644
index 00000000..90b59883
--- /dev/null
+++ b/navigator/cmd/navigator-discovery/main.go
@@ -0,0 +1,13 @@
+package main
+
+import (
+       
"github.com/apache/dubbo-kubernetes/navigator/cmd/navigator-discovery/app"
+       "os"
+)
+
+func main() {
+       rootCmd := app.NewRootCommand()
+       if err := rootCmd.Execute(); err != nil {
+               os.Exit(-1)
+       }
+}
diff --git a/navigator/pkg/cmd/cmd.go b/navigator/pkg/cmd/cmd.go
new file mode 100644
index 00000000..ab77cf8d
--- /dev/null
+++ b/navigator/pkg/cmd/cmd.go
@@ -0,0 +1,10 @@
+package cmd
+
+import (
+       "flag"
+       "github.com/spf13/cobra"
+)
+
+func AddFlags(rootCmd *cobra.Command) {
+       rootCmd.PersistentFlags().AddGoFlagSet(flag.CommandLine)
+}

Reply via email to