Skip to content

Commit e097cb4

Browse files
committed
Use os.Exit after error
Signed-off-by: Omer Aplatony <[email protected]>
1 parent ce01f02 commit e097cb4

File tree

1 file changed

+2
-0
lines changed
  • vertical-pod-autoscaler/pkg/utils/vpa

1 file changed

+2
-0
lines changed

vertical-pod-autoscaler/pkg/utils/vpa/api.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"encoding/json"
2222
"errors"
2323
"fmt"
24+
"os"
2425
"strings"
2526
"time"
2627

@@ -91,6 +92,7 @@ func NewVpasLister(vpaClient *vpa_clientset.Clientset, stopChannel <-chan struct
9192
go controller.Run(stopChannel)
9293
if !cache.WaitForCacheSync(make(chan struct{}), controller.HasSynced) {
9394
klog.ErrorS(nil, "Failed to sync VPA cache during initialization")
95+
os.Exit(255)
9496
} else {
9597
klog.InfoS("Initial VPA synced successfully")
9698
}

0 commit comments

Comments
 (0)