def run( __controls: CLIControls, paths: List[str], modules: List[str], peering_name: Optional[str], priority: int, standalone: bool, namespace: Optional[str], liveness_endpoint: Optional[str], ) -> None: """ Start an operator process and handle all the requests. """ if __controls.registry is not None: registries.set_default_registry(__controls.registry) loaders.preload( paths=paths, modules=modules, ) return running.run( standalone=standalone, namespace=namespace, priority=priority, peering_name=peering_name, liveness_endpoint=liveness_endpoint, registry=__controls.registry, settings=__controls.settings, stop_flag=__controls.stop_flag, ready_flag=__controls.ready_flag, vault=__controls.vault, )
def run(paths, modules, peering_name, priority, standalone, namespace): """ Start an operator process and handle all the requests. """ cli_login() loaders.preload( paths=paths, modules=modules, ) return running.run( standalone=standalone, namespace=namespace, priority=priority, peering_name=peering_name, )
def run( paths: List[str], modules: List[str], peering_name: Optional[str], priority: int, standalone: bool, namespace: Optional[str], ) -> None: """ Start an operator process and handle all the requests. """ cli_login() loaders.preload( paths=paths, modules=modules, ) return running.run( standalone=standalone, namespace=namespace, priority=priority, peering_name=peering_name, )
def run( __controls: CLIControls, paths: List[str], modules: List[str], peering_name: Optional[str], priority: Optional[int], standalone: Optional[bool], namespaces: Collection[references.NamespacePattern], clusterwide: bool, liveness_endpoint: Optional[str], ) -> None: """ Start an operator process and handle all the requests. """ 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.") if __controls.registry is not None: registries.set_default_registry(__controls.registry) loaders.preload( paths=paths, modules=modules, ) return running.run( standalone=standalone, namespaces=namespaces, clusterwide=clusterwide, priority=priority, peering_name=peering_name, liveness_endpoint=liveness_endpoint, registry=__controls.registry, settings=__controls.settings, stop_flag=__controls.stop_flag, ready_flag=__controls.ready_flag, vault=__controls.vault, )