From 39242dd8f4293b388a05c9fd31d275acb7260562 Mon Sep 17 00:00:00 2001 From: Joan Fontanals Date: Sat, 25 Sep 2021 09:35:21 +0200 Subject: [PATCH] feat: k8s uses native flag (#3478) --- cli/api.py | 6 +++--- jina/peapods/pods/k8s.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/api.py b/cli/api.py index 319ae3983eb9e..1d5260c689ebd 100644 --- a/cli/api.py +++ b/cli/api.py @@ -41,10 +41,10 @@ def executor_native(args: 'Namespace'): from jina.peapods.runtimes.zmq.zed import ZEDRuntime from jina.peapods.runtimes.grpc import GRPCDataRuntime - if args.runtime_cls == 'ZEDRuntime': - runtime_cls = ZEDRuntime - elif args.runtime_cls == 'GRPCDataRuntime': + if args.runtime_cls == 'GRPCDataRuntime' or args.grpc_data_requests: runtime_cls = GRPCDataRuntime + elif args.runtime_cls == 'ZEDRuntime': + runtime_cls = ZEDRuntime else: raise RuntimeError( f' runtime_cls {args.runtime_cls} is not supported with `--native` argument. `ZEDRuntime` and `GRPCDataRuntime` are supported' diff --git a/jina/peapods/pods/k8s.py b/jina/peapods/pods/k8s.py index 5df9af5c02a0d..f0bd8b2b175fd 100644 --- a/jina/peapods/pods/k8s.py +++ b/jina/peapods/pods/k8s.py @@ -76,7 +76,6 @@ def _deploy_gateway(self): container_cmd='["jina"]', container_args=f'["gateway", ' f'"--grpc-data-requests", ' - f'"--runtime-cls", "GRPCDataRuntime", ' f'{kubernetes_deployment.get_cli_params(self.args, ("pod_role",))}]', logger=JinaLogger(f'deploy_{self.name}'), replicas=1, @@ -127,7 +126,8 @@ def _construct_runtime_container_args( deployment_args, uses, uses_metas, uses_with_string ): container_args = ( - f'["pea", ' + f'["executor", ' + f'"--native", ' f'"--uses", "{uses}", ' f'"--grpc-data-requests", ' f'"--runtime-cls", "GRPCDataRuntime", '