Commit 71bd4bf5 authored by Geoff Simmons's avatar Geoff Simmons

Add devmode to the CLI options documentation for the controller.

Update the docs while we're here:

- Add incompleteRetryDelay.

- Remove templatedir.

- Remove the glog flags, which are no longer added to the controller
  flags.
parent 9be06733
......@@ -2,59 +2,74 @@
The [controller executable](/docs/dev.md) ``k8s-ingress`` can
be started with command-line options, and these can be specified
in the [``args`` section](/deploy) of a [manifest](/deploy/controller.yaml)
that configures use of the container.
in the ``extraArgs`` field of the
[helm chart for the viking controller](/charts/viking-controller/):
```
# values.yaml for the controller
vikingController:
# ...
extraArgs:
- -log-level=DEBUG
# ...
```
If you are using another deployment method, set the CLI arguments in the
``spec.args`` field of the Pod template that configures the controller:
```
apiVersion: apps/v1
kind: Deployment
metadata:
name: viking-controller
spec:
# ---
template:
spec:
# ...
args:
- -log-level=DEBUG
# ...
```
```
$ k8s-ingress --help
Usage of ./k8s-ingress:
-alsologtostderr
log to standard error as well as files
-class string
value of the Ingress annotation kubernetes.io/ingress.class
the controller only considers Ingresses with this value for the
annotation (default "varnish")
value of the Ingress annotation kubernetes.io/ingress.class
the controller only considers Ingresses with this value for the
annotation (default "varnish")
-devmode
enable development mode
-incompleteRetryDelay duration
re-queue delay when the controller does not have all of the
information required for a necessary cluster change
must be > 0s (default 5s)
-kubeconfig string
config path for the cluster master URL, for out-of-cluster runs
-log-level string
log level: one of PANIC, FATAL, ERROR, WARN, INFO, DEBUG,
or TRACE (default "INFO")
-log_backtrace_at value
when logging hits line file:N, emit a stack trace
-log_dir string
If non-empty, write log files in this directory
-logtostderr
log to standard error instead of files
-masterurl string
cluster master URL, for out-of-cluster runs
-metricsport uint
port at which to listen for the /metrics endpoint (default 8080)
port at which to listen for the /metrics endpoint (default 8080)
-monitorintvl duration
interval at which the monitor thread checks and updates
instances of Varnish that implement Ingress.
Monitor deactivated when <= 0s (default 30s)
interval at which the monitor thread checks and updates
instances of Varnish that implement Ingress.
Monitor deactivated when <= 0s (default 30s)
-namespace string
namespace in which to listen for resources (default all)
-readyfile string
path of a file to touch when the controller is ready,
for readiness probes
path of a file to touch when the controller is ready,
for readiness probes
-resyncPeriod duration
if non-zero, re-update the controller with the state of
the cluster this often, even if nothing has changed,
to synchronize state that may have been missed (default 30s)
-stderrthreshold value
logs at or above this threshold go to stderr
-templatedir string
directory of templates for VCL generation. Defaults to
the TEMPLATE_DIR env variable, if set, or the
current working directory when the ingress
controller is invoked
-v value
log level for V logs
if non-zero, re-update the controller with the state of
the cluster this often, even if nothing has changed,
to synchronize state that may have been missed (default 30s)
-version
print version and exit
-vmodule value
comma-separated list of pattern=N settings for file-filtered logging
```
``-kubeconfig`` and ``-masterurl`` can be used to run the controller
......@@ -80,12 +95,6 @@ in ``kube-system`` and watch all namespaces. See the
single-namespace configuration. The controller watches all namespaces
by default.
``-templatedir dir`` sets ``dir`` as the location for templates used
by the controller to generate VCL configurations. By default, the
controller uses the value of the environment variable
``TEMPLATE_DIR``, or the current working director if neither of the
command-line option nor the environment variable are set.
If ``-readyfile /path/to/file`` is set, then the controller removes
the file at that path immediately at startup, if any exists, and
touches it when it is ready. Readiness probes can then test the file
......@@ -118,6 +127,20 @@ incorrectly interpreted for some reason. By default 30 seconds, and
there is no resync if set to 0s -- then the controller is only
notified when something changes.
``-incompleteRetryDelay`` sets an interval for the controller to wait
until re-attempting a synchronization that was not possible because
necessary information was missing. This is common, for example, for a
new Ingress deployment, where an IngressBacked is specified by its
Service name, but no Endpoints are currently defined for the Service,
because the Pods are not yet ready. But it may indicate that required
configuration was been omitted. Since the missing information is
commonly corrected after a few seconds, this delay allows the
controller to wait without too many rapid and unsuccessful retries.
If the interval is too long, deployments may take unnecessarily
long. If it is too short, the controller may spin through too many
unsuccessful retries. noisily generating error messages in the log and
warning Events. Default is 5s; MUST be > 0s.
``-metricsport`` (default 8080) sets the port number at which the
controller listens for the HTTP endpoint ``/metrics`` to publish
[metrics](/docs/ref-metrics.md) that are suitable for integration with
......@@ -129,21 +152,10 @@ in the [Pod template](/deploy/controller.yaml) for the controller
``-log-level`` sets the log level for the main controller code,
``INFO`` by default.
``-devmode`` enables development mode. The
[``TemplateConfig`` Custom Resoure](/docs/ref-template-cfg.md) is
only read by the controller when this flag is set. Not intended for
production use.
``-version`` prints the controller version and exits. ``-help`` prints
the usage message shown above and exits.
The remaining options exist because
[code generated for the client API](/docs/dev.md) imports the
[glog](https://github.com/golang/glog) logger.
* ``-alsologtostderr``
* ``-log_backtrace_at``
* ``-log_dir``
* ``-logtostderr``
* ``-stderrthreshold``
* ``-v``
* ``-vmodule``
glog is in fact used minimally by the controller (only by the
generated code); logging is primarily controlled by the ``-log-level``
option.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment