struct RailsApp::Entrypoints::DeploymentStrategy
- RailsApp::Entrypoints::DeploymentStrategy
- Struct
- Value
- Object
Overview
The strategy to use when updating this entrypoint, useful for slow canary rollouts.
When you need to deploy your app safely, it can be best to roll it out slowly over several minutes. If your first few pods fail health checks, the deployment will pause. You can then use kubectl rollout undo deployment
in your deployment script to roll the deployment back.
How those health checks fail is specific to your app, but a useful pattern is for the pod to track the number of failures (for example, the number of HTTP 500s or exceptions raised in background jobs) as a percentage of all units of work since the pod started and, when that number exceeds some threshold (for example, 5%), return a failure response for the health check.
deployment_strategy:
duration_minutes: 10
surge: 5%
max_unavailable: 0%
WARNING This is an experimental property and is subject to change.
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(*, duration_minutes : Int64 | Nil = nil, surge : Nil | String = nil, max_unavailable : Nil | String = nil)
Instance Method Summary
-
#duration_minutes : Int64 | Nil
How long a deployment should take in minutes.
- #max_unavailable : String | Nil
-
#surge : String | Nil
The number or percentage of pods to roll out at a time.