This is an automated email from the ASF dual-hosted git repository.
tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git
The following commit(s) were added to refs/heads/master by this push:
new df326f5 chore: supplement CLI output (#113)
df326f5 is described below
commit df326f5cc95c35aa8c62c11430c6df95b090e9a4
Author: Alex Zhang <[email protected]>
AuthorDate: Mon Dec 21 21:12:33 2020 +0800
chore: supplement CLI output (#113)
related #111 .
---
cmd/ingress/ingress.go | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/cmd/ingress/ingress.go b/cmd/ingress/ingress.go
index a59f648..5cae8a5 100644
--- a/cmd/ingress/ingress.go
+++ b/cmd/ingress/ingress.go
@@ -57,11 +57,27 @@ func NewIngressCommand() *cobra.Command {
cfg := config.NewDefaultConfig()
cmd := &cobra.Command{
- Use: "ingress [flags]",
- Short: "launch the controller",
- Example: `Run apisix-ingress-controller from configuration file:
+ Use: "ingress [flags]",
+ Long: `launch the ingress controller
- apisix-ingress-controller ingress --config-path /path/to/config.json`,
+You can run apisix-ingress-controller from configuration file or command line
options,
+if you run it from configuration file, other command line options will be
ignored.
+
+Run from configuration file:
+
+ apisix-ingress-controller ingress --config-path /path/to/config.json
+
+Both json and yaml are supported as the configuration file format.
+
+Run from command line options:
+
+ apisix-ingress-controller ingress --apisix-base-url
http://apisix-service:9180/apisix/admin --kubeconfig /path/to/kubeconfig
+
+If you run apisix-ingress-controller outside the Kubernetes cluster,
--kubeconfig option (or kubeconfig item in configuration file) should be
specified explicitly,
+or if you run it inside cluster, leave it alone and in-cluster configuration
will be discovered and used.
+
+Before you run apisix-ingress-controller, be sure all related resources, like
CRDs (ApisixRoute, ApisixUpstream and etc),
+the apisix cluster and others are created`,
Run: func(cmd *cobra.Command, args []string) {
if configPath != "" {
c, err := config.NewConfigFromFile(configPath)