Fix: Storage Analysis RBAC permissions and StorageClass API call

This commit is contained in:
2025-10-17 10:09:44 -03:00
parent 42ff7c9f7c
commit 2610e96ca4
2 changed files with 10 additions and 2 deletions

View File

@@ -551,8 +551,9 @@ class K8sClient:
raise RuntimeError("Kubernetes client not initialized")
try:
# List all storage classes
storage_classes = self.v1.list_storage_class(watch=False)
# List all storage classes using the storage API
storage_api = client.StorageV1Api()
storage_classes = storage_api.list_storage_class(watch=False)
return storage_classes.items
except ApiException as e: