Skip to content

Conversation

@jonathanio
Copy link
Contributor

Refactor the application service configuration to split the web and metrics endpoints onto their own ports and update the Helm configuration to facilitate this.

This should allow the health and monitoring URIs to be served off a dedicated metrics port, accessible from any public location, and allow the cluster to privately access information about the service while the main web endpoint serves all normal functions through the Ingress
configurations.

Checklist

Before raising or requesting a review of the pull request, please check and confirm the following items have been performed, where possible:

  • I have performed a self-review of my code and run any tests locally to check
  • I have added tests that prove that any changes are effective and work correctly
  • I have made corresponding changes, as needed, to the repository documentation
  • Each commit in, and this pull request, have meaningful subjects and bodies for context
  • I have added release/..., type/..., and changes/... labels, as needed, to this pull request

Refactor the application service configuration to split the web and
metrics endpoints onto their own ports, and update the Helm
configuration to facilitate this.

This should allow the health and monitoring URIs to be served off a
dedicated port, accessible from any public location, and allow the
cluster to privately access information about the service, while the
main web endpoint serves all normal functions through the Ingress
configurations.
Do not add the prefix v to all tags for the container, only prefix it to
the fallback tag, being the application version set in the Chart.
Rename the web configuration key in the root of the serve configuration
to endpoints, as this will handle multiple services (i.e. web and
metrics) and not just the web service now.
Enable the configuration of the service timeouts for gracefully shutting
down the web service, as well as the metrics service.
@jonathanio jonathanio added priority/normal This is a normal-priority issue or pull request release/update An update to an existing feature is made with this pull request type/refactoring A refactoring of existing code update/configuration Update with changes to tool or service configuratons update/go Update with changes to Go files or applications labels Aug 14, 2024
@jonathanio jonathanio self-assigned this Aug 14, 2024
@codecov
Copy link

codecov bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 297 lines in your changes missing coverage. Please review.

Project coverage is 10.16%. Comparing base (ab67c09) to head (f9da282).

Files Patch % Lines
internal/serve/metrics/main.go 0.00% 72 Missing ⚠️
internal/serve/web/main.go 0.00% 67 Missing ⚠️
internal/cmd/serve.go 0.00% 58 Missing ⚠️
internal/serve/middleware/metrics.go 0.00% 54 Missing ⚠️
internal/serve/metrics/healthz/main.go 0.00% 16 Missing ⚠️
internal/serve/middleware/logger.go 0.00% 13 Missing ⚠️
internal/serve/middleware/prometheus.go 0.00% 11 Missing ⚠️
internal/serve/web/ping/main.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #7      +/-   ##
==========================================
- Coverage   14.79%   10.16%   -4.64%     
==========================================
  Files          13       17       +4     
  Lines         338      492     +154     
==========================================
  Hits           50       50              
- Misses        288      442     +154     
Flag Coverage Δ
unit-tests 10.16% <0.00%> (-4.64%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
internal/serve/metrics/alive/main.go 0.00% <ø> (ø)
internal/serve/web/ping/main.go 0.00% <0.00%> (ø)
internal/serve/middleware/prometheus.go 0.00% <0.00%> (ø)
internal/serve/middleware/logger.go 0.00% <0.00%> (ø)
internal/serve/metrics/healthz/main.go 0.00% <0.00%> (ø)
internal/serve/middleware/metrics.go 0.00% <0.00%> (ø)
internal/cmd/serve.go 0.00% <0.00%> (ø)
internal/serve/web/main.go 0.00% <0.00%> (ø)
internal/serve/metrics/main.go 0.00% <0.00%> (ø)

@jonathanio jonathanio merged commit 002491e into main Aug 14, 2024
@jonathanio jonathanio deleted the split-metrics-service branch August 14, 2024 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/normal This is a normal-priority issue or pull request release/update An update to an existing feature is made with this pull request type/refactoring A refactoring of existing code update/configuration Update with changes to tool or service configuratons update/go Update with changes to Go files or applications

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants