-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implement MCP discovery registry and consolidated RESTful routes #8
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
Changes from all commits
87cd4f4
6d86bc9
5564962
55e18d6
a37bb73
6ddb6ba
d6dff68
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ linters: | |
| enable: | ||
| - dupl | ||
| - errcheck | ||
| - exportloopref | ||
| - copyloopvar | ||
| - ginkgolinter | ||
| - goconst | ||
| - gocyclo | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,9 @@ | ||
| resources: | ||
| - manager.yaml | ||
| - registry_service.yaml | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| images: | ||
| - name: controller | ||
| newName: controller | ||
| newTag: v0.1.0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: agentrax-registry | ||
| namespace: system | ||
| labels: | ||
| app.kubernetes.io/name: agentrax | ||
| app.kubernetes.io/component: registry | ||
| spec: | ||
| selector: | ||
| control-plane: controller-manager | ||
| ports: | ||
| - name: registry | ||
| port: 9090 | ||
| targetPort: 9090 | ||
| protocol: TCP | ||
| type: ClusterIP | ||
|
Comment on lines
+1
to
+17
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check namePrefix, manager pod labels, and container ports.
fd -t f 'kustomization.yaml' config --exec rg -n 'namePrefix|namespace:|resources:' {}
fd -t f 'manager.yaml' config --exec rg -n -C 4 'control-plane|containerPort|args|- --'
fd -t f -e yaml . config --exec rg -l 'NetworkPolicy'Repository: gitcommitankit/agentrax Length of output: 1737 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- config/default/kustomization.yaml ---'
cat -n config/default/kustomization.yaml
printf '%s\n' '--- config/manager/manager.yaml: relevant sections ---'
sed -n '1,90p' config/manager/manager.yaml
printf '%s\n' '--- config/manager/registry_service.yaml ---'
cat -n config/manager/registry_service.yaml
printf '%s\n' '--- documented Service references ---'
rg -n -C 3 'agentrax-registry|agentrax-system|9090|registry' docs config internal
printf '%s\n' '--- NetworkPolicy definitions ---'
for f in $(fd -t f -e yaml . config/network-policy 2>/dev/null || true); do
echo "### $f"
cat -n "$f"
done
printf '%s\n' '--- kustomize availability ---'
if command -v kustomize >/dev/null 2>&1; then
kustomize version
kustomize build config/default
elif command -v kubectl >/dev/null 2>&1; then
kubectl version --client
kubectl kustomize config/default
else
echo 'No kustomize or kubectl available'
fiRepository: gitcommitankit/agentrax Length of output: 50379 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- registry listener and handlers ---'
sed -n '330,395p' internal/registry/registry.go
rg -n -C 3 '9090|Listen|registry.*addr|registry.*port|Registry' internal config docs
printf '%s\n' '--- Service and manager references across manifests ---'
rg -n -C 5 'registry_service|agentrax-registry|targetPort|containerPort|manager.yaml|namePrefix|namespace:' config docs
printf '%s\n' '--- default kustomization resource graph ---'
python3 - <<'PY'
from pathlib import Path
p = Path("config/default/kustomization.yaml")
print(p.read_text())
PYRepository: gitcommitankit/agentrax Length of output: 50379 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- manager startup and registry bind address ---'
rg -n -C 5 'registry-bind-address|registry.*Handler|ListenAndServe|NewRegistry|registryServer|registry' cmd internal --glob '*.go'
printf '%s\n' '--- manager kustomization and existing policy ---'
cat -n config/manager/kustomization.yaml
cat -n config/network-policy/allow-metrics-traffic.yaml
printf '%s\n' '--- exact handler methods and authorization hooks ---'
sed -n '346,445p' internal/registry/registry.go
rg -n 'Authorization|Authenticate|authn|middleware|NetworkPolicy|registry' config internal cmd --glob '*.go' --glob '*.yaml' --glob '*.yml' | head -120Repository: gitcommitankit/agentrax Length of output: 50379 Fix the Service name and restrict registry ingress.
The selector matches the manager pod label, and the manager listens on The default overlay does not include a NetworkPolicy. Add one that permits port 9090 only from the intended consumers because the registry exposes unauthenticated write endpoints. 🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: gitcommitankit/agentrax
Length of output: 13725
🏁 Script executed:
Repository: gitcommitankit/agentrax
Length of output: 50379
Prevent divergent registry state across manager replicas.
When
--leader-electis enabled, each manager still starts its own in-memoryRegistry, whileRegistry.Startloads the ConfigMap only once. The Service routes requests to all controller-manager pods, so requests can return stale or empty/agentsdata. Independent sweepers can also overwrite newer ConfigMap state.Use a synchronized registry view on every replica, or route the Service to one authoritative registry process.
🤖 Prompt for AI Agents