struct RailsApp::Entrypoints::HealthCheck

Overview

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.

Included Modules

Defined in:

rails_app_operator.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

def self.new(pull : JSON::PullParser) #

def self.new(*, path : String = "/", start_after : Int64 | Nil = nil, run_every : Int64 | Nil = nil, failure_threshold : Int64 | Nil = nil) #

[View source]

Instance Method Detail

def failure_threshold : Int64 | Nil #

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.


def path : String #

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


def run_every : Int64 | Nil #

The number of seconds between health checks.


def 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.