Repository navigation
feat(discovery): describe workload endpoints as locators - #103
Merged
Merged
Conversation
Use github.com/agntcy/dir/api and client at cc5b967 (agntcy/dir#2302), which adds Workload locators. The API now requires Go 1.27.1 and k8s.io/apimachinery v0.37.1, so the Go toolchain (Taskfile, builder images) and k8s.io/api and client-go move along. To be replaced by the released tag before release. Signed-off-by: András Jáky <[email protected]>
Signed-off-by: András Jáky <[email protected]>
Signed-off-by: András Jáky <[email protected]>
Signed-off-by: András Jáky <[email protected]>
Signed-off-by: András Jáky <[email protected]>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
The commit on dir main that contains the workload locators (agntcy/dir#2302) and the workload filters (agntcy/dir#2332). Signed-off-by: András Jáky <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
A2A probing ignores declared locator protocols, and the claimed Docker inspect host-mode coverage is missing.
2 open findings
What changed in this PR
Migrates workload discovery from deprecated address/port fields to protocol-aware endpoint locators across runtimes, storage, and resolution.
Changes:
- Adds shared TCP locator generation and updates Docker, Kubernetes, and process discovery.
- Updates A2A probing, CRD schema, tests, and documentation for locators.
- Bumps Directory dependencies and the Go toolchain to 1.27.1.
| File | Description |
|---|---|
utils/go.mod |
Updates Go version. |
Taskfile.yml |
Updates shared Go toolchain version. |
store/go.sum |
Refreshes store dependency checksums. |
store/go.mod |
Updates Directory and Kubernetes dependencies. |
store/crd/store.go |
Adapts CR construction to updated API types. |
server/go.sum |
Refreshes server dependency checksums. |
server/go.mod |
Updates Directory and Kubernetes dependencies. |
server/Dockerfile |
Updates builder image. |
install/chart/templates/discovery.agntcy.io_discoveredworkloads.yaml |
Adds locator schema and print column. |
docs/dir-component-runtime-discovery.md |
Documents locator-based discovery. |
discovery/types/locator.go |
Adds shared TCP locator generation. |
discovery/types/locator_test.go |
Tests sorting, deduplication, and IPv6. |
discovery/runtime/process/descriptor.go |
Accepts and converts process locators. |
discovery/runtime/process/descriptor_test.go |
Tests descriptor validation and conversion. |
discovery/runtime/k8s/adapter.go |
Emits Kubernetes workload locators. |
discovery/runtime/k8s/adapter_test.go |
Tests pod and service locators. |
discovery/runtime/docker/adapter.go |
Emits Docker workload locators. |
discovery/runtime/docker/adapter_test.go |
Tests Docker locator conversion. |
discovery/resolver/a2a/resolver.go |
Probes HTTP origins from locators. |
discovery/resolver/a2a/resolver_test.go |
Tests locator-based A2A resolution. |
discovery/go.sum |
Refreshes discovery dependency checksums. |
discovery/go.mod |
Updates API, client, and transitive dependencies. |
discovery/Dockerfile |
Updates builder image. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The A2A resolver chose what to probe from the locator URL's scheme, so a locator declared as slim (or grpc) with an http:// URL was probed. It now decides from the declared protocol: tcp tries http and https, http and https use that scheme, and every other protocol is skipped. Also cover inspectToWorkload's host-mode branch, which derives locators from the published port bindings. Signed-off-by: András Jáky <[email protected]>
akijakya
enabled auto-merge (squash)
October 14, 2026 08:43
ramizpolic
approved these changes
Oct 14, 2026
This was referenced Oct 14, 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.


Workloads now describe their endpoints as
locators(protocol + full URL) instead of the deprecatedaddressesandports, step 2 of agntcy/dir#2299.Changes
tcp://<address>:<port>locator per reachable address and exposed port (sorted, IPv6 bracketed, duplicates removed), via a sharedtypes.TCPLocatorshelper.locators([{"protocol": "slim", "url": "slim://org/ns/agent"}]), validated for protocol, URL and scheme.addresses/portsstay accepted and becometcplocators. Theorg.agntcy/locatorannotation convention is dropped.tcp→ http and https,http/https→ their own scheme, other protocols are skipped.addresses/portsare no longer set anywhere (staticcheck SA1019 clean).locatorsin the schema (so the CRD store doesn't prune it) and aLocatorsprint column;Addresses/Portsmove to wide output.Dependency bump
The dir API at that commit (first cc5b967, now 9252429b) requires Go 1.27.1 and
k8s.io/apimachineryv0.37.1, and the olddir/clientv1.7.0 no longer compiles against it. So this also moves the Go toolchain (Taskfile, builder images) to 1.27.1,k8s.io/api/client-goto v0.37.1, anddir/clientto the same commit, plus one Go 1.27 lint modernization instore/crd.Testing
tcplocator, the SLIM agent is listed with its locator and not probed.Closes #102