Skip to content

Commit

Permalink
feat(provisioning): add storage configs to prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario-F committed Dec 30, 2021
1 parent 9531357 commit b77f6cf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
7 changes: 7 additions & 0 deletions provisioning/clusters/hcloud-bare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ global-config:
#
# Infra
#
hcloud-csi-driver:
installed: true
token: HCLOUD_TOKEN

ingress-default:
installed: true
additional:
Expand Down Expand Up @@ -46,6 +50,9 @@ ingress-multi:
# Monitoring
#
prometheus:
config:
storage:
size: 15Gi
ingress:
enabled: true
hostname: prometheus.test.armacloud.de
Expand Down
18 changes: 17 additions & 1 deletion provisioning/helmfiles/monitoring/values/prometheus.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,24 @@
prometheusOperator:
enabled: true

{{ $prometheusIngress := .Values | get "prometheus.ingress" dict }}
prometheus:
enabled: true

{{ $prometheusConfig := .Values | get "prometheus.config" dict }}
prometheusSpec:
retention: {{ $prometheusConfig | get "retention" "35d" }}
{{ $prometheusStorage := $prometheusConfig | get "storage" false }}
{{ if $prometheusStorage }}
storageSpec:
volumeClaimTemplate:
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: {{ $prometheusStorage.size }}
{{ end }}

{{ $prometheusIngress := .Values | get "prometheus.ingress" dict }}
ingress:
enabled: {{ $prometheusIngress | get "enabled" false }}
annotations:
Expand Down

0 comments on commit b77f6cf

Please sign in to comment.