Skip to content

Commit

Permalink
fix: Update liveness probe to avoid problems (kubeflow#833)
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <gaoce@caicloud.io>
  • Loading branch information
gaocegege authored and k8s-ci-robot committed Sep 29, 2019
1 parent d03a551 commit 18c4a8b
Showing 1 changed file with 7 additions and 3 deletions.
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

0 comments on commit 18c4a8b

Please sign in to comment.