Skip to content

Conversation

andrew-farries
Copy link
Contributor

Change the test for deployment availability to check for a configurable number of ready replicas, rather than requiring all replicas in a deployment to be ready.

This PR adds a new (optional) field, minReadyReplicas to configuration files:

- name: "Minio"
  deploymentName: "minio"
  namespace: "default"
  minReadyReplicas: 2 # defaults to 1 if omitted
  apiPath: "/minio"
- name: "nginx"
  deploymentName: "nginx"
  namespace: "default"
  minReadyReplicas: 3 # defaults to 1 if omitted
  apiPath: "/nginx"

The deployment check will then test if at least that number of replicas are in a ready state in order to determine deployment availability.

Fixes #1.

Use it to determine deployment availability; a deployment is ready iff
it has at least minReadyReplicas ready.

This provides a greater level of control over what constitues deployment
availability than requiring all replicas to be in a ready state.
With an example of the new field.
If omitted from a services definition the value should default to 1.
Copy link
Owner

@cjheppell cjheppell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful. Thanks 🙏

@cjheppell cjheppell merged commit 348e18c into cjheppell:main Oct 19, 2020
@andrew-farries andrew-farries deleted the change-deployment-availability-check branch October 19, 2020 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deployments with ready replicas are reported as unavailable
2 participants