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

fix: Register healthcheck endpoint for security-proxy-auth #4426

Merged
merged 1 commit into from
Mar 9, 2023
Merged

fix: Register healthcheck endpoint for security-proxy-auth #4426

merged 1 commit into from
Mar 9, 2023

Conversation

bnevis-i
Copy link
Collaborator

@bnevis-i bnevis-i commented Mar 8, 2023

secuity-proxy-auth was not registering /api/v2/ping endpoint (nor version nor config) common endpoints. This was causing the service to appear unhealthy in consul, as the snap was starting the service with --registry flag.

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

Apply edgexfoundry/edgex-compose#350 or run the snap, and verify the service health in consul.

New Dependency Instructions (If applicable)

secuity-proxy-auth was not registering /api/v2/ping endpoint (nor version nor config) common endpoints.  This was causing the service to appear unhealthy in consul, as the snap was starting the service with --registry flag.

Signed-off-by: Bryon Nevis <bryon.nevis@intel.com>
@bnevis-i bnevis-i added the bug Something isn't working label Mar 8, 2023
@bnevis-i bnevis-i added this to the Minnesota milestone Mar 8, 2023
@bnevis-i bnevis-i requested a review from farshidtz March 8, 2023 23:06
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 8, 2023

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
0.0% 0.0% Duplication

Copy link
Member

@farshidtz farshidtz 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.

$ curl http://localhost:59842/api/v2/ping
{"apiVersion":"v2","timestamp":"Thu Mar  9 12:03:37 CET 2023","serviceName":"security-proxy-auth"}
$ snap logs -f edgexfoundry
2023-03-09T11:58:38+01:00 edgexfoundry.security-proxy-auth[56091]: level=INFO ts=2023-03-09T10:58:38.560662433Z app=security-proxy-auth source=message.go:55 msg="This is the proxy authentication microservice"
2023-03-09T11:58:38+01:00 edgexfoundry.security-proxy-auth[56091]: level=INFO ts=2023-03-09T10:58:38.560668754Z app=security-proxy-auth source=message.go:58 msg="Service started in: 1.063406852s"
2023-03-09T11:58:38+01:00 edgexfoundry.security-proxy-auth[56091]: level=WARN ts=2023-03-09T10:58:38.560673453Z app=security-proxy-auth source=bootstrap.go:191 msg="MetricsManager not available. General common service metrics will not be reported. "
2023-03-09T11:58:40+01:00 edgexfoundry.consul[55587]: 2023-03-09T11:58:40.161+0100 [INFO]  agent: Synced node info
2023-03-09T11:58:40+01:00 edgexfoundry.consul[55587]: 2023-03-09T11:58:40.554+0100 [INFO]  agent: Synced check: check=support-notifications
2023-03-09T11:58:41+01:00 edgexfoundry.consul[55587]: 2023-03-09T11:58:41.236+0100 [INFO]  agent: Synced check: check=security-proxy-auth
2023-03-09T11:58:42+01:00 edgexfoundry.consul[55587]: 2023-03-09T11:58:42.816+0100 [INFO]  agent: Synced check: check=core-command
2023-03-09T11:58:45+01:00 edgexfoundry.consul[55587]: 2023-03-09T11:58:45.530+0100 [INFO]  agent: Synced check: check=core-metadata
2023-03-09T11:58:46+01:00 edgexfoundry.consul[55587]: 2023-03-09T11:58:46.428+0100 [INFO]  agent: Synced check: check=core-data
2023-03-09T11:58:48+01:00 edgexfoundry.consul[55587]: 2023-03-09T11:58:48.078+0100 [INFO]  agent: Synced check: check=support-scheduler
2023-03-09T12:01:40+01:00 edgexfoundry.consul[55587]: 2023-03-09T12:01:40.742+0100 [INFO]  agent: Synced check: check=support-scheduler
2023-03-09T12:02:16+01:00 edgexfoundry.consul[55587]: 2023-03-09T12:02:16.993+0100 [INFO]  agent: Synced check: check=core-command
^C

@bnevis-i bnevis-i merged commit ad6eec9 into edgexfoundry:main Mar 9, 2023
@bnevis-i bnevis-i deleted the add-healthcheck-to-proxy-auth branch March 9, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants