Skip to content

Commit

Permalink
chore: remove node port configuration for mimir
Browse files Browse the repository at this point in the history
  • Loading branch information
jhandguy committed Sep 27, 2023
1 parent 80812eb commit b07aee4
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 32 deletions.
3 changes: 0 additions & 3 deletions terraform/environments/consul/modules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module "kind" {
"pushgateway",
"consul",
"vault",
"mimir",
]
}

Expand Down Expand Up @@ -92,8 +91,6 @@ module "mimir" {
aws_secret_access_key = var.aws_secret_access_key
aws_s3_bucket = module.localstack.aws_s3_buckets["mimir"]
aws_s3_cluster_endpoint = module.localstack.aws_s3_cluster_endpoint
node_ip = module.kind.node_ip
node_port = module.kind.node_ports["mimir"]
}

module "prometheus" {
Expand Down
6 changes: 2 additions & 4 deletions terraform/environments/haproxy/modules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ module "kind" {
"sql_postgres_metrics",
"sql_mysql_http",
"sql_mysql_metrics",
"mimir",
"prometheus",
"alertmanager",
"grafana",
"haproxy_http",
"haproxy_https",
"haproxy_stat",
"haproxy_prometheus",
]
}

Expand Down Expand Up @@ -95,8 +95,6 @@ module "mimir" {
depends_on = [module.kind]
source = "../../modules/mimir"

node_ip = module.kind.node_ip
node_port = module.kind.node_ports["mimir"]
localstack_enabled = false
}

Expand Down Expand Up @@ -137,7 +135,7 @@ module "haproxy" {
source = "../../modules/haproxy"

node_ip = module.kind.node_ip
node_ports = [module.kind.node_ports["haproxy_http"], module.kind.node_ports["haproxy_https"], module.kind.node_ports["haproxy_stat"]]
node_ports = [module.kind.node_ports["haproxy_http"], module.kind.node_ports["haproxy_https"], module.kind.node_ports["haproxy_stat"], module.kind.node_ports["haproxy_prometheus"]]
}

module "certmanager" {
Expand Down
3 changes: 0 additions & 3 deletions terraform/environments/nginx/modules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module "kind" {
"nginx_http",
"nginx_https",
"argorollouts",
"mimir",
]
}

Expand Down Expand Up @@ -115,8 +114,6 @@ module "mimir" {
aws_secret_access_key = var.aws_secret_access_key
aws_s3_bucket = module.localstack.aws_s3_buckets["mimir"]
aws_s3_cluster_endpoint = module.localstack.aws_s3_cluster_endpoint
node_ip = module.kind.node_ip
node_port = module.kind.node_ports["mimir"]
}

module "prometheus" {
Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/haproxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ No modules.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_node_ip"></a> [node\_ip](#input\_node\_ip) | Node ip | `string` | n/a | yes |
| <a name="input_node_ports"></a> [node\_ports](#input\_node\_ports) | Node ports | `tuple([number, number, number])` | n/a | yes |
| <a name="input_node_ports"></a> [node\_ports](#input\_node\_ports) | Node ports | `tuple([number, number, number, number])` | n/a | yes |
| <a name="input_prometheus_enabled"></a> [prometheus\_enabled](#input\_prometheus\_enabled) | Enable Prometheus | `bool` | `true` | no |

## Outputs
Expand Down
1 change: 1 addition & 0 deletions terraform/modules/haproxy/helm_releases.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ resource "helm_release" "haproxy" {
http: ${var.node_ports.0}
https: ${var.node_ports.1}
stat: ${var.node_ports.2}
prometheus: ${var.node_ports.3}
defaultBackend:
enabled: true
EOF
Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/haproxy/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ variable "node_ip" {
}

variable "node_ports" {
type = tuple([number, number, number])
type = tuple([number, number, number, number])
description = "Node ports"
}

Expand Down
3 changes: 0 additions & 3 deletions terraform/modules/mimir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,11 @@ No modules.
| <a name="input_aws_s3_cluster_endpoint"></a> [aws\_s3\_cluster\_endpoint](#input\_aws\_s3\_cluster\_endpoint) | AWS S3 cluster endpoint | `string` | `""` | no |
| <a name="input_aws_secret_access_key"></a> [aws\_secret\_access\_key](#input\_aws\_secret\_access\_key) | AWS secret access key | `string` | `""` | no |
| <a name="input_localstack_enabled"></a> [localstack\_enabled](#input\_localstack\_enabled) | Enable LocalStack | `bool` | `true` | no |
| <a name="input_node_ip"></a> [node\_ip](#input\_node\_ip) | Node ip | `string` | n/a | yes |
| <a name="input_node_port"></a> [node\_port](#input\_node\_port) | Node port | `number` | n/a | yes |
| <a name="input_prometheus_enabled"></a> [prometheus\_enabled](#input\_prometheus\_enabled) | Enable Prometheus | `bool` | `true` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_cluster_url"></a> [cluster\_url](#output\_cluster\_url) | Cluster URL |
| <a name="output_url"></a> [url](#output\_url) | URL |
<!-- END_TF_DOCS -->
3 changes: 1 addition & 2 deletions terraform/modules/mimir/helm_releases.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ resource "helm_release" "mimir" {
gateway:
enabledNonEnterprise: true
service:
type: NodePort
nodePort: ${var.node_port}
legacyPort: null
ingester:
replicas: 1
resources: null
Expand Down
5 changes: 0 additions & 5 deletions terraform/modules/mimir/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
output "url" {
value = "${var.node_ip}:${var.node_port}"
description = "URL"
}

output "cluster_url" {
value = "${helm_release.mimir.name}-gateway.${helm_release.mimir.namespace}.svc.cluster.local:80"
description = "Cluster URL"
Expand Down
10 changes: 0 additions & 10 deletions terraform/modules/mimir/variables.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
variable "node_ip" {
type = string
description = "Node ip"
}

variable "node_port" {
type = number
description = "Node port"
}

variable "aws_region" {
type = string
sensitive = true
Expand Down

0 comments on commit b07aee4

Please sign in to comment.