aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/apis/kubernetes/deployments.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-02-02 16:12:08 +0000
committerGravatar Chris Lovering <[email protected]>2024-02-02 16:12:08 +0000
commit5fd87154cbf326068b181f366286a635a7eaa119 (patch)
tree709446f42d8981e83bca8b17f4fda280d477c7e2 /arthur/apis/kubernetes/deployments.py
parentAdd ruff isort configuration (diff)
Enable all ruff rules
Diffstat (limited to 'arthur/apis/kubernetes/deployments.py')
-rw-r--r--arthur/apis/kubernetes/deployments.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/arthur/apis/kubernetes/deployments.py b/arthur/apis/kubernetes/deployments.py
index 305f4cf..b3aee83 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:
- api = client.AppsV1Api(api)
+ async with ApiClient() as api_client:
+ api = client.AppsV1Api(api_client)
await api.patch_namespaced_deployment(
name=deployment,
namespace=namespace,
@@ -31,6 +31,6 @@ 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:
- api = client.AppsV1Api(api)
+ async with ApiClient() as api_client:
+ api = client.AppsV1Api(api_client)
return await api.list_namespaced_deployment(namespace=namespace)