Skip to content
This repository was archived by the owner on Apr 27, 2024. It is now read-only.

Commit 9bde87c

Browse files
committed
Fix possible server crash if metrics clientset fail
1 parent bd19742 commit 9bde87c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

environment/kubernetes/pod.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,11 @@ func (e *Environment) Attach(ctx context.Context) error {
8383
// function is to avoid a hang situation when trying to attach to a container.
8484
pollCtx, cancel := context.WithCancel(context.Background())
8585
defer cancel()
86-
defer func() {
87-
e.SetState(environment.ProcessOfflineState)
88-
e.SetStream(nil)
89-
}()
86+
// TODO: If metrics fail pod will be restarted / stopped.
87+
// defer func() {
88+
// e.SetState(environment.ProcessOfflineState)
89+
// e.SetStream(nil)
90+
// }()
9091

9192
go func() {
9293
if err := e.pollResources(pollCtx); err != nil {

0 commit comments

Comments
 (0)