mirror of
https://github.com/clearml/clearml-agent
synced 2025-02-07 05:19:17 +00:00
Add --ssh-server-port to k8s glue service
This commit is contained in:
parent
58eb5fbd5f
commit
ea63e4f66e
@ -39,6 +39,10 @@ def parse_args():
|
|||||||
help="YAML file containing pod template. If provided pod will be scheduled with kubectl apply "
|
help="YAML file containing pod template. If provided pod will be scheduled with kubectl apply "
|
||||||
"and overrides are ignored, otherwise it will be scheduled with kubectl run"
|
"and overrides are ignored, otherwise it will be scheduled with kubectl run"
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--ssh-server-port", type=int, default=0,
|
||||||
|
help="If non-zero, every pod will also start an SSH server on the selected port (default: zero, not active)"
|
||||||
|
)
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
@ -53,7 +57,8 @@ def main():
|
|||||||
k8s = K8sIntegration(
|
k8s = K8sIntegration(
|
||||||
ports_mode=args.ports_mode, num_of_services=args.num_of_services, user_props_cb=user_props_cb,
|
ports_mode=args.ports_mode, num_of_services=args.num_of_services, user_props_cb=user_props_cb,
|
||||||
overrides_yaml=args.overrides_yaml, trains_conf_file=args.pod_trains_conf, template_yaml=args.template_yaml,
|
overrides_yaml=args.overrides_yaml, trains_conf_file=args.pod_trains_conf, template_yaml=args.template_yaml,
|
||||||
extra_bash_init_script=K8sIntegration.get_ssh_server_bash(ssh_port_number=10022)
|
extra_bash_init_script=K8sIntegration.get_ssh_server_bash(
|
||||||
|
ssh_port_number=args.ssh_server_port) if args.ssh_server_port else None
|
||||||
)
|
)
|
||||||
k8s.k8s_daemon(args.queue)
|
k8s.k8s_daemon(args.queue)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user