diff options
author | 2021-07-18 04:08:15 +0100 | |
---|---|---|
committer | 2021-07-18 04:08:15 +0100 | |
commit | 68fd0dc06341f32f42aa56c6c182676a5d1771f5 (patch) | |
tree | 77fb4919ef0aaf8d7128acdc4d3f85621a1ad428 /arthur/apis/kubernetes/deployments.py | |
parent | refactor: move certificates to separate API module (diff) |
refactor: update variable naming of deployments API
Diffstat (limited to 'arthur/apis/kubernetes/deployments.py')
-rw-r--r-- | arthur/apis/kubernetes/deployments.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arthur/apis/kubernetes/deployments.py b/arthur/apis/kubernetes/deployments.py index 8d667b0..f7b4d5c 100644 --- a/arthur/apis/kubernetes/deployments.py +++ b/arthur/apis/kubernetes/deployments.py @@ -9,8 +9,8 @@ from kubernetes_asyncio.client.models import V1DeploymentList async def restart_deployment(deployment: str, namespace: str) -> None: """Patch a deployment with a custom annotation to trigger redeployment.""" async with ApiClient() as api: - v1 = client.AppsV1Api(api) - await v1.patch_namespaced_deployment( + api = client.AppsV1Api(api) + await api.patch_namespaced_deployment( name=deployment, namespace=namespace, body={ @@ -33,5 +33,5 @@ async def restart_deployment(deployment: str, namespace: str) -> None: async def list_deployments(namespace: str) -> V1DeploymentList: """Query the Kubernetes API for a list of deployments in the provided namespace.""" async with ApiClient() as api: - v1 = client.AppsV1Api(api) - return await v1.list_namespaced_deployment(namespace=namespace) + api = client.AppsV1Api(api) + return await api.list_namespaced_deployment(namespace=namespace) |