Skip to content
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

Set prometheus scrape port for workers #110

Merged
merged 1 commit into from
Jul 12, 2024
Merged
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
2 changes: 1 addition & 1 deletion aks/application/resources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ locals {
prometheus_scrape_annotations = var.enable_prometheus_monitoring ? {
"prometheus.io/scrape" = "true"
"prometheus.io/path" = "/metrics"
"prometheus.io/port" = var.web_port
"prometheus.io/port" = var.is_web ? var.web_port : var.worker_port
} : {}

logit_annotations = var.enable_logit ? {
Expand Down
1 change: 1 addition & 0 deletions aks/application/tfdocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ No modules.
| <a name="input_service_short"></a> [service\_short](#input\_service\_short) | Short name of the service | `string` | `null` | no |
| <a name="input_web_external_hostnames"></a> [web\_external\_hostnames](#input\_web\_external\_hostnames) | List of external hostnames for the web application | `list(string)` | `[]` | no |
| <a name="input_web_port"></a> [web\_port](#input\_web\_port) | Port of the web application | `number` | `3000` | no |
| <a name="input_worker_port"></a> [worker\_port](#input\_worker\_port) | Port of the worker application | `number` | `9394` | no |

## Outputs

Expand Down
7 changes: 7 additions & 0 deletions aks/application/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ variable "web_port" {
description = "Port of the web application"
}

variable "worker_port" {
type = number
nullable = false
default = 9394
description = "Port of the worker application"
}

variable "probe_path" {
type = string
default = "/healthcheck"
Expand Down
Loading