Ejemplo n.º 1
0
def test_scale_deployment(client, api):
    v1 = MagicMock()
    client.ExtensionsV1beta1Api.return_value = v1

    scale_deployment("fake", 3, "fake_ns")

    body = {"spec": {"replicas": 3}}
    v1.patch_namespaced_deployment_scale.assert_called_with(
        "fake", namespace="fake_ns", body=body)
Ejemplo n.º 2
0
def scale_microservice(name: str,
                       replicas: int,
                       ns: str = "default",
                       secrets: Secrets = None):
    """
    !!!DEPRECATED!!!
    """
    _log_deprecated("scale_microserviceal", "scale_deployment")
    scale_deployment(name, replicas, ns, secrets)