From e097cb47eff4badf43c18c643b05746e3206ba15 Mon Sep 17 00:00:00 2001 From: Omer Aplatony Date: Sun, 29 Dec 2024 10:43:53 +0200 Subject: [PATCH] Use os.Exit after error Signed-off-by: Omer Aplatony --- vertical-pod-autoscaler/pkg/utils/vpa/api.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vertical-pod-autoscaler/pkg/utils/vpa/api.go b/vertical-pod-autoscaler/pkg/utils/vpa/api.go index 14c98cf2032..949cdc67402 100644 --- a/vertical-pod-autoscaler/pkg/utils/vpa/api.go +++ b/vertical-pod-autoscaler/pkg/utils/vpa/api.go @@ -21,6 +21,7 @@ import ( "encoding/json" "errors" "fmt" + "os" "strings" "time" @@ -91,6 +92,7 @@ func NewVpasLister(vpaClient *vpa_clientset.Clientset, stopChannel <-chan struct go controller.Run(stopChannel) if !cache.WaitForCacheSync(make(chan struct{}), controller.HasSynced) { klog.ErrorS(nil, "Failed to sync VPA cache during initialization") + os.Exit(255) } else { klog.InfoS("Initial VPA synced successfully") }