Skip to content

Conversation

@djeebus
Copy link
Contributor

@djeebus djeebus commented Oct 21, 2025

  • use provider=nomad explicitly
  • grpc is only supported by consul-integrated nomad clusters, use http instead
  • add tcp health check for orchestrator proxy port
  • use network block to define orchestrator ports (similar to template manager)

Before:
image

After:
image


Note

Replace gRPC health checks with HTTP, add Nomad-labeled ports/provider, use NOMAD_PORT envs, and add TCP check for orchestrator proxy.

  • Nomad jobs:
    • Orchestrator (iac/provider-gcp/nomad/jobs/orchestrator.hcl):
      • Add network block with mode = "host" and labeled ports api and proxy (static).
      • Update services to use port labels (api, proxy) and provider = "nomad".
      • Change health checks: orchestrator from grpc to HTTP GET /health; add TCP check for orchestrator-proxy.
      • Use dynamic port envs: GRPC_PORT=$${NOMAD_PORT_api}, PROXY_PORT=$${NOMAD_PORT_proxy}.
    • Template Manager (iac/provider-gcp/nomad/jobs/template-manager.hcl):
      • Rename network port to api and reference it in the service; set provider = "nomad".
      • Change health check from grpc to HTTP GET /health.
      • Use dynamic port env: GRPC_PORT=$${NOMAD_PORT_api}.

Written by Cursor Bugbot for commit 13bf326. This will update automatically on new commits. Configure here.

- use provider=nomad explicitly
- grpc is only supported by consul-integrated nomad clusters, use http instead
- add tcp health check for orchestrator proxy port
- use network block to define orchestrator ports (similar to template manager)
Comment on lines +8 to +22
network {
mode = "host"

port "api" {
// todo: remove this once all API and client-proxy jobs
// can pull the port number from nomad.
static = "${port}"
}

port "proxy" {
// todo: remove this once all API and client-proxy jobs
// can pull the port number from nomad.
static = "${proxy_port}"
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This format is exactly the same as the one for template-manager, and allows us to refer to ports by name instead of number

port = "${port}"
name = "orchestrator"
port = "api"
provider = "nomad"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This enables the health checks to work. Without it, we default to consul, which doesn't function.

provider = "nomad"

check {
type = "grpc"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GRPC only works when provider=consul, but we expose an http health endpoint as well.

Comment on lines -17 to -18
grpc_use_tls = false
port = "${port}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this, as we're using HTTP (not GRPC) and it inherits the port of the service block that surrounds the check.

Comment on lines +43 to +48
check {
type = "tcp"
name = "health"
interval = "30s"
timeout = "1s"
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use TCP to ensure that the port is accepting connections

Comment on lines +101 to +102
GRPC_PORT = "$${NOMAD_PORT_api}"
PROXY_PORT = "$${NOMAD_PORT_proxy}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refers to the ports defined in the network block on line 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants