Regenerate cli-arguments.md from the actual usage of 0.13

This commit is contained in:
Aarni Koskela 2018-04-24 14:32:47 +03:00
parent 17745a920d
commit 1196b48745
2 changed files with 87 additions and 62 deletions

View file

@ -1,64 +1,48 @@
# Command line arguments # Command line arguments
```console The following command line arguments are accepted by the main controller executable.
Usage of :
--alsologtostderr log to standard error as well as files They are set in the container spec of the `nginx-ingress-controller` Deployment object (see `deploy/with-rbac.yaml` or `deploy/without-rbac.yaml`).
--annotations-prefix string Prefix of the ingress annotations. (default "nginx.ingress.kubernetes.io")
--apiserver-host string The address of the Kubernetes Apiserver to connect to in the format of protocol://address:port, e.g., http://localhost:8080. If not specified, the assumption is that the binary runs inside a Kubernetes cluster and local discovery is attempted.
--configmap string Name of the ConfigMap that contains the custom configuration to use | Argument | Description |
--default-backend-service string Service used to serve a 404 page for the default backend. Takes the form |----------|-------------|
namespace/name. The controller uses the first node port of this Service for | `--alsologtostderr` | log to standard error as well as files |
the default backend. | `--annotations-prefix string` | Prefix of the ingress annotations. (default "nginx.ingress.kubernetes.io") |
--default-server-port int Default port to use for exposing the default server (catch all) (default 8181) | `--apiserver-host string` | The address of the Kubernetes Apiserver to connect to in the format of protocol://address:port, e.g., http://localhost:8080. If not specified, the assumption is that the binary runs inside a Kubernetes cluster and local discovery is attempted. |
--default-ssl-certificate string Name of the secret | `--configmap string` | Name of the ConfigMap that contains the custom configuration to use |
that contains a SSL certificate to be used as default for a HTTPS catch-all server. | `--default-backend-service string` | Service used to serve a 404 page for the default backend. Takes the form namespace/name. The controller uses the first node port of this Service for the default backend. |
Takes the form <namespace>/<secret name>. | `--default-server-port int` | Default port to use for exposing the default server (catch all) (default 8181) |
--election-id string Election id to use for status update. (default "ingress-controller-leader") | `--default-ssl-certificate string` | Name of the secret that contains a SSL certificate to be used as default for a HTTPS catch-all server. Takes the form <namespace>/<secret name>. |
--enable-dynamic-configuration When enabled controller will try to avoid Nginx reloads as much as possible by using Lua. Disabled by default. | `--election-id string` | Election id to use for status update. (default "ingress-controller-leader") |
--enable-ssl-chain-completion Defines if the nginx ingress controller should check the secrets for missing intermediate CA certificates. | `--enable-dynamic-configuration` | When enabled controller will try to avoid Nginx reloads as much as possible by using Lua. Disabled by default. |
If the certificate contain issues chain issues is not possible to enable OCSP. | `--enable-ssl-chain-completion` | Defines if the nginx ingress controller should check the secrets for missing intermediate CA certificates. If the certificate contain issues chain issues is not possible to enable OCSP. Default is true. (default true) |
Default is true. (default true) | `--enable-ssl-passthrough` | Enable SSL passthrough feature. Default is disabled |
--enable-ssl-passthrough Enable SSL passthrough feature. Default is disabled | `--force-namespace-isolation` | Force namespace isolation. This flag is required to avoid the reference of secrets or configmaps located in a different namespace than the specified in the flag --watch-namespace. |
--force-namespace-isolation Force namespace isolation. This flag is required to avoid the reference of secrets or | `--health-check-path string` | Defines the URL to be used as health check inside in the default server in NGINX. (default "/healthz") |
configmaps located in a different namespace than the specified in the flag --watch-namespace. | `--healthz-port int` | port for healthz endpoint. (default 10254) |
--health-check-path string Defines | `--http-port int` | Indicates the port to use for HTTP traffic (default 80) |
the URL to be used as health check inside in the default server in NGINX. (default "/healthz") | `--https-port int` | Indicates the port to use for HTTPS traffic (default 443) |
--healthz-port int port for healthz endpoint. (default 10254) | `--ingress-class string` | Name of the ingress class to route through this controller. |
--http-port int Indicates the port to use for HTTP traffic (default 80) | `--kubeconfig string` | Path to kubeconfig file with authorization and master location information. |
--https-port int Indicates the port to use for HTTPS traffic (default 443) | `--log_backtrace_at traceLocation` | when logging hits line file:N, emit a stack trace (default :0) |
--ingress-class string Name of the ingress class to route through this controller. | `--log_dir string` | If non-empty, write log files in this directory |
--kubeconfig string Path to kubeconfig file with authorization and master location information. | `--logtostderr` | log to standard error instead of files (default true) |
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) | `--profiling` | Enable profiling via web interface host:port/debug/pprof/ (default true) |
--log_dir string If non-empty, write log files in this directory | `--publish-service string` | Service fronting the ingress controllers. Takes the form namespace/name. The controller will set the endpoint records on the ingress objects to reflect those on the service. |
--logtostderr log to standard error instead of files (default true) | `--publish-status-address string` | User customized address to be set in the status of ingress resources. The controller will set the endpoint records on the ingress using this address. |
--profiling Enable profiling via web interface host:port/debug/pprof/ (default true) | `--report-node-internal-ip-address` | Defines if the nodes IP address to be returned in the ingress status should be the internal instead of the external IP address |
--publish-service string Service fronting the ingress controllers. Takes the form namespace/name. | `--sort-backends` | Defines if backends and its endpoints should be sorted |
The controller will set the endpoint records on the ingress objects to reflect those on the service. | `--ssl-passtrough-proxy-port int` | Default port to use internally for SSL when SSL Passthgough is enabled (default 442) |
--publish-status-address string User customized address to be set in the status of ingress resources. The controller will set the | `--status-port int` | Indicates the TCP port to use for exposing the nginx status page (default 18080) |
endpoint records on the ingress using this address. | `--stderrthreshold severity` | logs at or above this threshold go to stderr (default 2) |
--report-node-internal-ip-address Defines if the nodes IP address to be returned in the ingress status should be the internal instead of the external IP address | `--sync-period duration` | Relist and confirm cloud resources this often. Default is 10 minutes (default 10m0s) |
--sort-backends Defines if backends and its endpoints should be sorted | `--sync-rate-limit float32` | Define the sync frequency upper limit (default 0.3) |
--ssl-passtrough-proxy-port int Default port to use internally for SSL when SSL Passthgough is enabled (default 442) | `--tcp-services-configmap string` | Name of the ConfigMap that contains the definition of the TCP services to expose. The key in the map indicates the external port to be used. The value is the name of the service with the format namespace/serviceName and the port of the service could be a number of the name of the port. The ports 80 and 443 are not allowed as external ports. This ports are reserved for the backend |
--status-port int Indicates the TCP port to use for exposing the nginx status page (default 18080) | `--udp-services-configmap string` | Name of the ConfigMap that contains the definition of the UDP services to expose. The key in the map indicates the external port to be used. The value is the name of the service with the format namespace/serviceName and the port of the service could be a number of the name of the port. |
--stderrthreshold severity logs at or above this threshold go to stderr (default 2) | `--update-status` | Indicates if the ingress controller should update the Ingress status IP/hostname. Default is true (default true) |
--sync-period duration Relist and confirm cloud resources this often. Default is 10 minutes (default 10m0s) | `--update-status-on-shutdown` | Indicates if the ingress controller should update the Ingress status IP/hostname when the controller is being stopped. Default is true (default true) |
--sync-rate-limit float32 Define the sync frequency upper limit (default 0.3) | `-v`, `--v Level` | log level for V logs |
--tcp-services-configmap string Name of the ConfigMap that contains the definition of the TCP services to expose. | `--version` | Shows release information about the NGINX Ingress controller |
The key in the map indicates the external port to be used. The value is the name of the | `--vmodule moduleSpec` | comma-separated list of pattern=N settings for file-filtered logging |
service with the format namespace/serviceName and the port of the service could be a | `--watch-namespace string` | Namespace to watch for Ingress. Default is to watch all namespaces |
number of the name of the port.
The ports 80 and 443 are not allowed as external ports. This ports are reserved for the backend
--udp-services-configmap string Name of the ConfigMap that contains the definition of the UDP services to expose.
The key in the map indicates the external port to be used. The value is the name of the
service with the format namespace/serviceName and the port of the service could be a
number of the name of the port.
--update-status Indicates if the
ingress controller should update the Ingress status IP/hostname. Default is true (default true)
--update-status-on-shutdown Indicates if the
ingress controller should update the Ingress status IP/hostname when the controller
is being stopped. Default is true (default true)
-v, --v Level log level for V logs
--version Shows release information about the NGINX Ingress controller
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
--watch-namespace string Namespace to watch for Ingress. Default is to watch all namespaces
```

View file

@ -0,0 +1,41 @@
#!/usr/bin/env python
# Copyright 2018 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Convert the output of `nginx-ingress-controller --help` to
a Markdown table.
"""
import re
import sys
assert sys.version_info[0] == 3, 'This script requires Python 3'
data = sys.stdin.read()
data = data.replace('\t', ' ' * 8) # Expand tabs
data = data.replace('\n' + (' ' * 8 * 2), ' ') # Unwrap lines
print('''
| Argument | Description |
|----------|-------------|
'''.rstrip())
for arg_m in re.finditer('^\s+(-.+?)\s{2,}(.+)$', data, flags=re.MULTILINE):
arg, description = arg_m.groups()
print('| `{arg}` | {description} |'.format(
arg=arg.replace(', ', '`, `'),
description=description,
))