def get_runtime_yamls(self) -> List[Dict]:
    cargs = copy.copy(self.deployment_args)
    image_name = self._get_image_name(cargs.uses)
    image_name_uses_before = (self._get_image_name(cargs.uses_before) if (hasattr(cargs, 'uses_before') and cargs.uses_before) else None)
    image_name_uses_after = (self._get_image_name(cargs.uses_after) if (hasattr(cargs, 'uses_after') and cargs.uses_after) else None)
    container_args = self._get_container_args(cargs, pod_type=self.pod_type)
    container_args_uses_before = None
    if getattr(cargs, 'uses_before', False):
        uses_before_cargs = copy.copy(cargs)
        uses_before_cargs.uses = cargs.uses_before
        uses_before_cargs.name = f'{self.common_args.name}/uses-before'
        uses_before_cargs.port = K8sGrpcConnectionPool.K8S_PORT_USES_BEFORE
        uses_before_cargs.uses_before_address = None
        uses_before_cargs.uses_after_address = None
        uses_before_cargs.uses_before = None
        uses_before_cargs.uses_after = None
        uses_before_cargs.uses_with = None
        uses_before_cargs.uses_metas = None
        uses_before_cargs.env = None
        uses_before_cargs.connection_list = None
        uses_before_cargs.runtime_cls = 'WorkerRuntime'
        uses_before_cargs.pod_role = PodRoleType.WORKER
        uses_before_cargs.polling = None
        container_args_uses_before = self._get_container_args(uses_before_cargs, PodRoleType.WORKER)
    container_args_uses_after = None
    if getattr(cargs, 'uses_after', False):
        uses_after_cargs = copy.copy(cargs)
        uses_after_cargs.uses = cargs.uses_after
        uses_after_cargs.name = f'{self.common_args.name}/uses-after'
        uses_after_cargs.port = K8sGrpcConnectionPool.K8S_PORT_USES_AFTER
        uses_after_cargs.uses_before_address = None
        uses_after_cargs.uses_after_address = None
        uses_after_cargs.uses_before = None
        uses_after_cargs.uses_after = None
        uses_after_cargs.uses_with = None
        uses_after_cargs.uses_metas = None
        uses_after_cargs.env = None
        uses_after_cargs.connection_list = None
        uses_after_cargs.runtime_cls = 'WorkerRuntime'
        uses_after_cargs.pod_role = PodRoleType.WORKER
        uses_after_cargs.polling = None
        container_args_uses_after = self._get_container_args(uses_after_cargs, PodRoleType.WORKER)
    return kubernetes_deployment.get_deployment_yamls(self.dns_name, namespace=self.k8s_namespace, image_name=image_name, image_name_uses_after=image_name_uses_after, image_name_uses_before=image_name_uses_before, container_cmd='["jina"]', container_cmd_uses_before='["jina"]', container_cmd_uses_after='["jina"]', container_args=f'{container_args}', container_args_uses_before=container_args_uses_before, container_args_uses_after=container_args_uses_after, replicas=self.num_replicas, pull_policy='IfNotPresent', jina_deployment_name=self.jina_deployment_name, pod_type=self.pod_type, shard_id=self.shard_id, env=cargs.env, gpus=(cargs.gpus if hasattr(cargs, 'gpus') else None))
def get_runtime_yamls(self) -> List[Dict]:
    cargs = copy.copy(self.deployment_args)
    image_name = self._get_image_name(cargs.uses)
    image_name_uses_before = (self._get_image_name(cargs.uses_before) if (hasattr(cargs, 'uses_before') and cargs.uses_before) else None)
    image_name_uses_after = (self._get_image_name(cargs.uses_after) if (hasattr(cargs, 'uses_after') and cargs.uses_after) else None)
    container_args = self._get_container_args(cargs, pod_type=self.pod_type)
    container_args_uses_before = None
    if getattr(cargs, 'uses_before', False):
        uses_before_cargs = copy.copy(cargs)
        uses_before_cargs.uses = cargs.uses_before
        uses_before_cargs.name = f'{self.common_args.name}/uses-before'
        uses_before_cargs.port = K8sGrpcConnectionPool.K8S_PORT_USES_BEFORE
        uses_before_cargs.uses_before_address = None
        uses_before_cargs.uses_after_address = None
        uses_before_cargs.uses_before = None
        uses_before_cargs.uses_after = None
        uses_before_cargs.uses_with = None
        uses_before_cargs.uses_metas = None
        uses_before_cargs.env = None
        uses_before_cargs.connection_list = None
        uses_before_cargs.runtime_cls = 'WorkerRuntime'
        uses_before_cargs.pod_role = PodRoleType.WORKER
        uses_before_cargs.polling = None
        container_args_uses_before = self._get_container_args(uses_before_cargs, PodRoleType.WORKER)
    container_args_uses_after = None
    if getattr(cargs, 'uses_after', False):
        uses_after_cargs = copy.copy(cargs)
        uses_after_cargs.uses = cargs.uses_after
        uses_after_cargs.name = f'{self.common_args.name}/uses-after'
        uses_after_cargs.port = K8sGrpcConnectionPool.K8S_PORT_USES_AFTER
        uses_after_cargs.uses_before_address = None
        uses_after_cargs.uses_after_address = None
        uses_after_cargs.uses_before = None
        uses_after_cargs.uses_after = None
        uses_after_cargs.uses_with = None
        uses_after_cargs.uses_metas = None
        uses_after_cargs.env = None
        uses_after_cargs.connection_list = None
        uses_after_cargs.runtime_cls = 'WorkerRuntime'
        uses_after_cargs.pod_role = PodRoleType.WORKER
        uses_after_cargs.polling = None
        container_args_uses_after = self._get_container_args(uses_after_cargs, PodRoleType.WORKER)
    return kubernetes_deployment.get_deployment_yamls(self.dns_name, namespace=self.k8s_namespace, image_name=image_name, image_name_uses_after=image_name_uses_after, image_name_uses_before=image_name_uses_before, container_cmd='["jina"]', container_cmd_uses_before='["jina"]', container_cmd_uses_after='["jina"]', container_args=f'{container_args}', container_args_uses_before=container_args_uses_before, container_args_uses_after=container_args_uses_after, replicas=self.num_replicas, pull_policy='IfNotPresent', jina_deployment_name=self.jina_deployment_name, pod_type=self.pod_type, shard_id=self.shard_id, env=cargs.env, gpus=(cargs.gpus if hasattr(cargs, 'gpus') else None))