Skip to content

Commit cfae5b7

Browse files
authored
Merge pull request #5 from SPHTech-Platform/adding-extra-prams
add more parameters for prom values file
2 parents 31551d7 + 4d31fce commit cfae5b7

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
| Name | Version |
1414
|------|---------|
15-
| <a name="provider_helm"></a> [helm](#provider\_helm) | >= 2.5 |
15+
| <a name="provider_helm"></a> [helm](#provider\_helm) | 2.6.0 |
1616

1717
## Modules
1818

@@ -108,6 +108,7 @@ No modules.
108108
| <a name="input_image_renderer_target_port"></a> [image\_renderer\_target\_port](#input\_image\_renderer\_target\_port) | image-renderer service targetPort used by both service and deployment | `number` | `8081` | no |
109109
| <a name="input_max_history"></a> [max\_history](#input\_max\_history) | Max History for Helm | `number` | `20` | no |
110110
| <a name="input_prometheus_alertmanager_nodeselector"></a> [prometheus\_alertmanager\_nodeselector](#input\_prometheus\_alertmanager\_nodeselector) | Alertmanager Spec node selector | `any` | `""` | no |
111+
| <a name="input_prometheus_external_labels"></a> [prometheus\_external\_labels](#input\_prometheus\_external\_labels) | External Labels for Ops Out More Information | `map(any)` | `{}` | no |
111112
| <a name="input_prometheus_host_url"></a> [prometheus\_host\_url](#input\_prometheus\_host\_url) | Prometheus Host URL | `string` | `""` | no |
112113
| <a name="input_prometheus_image_repository"></a> [prometheus\_image\_repository](#input\_prometheus\_image\_repository) | Prometheus Image repository | `string` | `"quay.io/prometheus/prometheus"` | no |
113114
| <a name="input_prometheus_image_tag"></a> [prometheus\_image\_tag](#input\_prometheus\_image\_tag) | Prometheus Image tag | `string` | `"v2.39.1"` | no |
@@ -116,9 +117,11 @@ No modules.
116117
| <a name="input_prometheus_ingress_hosts"></a> [prometheus\_ingress\_hosts](#input\_prometheus\_ingress\_hosts) | Hosts for ingress | `list(any)` | `[]` | no |
117118
| <a name="input_prometheus_ingress_labels"></a> [prometheus\_ingress\_labels](#input\_prometheus\_ingress\_labels) | Labels for ingress | `map(any)` | `{}` | no |
118119
| <a name="input_prometheus_ingress_tls"></a> [prometheus\_ingress\_tls](#input\_prometheus\_ingress\_tls) | TLS configuration for ingress | `list(any)` | `[]` | no |
120+
| <a name="input_prometheus_metric_labels_allowlist"></a> [prometheus\_metric\_labels\_allowlist](#input\_prometheus\_metric\_labels\_allowlist) | Comma-separated list of additional Kubernetes label keys that will be used (Example: '=namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...)' | `string` | `""` | no |
119121
| <a name="input_prometheus_nodeselector"></a> [prometheus\_nodeselector](#input\_prometheus\_nodeselector) | prometheus Spec node selector | `any` | `""` | no |
120122
| <a name="input_prometheus_operator_image_repository"></a> [prometheus\_operator\_image\_repository](#input\_prometheus\_operator\_image\_repository) | Prometheus Operator Image repository | `string` | `"quay.io/prometheus-operator/prometheus-operator"` | no |
121123
| <a name="input_prometheus_operator_image_tag"></a> [prometheus\_operator\_image\_tag](#input\_prometheus\_operator\_image\_tag) | Prometheus Operator Image Tag | `string` | `"v0.60.1"` | no |
124+
| <a name="input_prometheus_remote_write"></a> [prometheus\_remote\_write](#input\_prometheus\_remote\_write) | Write samples from Prometheus to a remote endpoint | `list(any)` | `[]` | no |
122125
| <a name="input_prometheus_service_account"></a> [prometheus\_service\_account](#input\_prometheus\_service\_account) | Name of the Service Account for Grafana | `string` | `""` | no |
123126
| <a name="input_prometheus_service_account_annotations"></a> [prometheus\_service\_account\_annotations](#input\_prometheus\_service\_account\_annotations) | Annotations for service account | `map(any)` | `{}` | no |
124127
| <a name="input_promethues_operator_nodeselector"></a> [promethues\_operator\_nodeselector](#input\_promethues\_operator\_nodeselector) | Promethues Operator node selector | `any` | `""` | no |

locals.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ locals {
1919
prometheus_alertmanager_nodeselector = var.prometheus_alertmanager_nodeselector
2020
prometheus_nodeselector = var.prometheus_nodeselector
2121

22-
prometheus_remote_write = jsonencode(var.prometheus_remote_write)
22+
prometheus_remote_write = jsonencode(var.prometheus_remote_write)
23+
prometheus_external_labels = jsonencode(var.prometheus_external_labels)
24+
prometheus_metric_labels_allowlist = var.prometheus_metric_labels_allowlist
2325
}
2426

2527
grafana_values = {

templates/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1480,6 +1480,7 @@ kubeStateMetrics:
14801480
## Configuration for kube-state-metrics subchart
14811481
##
14821482
kube-state-metrics:
1483+
metricLabelsAllowlist: ${prometheus_metric_labels_allowlist}
14831484
namespaceOverride: ""
14841485
rbac:
14851486
create: true
@@ -2402,7 +2403,7 @@ prometheus:
24022403

24032404
## External labels to add to any time series or alerts when communicating with external systems
24042405
##
2405-
externalLabels: {}
2406+
externalLabels: ${prometheus_external_labels}
24062407

24072408
## enable --web.enable-remote-write-receiver flag on prometheus-server
24082409
##

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,18 @@ variable "prometheus_remote_write" {
157157
default = []
158158
}
159159

160+
variable "prometheus_external_labels" {
161+
description = "External Labels for Ops Out More Information"
162+
type = map(any)
163+
default = {}
164+
}
165+
166+
variable "prometheus_metric_labels_allowlist" {
167+
description = "Comma-separated list of additional Kubernetes label keys that will be used (Example: '=namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...)'"
168+
type = string
169+
default = ""
170+
}
171+
160172
###########################################
161173
######## Grafana Chart Values ########
162174
###########################################

0 commit comments

Comments
 (0)