Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update liveness probe to avoid problems #833

Merged
merged 1 commit into from
Sep 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions pkg/controller.v1alpha3/suggestion/composer/composer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ import (

const (
defaultInitialDelaySeconds = 10
defaultPeriod = 10
defaultPeriodForReady = 10
defaultPeriodForLive = 120
defaultFailureThreshold = 12
// Ref https://github.com/grpc-ecosystem/grpc-health-probe/
defaultGRPCHealthCheckProbe = "/bin/grpc_health_probe"
)
Expand Down Expand Up @@ -134,7 +136,7 @@ func (g *General) desiredContainer(s *suggestionsv1alpha3.Suggestion) (*corev1.C
},
},
InitialDelaySeconds: defaultInitialDelaySeconds,
PeriodSeconds: defaultPeriod,
PeriodSeconds: defaultPeriodForReady,
}
c.LivenessProbe = &corev1.Probe{
Handler: corev1.Handler{
Expand All @@ -146,8 +148,10 @@ func (g *General) desiredContainer(s *suggestionsv1alpha3.Suggestion) (*corev1.C
},
},
},
// Ref https://srcco.de/posts/kubernetes-liveness-probes-are-dangerous.html
InitialDelaySeconds: defaultInitialDelaySeconds,
PeriodSeconds: defaultPeriod,
PeriodSeconds: defaultPeriodForLive,
FailureThreshold: defaultFailureThreshold,
}
return c, nil
}
Expand Down