Repository navigation
fix(validator): stop copying Service annotations onto the metrics Services - #340
Merged
Merged
Conversation
…vices The -metrics and -metrics-vao ClusterIP Services copied ghost.service.annotations and vao.service.annotations. Those usually hold load balancer annotations, and the AWS Load Balancer Controller builds a load balancer for any Service carrying them, whatever its spec.type. Each metrics Service therefore got its own load balancer exposing the metrics port, and an external-dns hostname annotation was copied along too. Read the metrics Service annotations from a new value, global.metrics.service.annotations (default empty), instead. Bump the chart to 0.10.0.
sam-chron
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The validator chart's
-metricsand-metrics-vaoServices copiedghost.service.annotationsandvao.service.annotations. Those values usually carry load balancer annotations, so on AWS the metrics Services ended up with their own internet-facing load balancers.Why
The AWS Load Balancer Controller decides whether a Service is its job from annotations (
aws-load-balancer-type: externalplus a target type), not fromspec.type. That isIsServiceSupportedinpkg/service/service_utils.goat v3.3.0, with theServiceTypeLoadBalancerOnlyfeature gate off by default. So a ClusterIP Service with those annotations still gets an NLB, and the controller keeps it running.With the copied annotations, every release that set the libp2p NLB annotations also got an NLB per metrics Service, publishing the metrics port. The copied
external-dns.alpha.kubernetes.io/hostnameannotation was wrong on these Services too.What
global.metrics.service.annotations(default{}).ghost.service.annotationsandvao.service.annotationsapply only to the libp2p Services, as before.Upgrade note
Releases that relied on the copy, for example a
prometheus.io/scrapeannotation set onghost.service, need to move it toglobal.metrics.service.annotations.On AWS, once the annotations are gone, the controller cleans up the metrics load balancer, target group and security group through its Service finalizer: the Service still has the finalizer, is no longer supported, so
reconcilebuilds a nil LB and runscleanupLoadBalancerResources. Releases with load balancer deletion protection enabled on that NLB will see the cleanup refused until it is turned off.Testing
helm templatewith ghost and vao Services set to internet-facing NLB annotations, before and after. The only diff is those four annotations gone fromghost-metricsandghost-metrics-vao. The libp2p Services render identically.--set-string global.metrics.service.annotations.prometheus\.io/scrape=truelands on both metrics Services.global.metrics.service=nullstill renders.helm lintwith defaults and with bothci/values files: pass.ct lint --charts charts/validator: pass.Summary by CodeRabbit