From d9cacde46aa090e617437e9ae83bb24fb0f83fc6 Mon Sep 17 00:00:00 2001 From: lucklypriyansh-2 Date: Mon, 9 Oct 2023 14:32:35 +0530 Subject: [PATCH] fix auth while getting gpu classes --- internal/provider/provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/provider/provider.go b/internal/provider/provider.go index b248074..443719d 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -447,7 +447,7 @@ func (p *SaladCloudProvider) getGPUClasses(pod *corev1.Pod) ([]string, error) { saladClientGpuIds = append(saladClientGpuIds, gpuCleaned) } else { if gpuClasses == nil { - classes, _, err := p.apiClient.OrganizationDataAPI.ListGpuClasses(context.Background(), p.inputVars.OrganizationName).Execute() + classes, _, err := p.apiClient.OrganizationDataAPI.ListGpuClasses(p.contextWithAuth(), p.inputVars.OrganizationName).Execute() if err != nil { log.G(context.Background()).Errorf("Failed to get gpuClasses ", err) return nil, err