From 8ec1c682471df2829335889d5ed02683998e153e Mon Sep 17 00:00:00 2001 From: merqri <85676486+merqri@users.noreply.github.com> Date: Mon, 3 Jun 2024 13:05:36 +0300 Subject: [PATCH] change V1Subject to RbacV1Subject in k8s.py This change fix: Error: module 'kubernetes.client' has no attribute 'V1Subject' --- enterprise_gateway/services/processproxies/k8s.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enterprise_gateway/services/processproxies/k8s.py b/enterprise_gateway/services/processproxies/k8s.py index 00e6bf17..e5c8efe5 100644 --- a/enterprise_gateway/services/processproxies/k8s.py +++ b/enterprise_gateway/services/processproxies/k8s.py @@ -349,7 +349,7 @@ def _create_role_binding(self, namespace: str, service_account_name: str) -> Non binding_role_ref = client.V1RoleRef( api_group="", kind="ClusterRole", name=kernel_cluster_role ) - binding_subjects = client.V1Subject( + binding_subjects = client.RbacV1Subject( api_group="", kind="ServiceAccount", name=service_account_name, namespace=namespace )