Skip to content

Commit e6377b4

Browse files
author
Shubham Chauhan
committed
Do not panic if the pod details are not found
1 parent 035df53 commit e6377b4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gslb/ingestion/gslb.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,9 +677,10 @@ func Initialize() {
677677
// No need to save the Pod metadata, if running AMKO locally.
678678
pod, err := kubeClient.CoreV1().Pods(gslbutils.AVISystem).Get(context.TODO(), os.Getenv("POD_NAME"), metav1.GetOptions{})
679679
if err != nil {
680-
gslbutils.LogAndPanic("error getting AMKO pod details: " + err.Error())
680+
gslbutils.Warnf("Error getting AMKO pod details, %s.", err.Error())
681+
} else {
682+
amkoControlConfig.SaveAMKOPodObjectMeta(pod.DeepCopy())
681683
}
682-
amkoControlConfig.SaveAMKOPodObjectMeta(pod.DeepCopy())
683684
}
684685
amkoControlConfig.SetEventRecorder(gslbutils.AMKOEventComponent, kubeClient)
685686

0 commit comments

Comments
 (0)