Conversation
❌ 12 Tests Failed:
View the full list of 14 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f70a225f1e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Code Review
Truncating Kubernetes pod names to a fixed length will cause ID collisions because pod names in a controller share common prefixes, leading to incorrect routing or state corruption. Using string formatting to join IP addresses and ports fails for IPv6 hosts; net.JoinHostPort should be used to ensure correct formatting. The K8sNamespace configuration field lacks a default value or requirement check, which may cause the client to query all namespaces and fail due to RBAC restrictions.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d7f7d6184
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
2cf4f2a to
3fcf006
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: edb90a4eb4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…late-manager
Adds Kubernetes implementations of the Discovery interface (introduced
in the previous commit) and wires them in via a new config switch.
- cfg.ServiceDiscoveryProvider ('nomad' default, or 'kubernetes'),
plus K8sNamespace and label-selector env vars for the orchestrator
and template-manager pods
- new orchestrator/discovery.KubernetesDiscovery and
clusters/discovery.KubernetesServiceDiscovery; both list pods by
label selector in the api's namespace, filter to Running+Ready,
and use status.HostIP (orchestrator/template-manager pods run with
host_network=true) as the address. Discovered nodes are addressed
on consts.OrchestratorAPIPort.
- the K8s backend uses the full pod name as the discovery ShortID
rather than truncating to consts.NodeIDLength like the Nomad
backend does. Nomad node IDs are UUIDs whose first 8 hex chars are
effectively unique; pod names share a long DaemonSet/Deployment
prefix and would collide under that truncation, collapsing every
orchestrator pod into a single discovery key and silently dropping
all but one. The ShortID is opaque to downstream consumers
(string-compare key only), so relaxing the width invariant for
K8s only is safe. The tradeoff is documented inline.
- handlers/store.go selects the implementation at startup; when
PROVIDER=kubernetes both discoveries share an in-cluster K8s
client built from rest.InClusterConfig
Behavior preserved: with the default SERVICE_DISCOVERY_PROVIDER=nomad
the api still talks to the local Nomad agent exactly as before, so the
existing Nomad deploy is unaffected.
…late-manager
Adds Kubernetes implementations of the Discovery interface (introduced in the previous commit) and wires them in via a new config switch.
Behavior preserved: with the default SERVICE_DISCOVERY_PROVIDER=nomad the api still talks to the local Nomad agent exactly as before, so the existing Nomad deploy is unaffected.