struct RailsApp::Entrypoints::HealthCheck
- RailsApp::Entrypoints::HealthCheck
- Struct
- Value
- Object
Overview
HTTP health checks to ensure 2 things:
- New pods must pass these health checks before old pods are terminated
- Pods will be checked on the
#run_every
interval to make sure it's still alive. If it fails#failure_threshold
times, the pod will be restarted. If it continues to fail, it will enter aCrashLoopBackOff
state.
Included Modules
- JSON::Serializable
- Kubernetes::Serializable
- YAML::Serializable
Defined in:
rails_app_operator.crConstructors
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : JSON::PullParser)
- .new(*, path : String = "/", start_after : Int64 | Nil = nil, run_every : Int64 | Nil = nil, failure_threshold : Int64 | Nil = nil)
Instance Method Summary
-
#failure_threshold : Int64 | Nil
The number of health check failures that will be tolerated before the pod is restarted.
-
#path : String
The path to send a
GET
request to in order to ensure the pod is healthy. -
#run_every : Int64 | Nil
The number of seconds between health checks.
-
#start_after : Int64 | Nil
The number of seconds after which health checks will begin — useful when your pods take several seconds to start so they don't end up being restarted simply because they took too long.
Constructor Detail
Instance Method Detail
The number of health check failures that will be tolerated before the pod is restarted. Generally speaking, this should never be 1
— failures can happen for all kinds of reasons and a pod restart may terminate in-flight work.
The number of seconds after which health checks will begin — useful when your pods take several seconds to start so they don't end up being restarted simply because they took too long.