Repository navigation
Conversation
Implements Consul as a resource discovery provider for Cloudprober, allowing probe targets to be discovered dynamically from a Consul service catalog. Uses the Consul HTTP REST API directly (net/http + encoding/json) without taking a dependency on github.com/hashicorp/consul/api, following the same pattern as the Kubernetes RDS provider. Features: - Discover services, health checks, and nodes from Consul - Filter by service name (regex), tags, health status, and metadata - Propagate Consul service/node metadata as labels for use with @target.label.KEY@ in probe additional_label configs - Respect standard Consul environment variables: CONSUL_HTTP_ADDR, CONSUL_HTTP_TOKEN, CONSUL_HTTP_TOKEN_FILE, CONSUL_DATACENTER, CONSUL_HTTP_SSL - Kubernetes auto-discovery: CONSUL_HTTP_ADDR=auto-discover resolves Consul via Kubernetes DNS (customizable via CONSUL_K8S_* vars) - Periodic refresh (re_eval_sec, default 60s) - Register with the RDS server as the "consul" provider Contributes to cloudprober#1063 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The consul surfacer was replaced by the CLI-flag-driven registration module (internal/registration/consul). Remove the examples/surfacers/consul/ directory which referenced the deleted surfacer, and drop the broken link to it from the targets/consul README. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Contributor
|
I think this PR anyway pulled in many unrelated changes and some suggestions of it have been implemented through other PRs in a slightly different way:
|
manugarg
added a commit
that referenced
this pull request
Sep 13, 2026
* [rds/kubernetes] Add a namespace label to discovered resources Resources for all four kinds (pods, services, endpoints, ingresses) now carry a "namespace" label, so probes can use it through @target.label.namespace@ and filter on it with labels.namespace. An object label named "namespace" takes precedence. Picks up the namespace label part of #1274. * [rds.kubernetes] Don't overwrite object labels named node or pod in endpoints Match namespace, fqdn and relative_url: if the endpoints object already has a node or pod label, keep its value.
Contributor
Author
|
Agreed, #1255 was a related PR that made this PR redundant |
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.
Plumb through the ability to set
re_eval_secon any rds mechanism consistently, not just for a subset of themInclude the
namespacemetadata in k8s service discovery results