Skip to content

Commit

Permalink
feat: k8s uses native flag (#3478)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanFM authored Sep 25, 2021
1 parent 60b424b commit 39242dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cli/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions jina/peapods/pods/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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", '
Expand Down

0 comments on commit 39242dd

Please sign in to comment.