MCPcopy Create free account
hub / github.com/NVIDIA/gpu-operator / GetClusterWideProxy

Function GetClusterWideProxy

controllers/state_manager.go:229–241  ·  view source on GitHub ↗

GetClusterWideProxy returns cluster wide proxy object setup in OCP

(ctx context.Context)

Source from the content-addressed store, hash-verified

227
228// GetClusterWideProxy returns cluster wide proxy object setup in OCP
229func GetClusterWideProxy(ctx context.Context) (*apiconfigv1.Proxy, error) {
230 cfg := config.GetConfigOrDie()
231 client, err := configv1.NewForConfig(cfg)
232 if err != nil {
233 return nil, err
234 }
235
236 proxy, err := client.Proxies().Get(ctx, "cluster", metav1.GetOptions{})
237 if err != nil {
238 return nil, err
239 }
240 return proxy, nil
241}
242
243func hasMIGConfigLabel(labels map[string]string) bool {
244 if _, ok := labels[migConfigLabelKey]; ok {

Callers 1

applyOCPProxySpecFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected