Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions iac/provider-gcp/nomad/jobs/orchestrator.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,29 @@ job "orchestrator-${latest_orchestrator_job_id}" {
name = "orchestrator"
port = "${port}"

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.


check {
type = "grpc"
type = "http"
path = "/health"
name = "health"
interval = "20s"
timeout = "5s"
grpc_use_tls = false
port = "${port}"
Comment on lines -17 to -18
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.

Copy link
Member

Choose a reason for hiding this comment

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

Just for clarity—it inherits the check from orchestrator-proxy, not the orchestrator grpc, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It inherits the port, that's all:

job "orchestrator" {
    group "client" {
        service {
            name = "orchestrator"
            port = "1234"

            check {
                # inherits `port = "1234"`
            }
        }

        service {
            name = "proxy"
            port = "5678"

            check {
                # inherits `port = "5678"`
            }
        }
    }
}

Copy link
Member

Choose a reason for hiding this comment

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

Oh, so there are still two healthchecks, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct!

}
}

service {
name = "orchestrator-proxy"
port = "${proxy_port}"

provider = "nomad"

check {
type = "tcp"
name = "health"
interval = "30s"
timeout = "1s"
}
}

task "check-placement" {
Expand Down
10 changes: 5 additions & 5 deletions iac/provider-gcp/nomad/jobs/template-manager.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ job "template-manager-system" {
}

service {
name = "template-manager"
port = "${port}"
name = "template-manager"
port = "${port}"
provider = "nomad"

check {
type = "grpc"
type = "http"
path = "/health"
name = "health"
interval = "20s"
timeout = "5s"
grpc_use_tls = false
port = "${port}"
}
}

Expand Down