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

use /actuator/health for backend health checks #6777

Merged
merged 6 commits into from
Oct 20, 2023

Conversation

BobanL
Copy link
Contributor

@BobanL BobanL commented Oct 19, 2023

DEVOPS PULL REQUEST

Related Issue

  • During the Spring boot 3 update, we noticed that the deployments were failing because the app gateway was checking the health status on the / endpoint. The / endpoint was failing our security rules because we did not also permit access to /index.html. It seems better that we just remove access to / and then use /actuator/health for health check accross the app.

Changes Proposed

  • Add probe to app_gateway for backend services that will check the /actuator/health endpoint
  • Replace all places where the backend's /health was being check with /actuator/health
  • Remove access to / endpoint in security config
  • Remove index.html

Additional Information

  • The /health endpoint only ever returns 200 OK which is not that useful. SpringBoot already gives us more information in actuator so I thought it would be best to just remove it to reduce confusion.
  • App Gateway uses health probes to do backend health checks and app services uses the new endpoint
    Dev5 now:
    image
image image

Dev6:
image

image

image

Testing

  • Verify 401 not authorized on /health and / and 200 OK on /actuator/health
  • Application can be deployed, feel free to redeploy to dev5 (Currently deployed on dev5)

@BobanL BobanL temporarily deployed to dev5 October 19, 2023 22:16 — with GitHub Actions Inactive
@BobanL BobanL temporarily deployed to dev5 October 19, 2023 22:25 — with GitHub Actions Inactive
@BobanL BobanL temporarily deployed to dev5 October 20, 2023 01:41 — with GitHub Actions Inactive
@BobanL BobanL temporarily deployed to dev5 October 20, 2023 01:49 — with GitHub Actions Inactive
@BobanL BobanL marked this pull request as ready for review October 20, 2023 12:41
@BobanL BobanL changed the title Boban/app gateway probe actuator use /actuator/health for backend health checks Oct 20, 2023
zdeveloper
zdeveloper previously approved these changes Oct 20, 2023
Copy link
Contributor

@zdeveloper zdeveloper left a comment

Choose a reason for hiding this comment

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

LGTM! thank you for uncovering and fixing this

fzhao99
fzhao99 previously approved these changes Oct 20, 2023
Copy link
Contributor

@fzhao99 fzhao99 left a comment

Choose a reason for hiding this comment

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

🎉

three cheers for boban

Copy link
Collaborator

@alismx alismx left a comment

Choose a reason for hiding this comment

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

Does /api/actuator/health endpoint work for metabase? I thought the standard metabase healthcheck endpoint was /api/health.

@BobanL BobanL dismissed stale reviews from fzhao99 and zdeveloper via 0083aba October 20, 2023 16:57
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@BobanL BobanL temporarily deployed to dev5 October 20, 2023 17:28 — with GitHub Actions Inactive
@BobanL
Copy link
Contributor Author

BobanL commented Oct 20, 2023

@alismx

Is the plan to remove the static-http(s) probes in your other PR?

No, Static-http probe will stay to check the status of the static site.

Does /api/actuator/health endpoint work for metabase? I thought the standard metabase healthcheck endpoint was /api/health.

Good callout, I have reverted the health check for metabase!

@BobanL BobanL temporarily deployed to dev5 October 20, 2023 17:38 — with GitHub Actions Inactive
@BobanL BobanL requested review from fzhao99 and zdeveloper October 20, 2023 17:44
@BobanL BobanL requested a review from alismx October 20, 2023 17:44
@alismx alismx temporarily deployed to dev2 October 20, 2023 17:49 — with GitHub Actions Inactive
Copy link
Collaborator

@alismx alismx left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for these updates.

@BobanL BobanL added this pull request to the merge queue Oct 20, 2023
@alismx alismx temporarily deployed to dev2 October 20, 2023 17:58 — with GitHub Actions Inactive
Merged via the queue into main with commit e7ffd37 Oct 20, 2023
@BobanL BobanL deleted the boban/app-gateway-probe-actuator branch October 20, 2023 18:18
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.

4 participants