jina.orchestrate.deployments.config.helper module

jina.orchestrate.deployments.config.helper.get_image_name(uses)[source]

The image can be provided in different formats by the user. This function converts it to an image name which can be understood by k8s. It uses the Hub api to get the image name and the latest tag on Docker Hub.

If you don’t want to rebuild image on Jina Hub, you can set JINA_HUB_NO_IMAGE_REBUILD environment variable.

Parameters

uses (str) – image name

Return type

str

Returns

normalized image name

jina.orchestrate.deployments.config.helper.to_compatible_name(name)[source]

Converts the deployment name to a valid name for K8s and docker compose.

Parameters

name (str) – name of the deployment

Return type

str

Returns

compatible name

jina.orchestrate.deployments.config.helper.get_base_executor_version()[source]

Get the version of jina to be used :return: the version tag

jina.orchestrate.deployments.config.helper.construct_runtime_container_args(cargs, uses_metas, uses_with, pod_type)[source]

Construct a set of Namespace arguments into a list of arguments to pass to a container entrypoint :param cargs: The namespace arguments :param uses_metas: The uses_metas to override :param uses_with: The uses_with to override :param pod_type: The pod_type :return: Arguments to pass to container

jina.orchestrate.deployments.config.helper.validate_uses(uses)[source]

Validate uses argument

Parameters

uses (str) – uses argument

Returns

boolean indicating whether is a valid uses to be used in K8s or docker compose