INNER CODE UNIT · Python

run

nolar/kopf · kopf/cli.py:74

def run(
        __controls: CLIControls,
        paths: list[str],
        modules: list[str],
        peering_name: str | None,
        priority: int | None,
        dev: bool | None,
        standalone: bool | None,
        namespaces: Collection[references.NamespacePattern],
        clusterwide: bool,
        liveness_endpoint: str | None,
) -> None:
    """ Start an operator process and handle all the requests. """
    priority = 666 if dev else priority
    if os.environ.get('KOPF_RUN_NAMESPACE'):  # legacy for single-namespace mode
        namespaces = tuple(namespaces) + (os.environ.get('KOPF_RUN_NAMESPACE', ''),)
    if namespaces and clusterwide:
        raise click.UsageError("Either --namespace or --all-namespaces can be used, not both.")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…