Skip to content

Commit 6c3af05

Browse files
Merge pull request #2 from siddharthbarhate/main
Added namespace variable for Servicemonitor object
2 parents 3aa0531 + fc27f7b commit 6c3af05

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

helm/values/mysqldb/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ metrics:
12171217
enabled: true
12181218
## @param metrics.serviceMonitor.namespace Specify the namespace in which the serviceMonitor resource will be created
12191219
##
1220-
namespace: "monitoring"
1220+
namespace: "${service_monitor_namespace}"
12211221
## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
12221222
##
12231223
jobLabel: ""

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ resource "helm_release" "mysqldb" {
8181
replication_password = random_password.mysqldb_replication_user_password.result,
8282
mysqldb_root_password = random_password.mysqldb_root_password.result,
8383
mysqldb_exporter_enabled = var.mysqldb_exporter_enabled,
84+
service_monitor_namespace = var.namespace
8485
metrics_exporter_password = random_password.mysqldb_exporter_user_password.result,
8586
secondary_pod_replica_count = var.mysqldb_config.secondary_db_replica_count
8687
}),

0 commit comments

Comments
 (0)