Command-line options¶
Most of the options relate to kopf run, though some are shared by other
commands, such as kopf freeze and kopf resume.
Scripting options¶
- -m, --module¶
A semantic equivalent of
python -m— specifies which importable modules to import on startup.
Logging options¶
- --quiet¶
Be quiet: only show warnings and errors, but not the normal processing logs.
- --verbose¶
Show what Kopf is doing, but hide the low-level asyncio & aiohttp logs.
- --debug¶
Extremely verbose: logs all asyncio internals as well as the API traffic.
- --log-format (plain|full|json)¶
See more in Configuration.
- --log-prefix, --no-log-prefix¶
Whether to prefix all object-related messages with the name of the object. By default, the prefixing is enabled.
- --log-refkey¶
For JSON logs, the top-level key under which to place the object-identifying information, such as its name, namespace, etc.
Scope options¶
- -n, --namespace¶
Serve this namespace, or all namespaces matching the pattern (or excluded from patterns). This option can be repeated multiple times.
See also
Scopes for the pattern syntax.
- -A, --all-namespaces¶
Serve the whole cluster. This is different from
--namespace *: with--namespace *, the namespaces are monitored, and every resource in every namespace is watched separately, starting and stopping as needed; with--all-namespaces, the cluster endpoints of the Kubernetes API are used for resources, the namespaces are not monitored.
Probing options¶
- --liveness¶
The endpoint on which to serve the probes and health checks. E.g.
http://0.0.0.0:1234/. Onlyhttp://is currently supported. By default, the probing endpoint is not served.
See also
Peering options¶
- --standalone¶
Disable peering and auto-detection of peering. Run strictly as if this is the only instance of the operator.
- --peering¶
The name of the peering object to use. Depending on the operator’s scope (
--all-namespacesvs.--namespace, see Scopes), this is eitherkind: KopfPeeringorkind: ClusterKopfPeering.If specified, the operator will not run until that peering exists (for the namespaced operators, until it exists in each served namespace).
If not specified, the operator checks for the name “default” and uses it. If the “default” peering is absent, the operator runs in standalone mode.
- --priority¶
The priority to use for the operator. The operator with the highest priority wins the peering competition and handles the resources.
The default priority is
0;--devsets it to666.
See also
Development mode¶
- --dev¶
Run in the development mode. Currently, this implies
--priority=666. Other meanings can be added in the future, such as automatic reloading of the source code.