Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readiness health checks story 7 respect defined interval #3385

Conversation

mariash
Copy link
Member

@mariash mariash commented Aug 10, 2023

This PR is part of a larger effort detailed here in this Cloud Controller PR and here in this CFF RFC.

In this story

Health check interval for both liveness and readiness health checks right now is configured in diego-release. We want to make it configurable in the app manifest so that app developers have more control over the health check process of the app.

  • New manifest parameters:
    • health-check-interval
    • readiness-health-check-interval
  • Validating health-check-interval and readiness-health-check-interval is an integer > 0
  • Saving health-check-interval and readiness-health-check-interval in CC DB
  • Adding them to Diego LRP
  • Including them in manifest endpoints
  • Including them in process endpoints
  • Coping them overwhen making new deploying process during rolling deploy
  • Added examples to API docs

Acceptance Setup

For liveness health check:

  1. Configure health-check-interval in app manifest:
health-check-interval: 10
  1. ssh to app and see that HC process is running with --liveness-interval
  2. GET /v3/apps/:guid/manifest returns health-check-interval: 10
  3. GET /v3/processes/:guid returns health-check-interval: 10

For readiness health check:

  1. Configure readiness-health-check-interval in app manifest:
readiness-health-check-interval: 10
  1. ssh to app and see that HC process is running with --readiness-interval
  2. GET /v3/apps/:guid/manifest returns readiness-health-check-interval: 10
  3. GET /v3/processes/:guid returns readiness-health-check-interval: 10

jrussett and others added 11 commits August 10, 2023 17:29
Signed-off-by: Maria Shaldybin <[email protected]>
Signed-off-by: Maria Shaldybin <[email protected]>
@moleske moleske merged commit 5b95cf8 into cloudfoundry:readiness-health-checks Aug 14, 2023
moleske pushed a commit that referenced this pull request Aug 17, 2023
* Add readiness health check properties to app manifest
* Set readiness health check properties on process

Now when a user supplies the readiness health check properties via the
app manifest, the values are stored on the process, and saved in the
database.

* correctly default to process for readiness_health_check_type
* Refactor: add base health check policy class
* Set readiness health check properties on LRP
* Refactor: app recipe builder

now with more ruby style!

* Fix: readiness hcs default to process not empty
* Add readiness health check properties to /v3/apps/:guid/manifest
* Return diff for readiness check properties in /v3/spaces/:space_guid/manifest_diff
* Readiness health checks story 5 processes (#3370)
* Add readiness health check properties to process endpoints

GET /v3/processes
GET /v3/processes/:guid
PATCH /v3/processes/:guid
GET /v3/apps/:guid/processes
GET /v3/apps/:guid/processes/:type
PATCH /v3/apps/:guid/processes/:type
POST /v3/apps/:guid/processes/:type/actions/scale

* Add readiness health check examples to API docs
* Rolling deploy respects readiness health check (#3373)

ActualLRP has routable set to true once readiness health check succeeds.
In case if routable is not provided instance reporter sets it to true
for backwards compatibility.

* Readiness health checks story 7 respect defined interval (#3385)
* Validate health_check_interval/readiness_health_check_interval in the manifest
* Save health_check_interval/readiness_health_check_interval in database
* Regenerate bbs protobuf models
* Pass health_check_interval/readiness_health_check_interval in LRP
* Display health_check_interval/readiness_health_check_interval in manifest
* Add health-check-interval/readiness-health-check-interval to manifest diff
* Add health-check-interval/readiness-health-check-interval to manifest docs
* Add health_check_interval/readiness_health_check_interval to /v3/processes
* Add health_check_interval/readiness_health_check_interval to API docs
* Copy health_check_interval/readiness_health_check_interval during rolling deploy

* add need readiness check doc to index
* Disable rubocop cyclomaticcomplexity for some functions

- these functions are idomatic ruby with no nested if statements
- rubocop is just counting if statements so no current concerns
- please review if this changes

* Do not use text:true on readiness health check to process

- see https://github.com/cloudfoundry/cloud_controller_ng/wiki/CAPI-Migration-Style-Guide#always-specify-a-size-for-a-string-and-dont-use-text

Signed-off-by: Marc Paquette <[email protected]>
Signed-off-by: Amelia Downs <[email protected]>
Signed-off-by: Renee Chu <[email protected]>
Signed-off-by: Maria Shaldybin <[email protected]>
Signed-off-by: Josh Russett <[email protected]>
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.

5 participants