From e6377b4d4b65d5ae43aa5477b55d4d18fb4541a7 Mon Sep 17 00:00:00 2001 From: Shubham Chauhan Date: Wed, 10 Nov 2021 16:22:16 +0530 Subject: [PATCH] Do not panic if the pod details are not found --- gslb/ingestion/gslb.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gslb/ingestion/gslb.go b/gslb/ingestion/gslb.go index d80e5e420..15ae36e3f 100644 --- a/gslb/ingestion/gslb.go +++ b/gslb/ingestion/gslb.go @@ -677,9 +677,10 @@ func Initialize() { // No need to save the Pod metadata, if running AMKO locally. pod, err := kubeClient.CoreV1().Pods(gslbutils.AVISystem).Get(context.TODO(), os.Getenv("POD_NAME"), metav1.GetOptions{}) if err != nil { - gslbutils.LogAndPanic("error getting AMKO pod details: " + err.Error()) + gslbutils.Warnf("Error getting AMKO pod details, %s.", err.Error()) + } else { + amkoControlConfig.SaveAMKOPodObjectMeta(pod.DeepCopy()) } - amkoControlConfig.SaveAMKOPodObjectMeta(pod.DeepCopy()) } amkoControlConfig.SetEventRecorder(gslbutils.AMKOEventComponent, kubeClient)