@@ -241,12 +241,12 @@ func getResults(configRest *rest.Config, kubeAPIs model.KubernetesAPIs) *model.R
241241
242242 client , err := dynamic .NewForConfig (configRest )
243243 if err != nil {
244- log .Fatalf ("Failed to create the K8s client while listing Deprecated objects: %s" , err )
244+ log .Printf ("Failed to create the K8s client while listing Deprecated objects: %s" , err )
245245 }
246246
247247 disco , err := discovery .NewDiscoveryClientForConfig (configRest )
248248 if err != nil {
249- log .Fatalf ("Failed to create the K8s Discovery client: %s" , err )
249+ log .Printf ("Failed to create the K8s Discovery client: %s" , err )
250250 }
251251
252252 ResourceAndGV := DiscoverResourceNameAndPreferredGV (disco )
@@ -292,11 +292,11 @@ func getResults(configRest *rest.Config, kubeAPIs model.KubernetesAPIs) *model.R
292292 }
293293
294294 if apierrors .IsForbidden (err ) {
295- log .Fatalf ("Failed to list objects in the cluster. Permission denied! Please check if you have the proper authorization" )
295+ log .Printf ("Failed to list objects in the cluster. Permission denied! Please check if you have the proper authorization" )
296296 }
297297
298298 if err != nil {
299- log .Fatalf ("Failed communicating with k8s while listing objects. \n Error: %v" , err )
299+ log .Printf ("Failed communicating with k8s while listing objects. \n Error: %v" , err )
300300 }
301301
302302 // Now let's see if there's a preferred API containing the same objects
@@ -305,11 +305,11 @@ func getResults(configRest *rest.Config, kubeAPIs model.KubernetesAPIs) *model.R
305305
306306 listPref , err := client .Resource (gvrPreferred ).List (context .TODO (), metav1.ListOptions {})
307307 if apierrors .IsForbidden (err ) {
308- log .Fatalf ("Failed to list objects in the cluster. Permission denied! Please check if you have the proper authorization" )
308+ log .Printf ("Failed to list objects in the cluster. Permission denied! Please check if you have the proper authorization" )
309309 }
310310
311311 if err != nil && ! apierrors .IsNotFound (err ) {
312- log .Fatalf ("Failed communicating with k8s while listing objects. \n Error: %v" , err )
312+ log .Printf ("Failed communicating with k8s while listing objects. \n Error: %v" , err )
313313 }
314314 // If len of the lists is the same we can "assume" they're the same list
315315 if len (list .Items ) == len (listPref .Items ) {
@@ -337,10 +337,10 @@ func getResults(configRest *rest.Config, kubeAPIs model.KubernetesAPIs) *model.R
337337 resourcesList , err := disco .ServerPreferredResources ()
338338 if err != nil {
339339 if apierrors .IsForbidden (err ) {
340- log .Fatalf ("Failed to list Server Resources. Permission denied! Please check if you have the proper authorization" )
340+ log .Printf ("Failed to list Server Resources. Permission denied! Please check if you have the proper authorization" )
341341 }
342342
343- log .Fatalf ("Failed communicating with k8s while discovering server resources. \n Error: %v" , err )
343+ log .Printf ("Failed communicating with k8s while discovering server resources. \n Error: %v" , err )
344344 }
345345 var ignoreObjects ignoreStruct = make (map [string ]struct {})
346346 for _ , resources := range resourcesList {
@@ -405,7 +405,7 @@ func populateCRDGroups(dynClient dynamic.Interface, version string, ignoreStruct
405405 return
406406 }
407407 if err != nil {
408- log .Fatalf ("Failed to connect to K8s cluster to List CRDs: %s" , err )
408+ log .Printf ("Failed to connect to K8s cluster to List CRDs: %s" , err )
409409 }
410410 var empty struct {}
411411 for _ , d := range crdList .Items {
@@ -430,7 +430,7 @@ func populateAPIService(dynClient dynamic.Interface, version string, ignoreStruc
430430 return
431431 }
432432 if err != nil {
433- log .Fatalf ("Failed to connect to K8s cluster to List API Services: %s" , err )
433+ log .Printf ("Failed to connect to K8s cluster to List API Services: %s" , err )
434434 }
435435 var empty struct {}
436436 for _ , d := range apisvcList .Items {
@@ -456,10 +456,10 @@ func DiscoverResourceNameAndPreferredGV(client *discovery.DiscoveryClient) Prefe
456456 return pr
457457 }
458458 if apierrors .IsForbidden (err ) {
459- log .Fatalf ("Failed to list objects for Name discovery. Permission denied! Please check if you have the proper authorization" )
459+ log .Printf ("Failed to list objects for Name discovery. Permission denied! Please check if you have the proper authorization" )
460460 }
461461
462- log .Fatalf ("Failed communicating with k8s while discovering the object preferred name and gv. Error: %v" , err )
462+ log .Printf ("Failed communicating with k8s while discovering the object preferred name and gv. Error: %v" , err )
463463 }
464464
465465 for _ , rl := range resourcelist {
@@ -493,7 +493,7 @@ func getResources(dynClient dynamic.Interface, grk groupResourceKind) (schema.Gr
493493
494494 gv , err := schema .ParseGroupVersion (grk .GroupVersion )
495495 if err != nil {
496- log .Fatalf ("Failed to Parse GroupVersion of Resource: %s" , err )
496+ log .Printf ("Failed to Parse GroupVersion of Resource: %s" , err )
497497 }
498498
499499 gvr := schema.GroupVersionResource {Group : gv .Group , Version : gv .Version , Resource : grk .ResourceName }
@@ -503,11 +503,11 @@ func getResources(dynClient dynamic.Interface, grk groupResourceKind) (schema.Gr
503503 }
504504
505505 if apierrors .IsForbidden (err ) {
506- log .Fatalf ("Failed to list Server Resources of type %s/%s/%s. Permission denied! Please check if you have the proper authorization" , gv .Group , gv .Version , grk .ResourceKind )
506+ log .Printf ("Failed to list Server Resources of type %s/%s/%s. Permission denied! Please check if you have the proper authorization" , gv .Group , gv .Version , grk .ResourceKind )
507507 }
508508
509509 if err != nil {
510- log .Fatalf ("Failed to List objects of type %s/%s/%s. \n Error: %v" , gv .Group , gv .Version , grk .ResourceKind , err )
510+ log .Printf ("Failed to List objects of type %s/%s/%s. \n Error: %v" , gv .Group , gv .Version , grk .ResourceKind , err )
511511 }
512512
513513 return gvr , list
0 commit comments