struct

RailsApp::Entrypoints::HealthCheck

Inherits YAML::Serializable / JSON::Serializable / Kubernetes::Serializable / Struct / Value / Object

HTTP health checks to ensure 2 things:

  1. New pods must pass these health checks before old pods are terminated
  2. 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 a CrashLoopBackOff state.

Constructors

new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
new(pull : JSON::PullParser)
new(*, __pull_for_json_serializable pull : JSON::PullParser)
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
new(*, path : String = "/", start_after : Int64 | Nil = nil, run_every : Int64 | Nil = nil, failure_threshold : Int64 | Nil = nil)
Source

Instance methods

failure_threshold

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.

path

The path to send a GET request to in order to ensure the pod is healthy.

run_every

The number of seconds between health checks.

start_after

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.