Skip to content

Commit 31551d7

Browse files
authored
Merge pull request #4 from SPHTech-Platform/add-remotewrite
add variable for remote write
2 parents d1d0d75 + f6b750c commit 31551d7

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ on:
44
push:
55
branches:
66
- main
7+
8+
permissions:
9+
actions: read
10+
checks: read
11+
contents: read
12+
pull-requests: read
13+
security-events: write
14+
715
jobs:
816
ci:
917
uses: SPHTech-Platform/reusable-workflows/.github/workflows/terraform.yaml@main

locals.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ locals {
1818
promethues_operator_nodeselector = var.promethues_operator_nodeselector
1919
prometheus_alertmanager_nodeselector = var.prometheus_alertmanager_nodeselector
2020
prometheus_nodeselector = var.prometheus_nodeselector
21+
22+
prometheus_remote_write = jsonencode(var.prometheus_remote_write)
2123
}
2224

2325
grafana_values = {

templates/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2629,7 +2629,7 @@ prometheus:
26292629

26302630
## The remote_write spec configuration for Prometheus.
26312631
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#remotewritespec
2632-
remoteWrite: []
2632+
remoteWrite: ${prometheus_remote_write}
26332633
# - url: http://remote1/push
26342634
## additionalRemoteWrite is appended to remoteWrite
26352635
additionalRemoteWrite: []

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ variable "prometheus_nodeselector" {
151151
default = ""
152152
}
153153

154+
variable "prometheus_remote_write" {
155+
description = "Write samples from Prometheus to a remote endpoint"
156+
type = list(any)
157+
default = []
158+
}
159+
154160
###########################################
155161
######## Grafana Chart Values ########
156162
###########################################

0 commit comments

Comments
 (0)