Skip to content

Commit

Permalink
feat: 🎸 wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskaransarkaria committed Apr 2, 2024
1 parent 73fbc4c commit 2435ebf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ locals {
thanosrulers = "https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/${var.prometheus_operator_crd_version}/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml"
}

prometheus_sa_name = "prometheus-operator-kube-p-prometheus"

ecr_exporter_sa = "ecr-exporter"
}

1 change: 1 addition & 0 deletions prometheus.tf
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ resource "helm_release" "prometheus_operator_eks" {
enable_prometheus_affinity_and_tolerations = var.enable_prometheus_affinity_and_tolerations
enable_thanos_sidecar = var.enable_thanos_sidecar
enable_large_nodesgroup = var.enable_large_nodesgroup
prometheus_sa_name = local.prometheus_sa_name
eks_service_account = module.iam_assumable_role_monitoring.this_iam_role_arn
storage_class = can(regex("live", terraform.workspace)) ? "io1-expand" : "gp2-expand"
storage_size = can(regex("live", terraform.workspace)) ? "750Gi" : "75Gi"
Expand Down
3 changes: 3 additions & 0 deletions templates/prometheus-operator-eks.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,12 @@ prometheus:
enabled: true

serviceAccount:
create: true
name: "${prometheus_sa_name}"
annotations:
eks.amazonaws.com/role-arn: "${eks_service_account}"


# Service for thanos service discovery on sidecar
# Enable this can make Thanos Query can use
# `--store=dnssrv+_grpc._tcp.$kube-prometheus-stack.fullname-thanos-discovery.$namespace.svc.cluster.local` to discovery
Expand Down
1 change: 1 addition & 0 deletions thanos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ resource "helm_release" "thanos" {
version = "15.0.0"
timeout = 900
values = [templatefile("${path.module}/templates/thanos-values.yaml.tpl", {
prometheus_sa_name = local.prometheus_sa_name
enabled_compact = var.enable_thanos_compact
monitoring_aws_role = module.iam_assumable_role_monitoring.this_iam_role_name
clusterName = terraform.workspace
Expand Down

0 comments on commit 2435ebf

Please sign in to comment.