Skip to content

Commit

Permalink
Merge pull request #13 from keshavprasadms/prom-pv
Browse files Browse the repository at this point in the history
fix: adding PV for prom
  • Loading branch information
manjudr authored Mar 28, 2023
2 parents cdf093a + f722329 commit fb2cf4e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions terraform/helm/monitoring.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@ resource "helm_release" "monitoring" {
create_namespace = var.monitoring_create_namespace
wait_for_jobs = var.monitoring_wait_for_jobs
timeout = var.monitoring_install_timeout
values = [
templatefile(var.monitoring_chart_template,
{
prometheus_persistent_volume_size = var.prometheus_persistent_volume_size
}
)
]
}
12 changes: 12 additions & 0 deletions terraform/helm/monitoring_vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,16 @@ variable "monitoring_install_timeout" {
type = number
description = "Monitoring chart install timeout."
default = 1200
}

variable "prometheus_persistent_volume_size" {
type = string
description = "Persistent volume size for prometheus metrics data."
default = "10Gi"
}

variable "monitoring_chart_template" {
type = string
description = "Loki chart values.yaml path."
default = "../terraform_helm_templates/monitoring.yaml.tfpl"
}
9 changes: 9 additions & 0 deletions terraform/terraform_helm_templates/monitoring.yaml.tfpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
prometheus:
prometheusSpec:
storageSpec:
volumeClaimTemplate:
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: ${prometheus_persistent_volume_size}

0 comments on commit fb2cf4e

Please sign in to comment.