Skip to content

Commit

Permalink
feat: 🎸 connect to existing claim
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskaransarkaria committed Dec 17, 2024
1 parent 42ce2ea commit 3367e9c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 4 additions & 0 deletions templates/thanos-values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ compactor:
retentionResolution5m: 180d
retentionResolution1h: 365d
persistence:
%{ if eq compactor_existing_pvc_claim_id "disabled"}
%{ else ~}
existingClaim: "${compactor_existing_pvc_claim_id}"
%{ endif ~}
size: 16000Gi
serviceAccount:
create: false
Expand Down
9 changes: 5 additions & 4 deletions thanos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ 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
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
compactor_existing_pvc_claim_id = var.compactor_existing_pvc_claim_id
})]

depends_on = [
Expand Down
7 changes: 6 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,9 @@ variable "aws_subnet_exporter_image_tag" {
description = "Tag of the subnet exporter image to use"
default = ""
type = string
}
}

variable "compactor_existing_pvc_claim_id" {
description = "this is an existing pvc that thanos compactor should connect with"
default = "disabled"
}

0 comments on commit 3367e9c

Please sign in to comment.