Skip to content

Commit

Permalink
Merge pull request #20 from neticdk/chore/fix-prometheus-externalLabels
Browse files Browse the repository at this point in the history
Make externalLabels configurable
  • Loading branch information
alex5517 authored Feb 12, 2024
2 parents 879c30b + 03fd6d6 commit b5218f1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/aoi/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: aoi
description: A Helm chart for Netic application operations infrastructure
type: application
version: 0.1.3
version: 0.1.4
dependencies:
- name: grafana
version: 7.0.9
Expand Down
3 changes: 2 additions & 1 deletion charts/aoi/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# aoi

![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for Netic application operations infrastructure

Expand Down Expand Up @@ -95,6 +95,7 @@ A Helm chart for Netic application operations infrastructure
| prometheus.configReloader.resources.limits.memory | string | `"25Mi"` | |
| prometheus.configReloader.resources.requests.cpu | string | `"10m"` | |
| prometheus.configReloader.resources.requests.memory | string | `"25Mi"` | |
| prometheus.externalLabels | object | `{}` | labels to add to all metrics. externalLabels: cluster_id: "${cluster_provider}_${cluster_name}" cluster: ${cluster_name} cluster_type: "${cluster_type}" prometheus_cluster: ${cluster_name}/aoi-prometheus provider: "${cluster_provider}" |
| prometheus.extraVolumeMounts | list | `[]` | |
| prometheus.extraVolumes | list | `[]` | |
| prometheus.image.registry | string | `"docker.io"` | |
Expand Down
7 changes: 1 addition & 6 deletions charts/aoi/templates/prometheus/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ spec:
resources:
{{- toYaml .Values.prometheus.configReloader.resources | nindent 8 }}
evaluationInterval: 30s
externalLabels:
cluster_id: "${cluster_provider}_${cluster_name}"
cluster: ${cluster_name}
cluster_type: "${cluster_type}"
prometheus_cluster: ${cluster_name}/aoi-prometheus
provider: "${cluster_provider}"
externalLabels: {{ .Values.prometheus.externalLabels | toYaml | nindent 4 }}
podMetadata:
annotations:
{{- toYaml .Values.prometheus.podAnnotations | nindent 6 }}
Expand Down
8 changes: 8 additions & 0 deletions charts/aoi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ prometheus:
runAsGroup: 3000
fsGroup: 2000
runAsNonRoot: true
# -- labels to add to all metrics.
# externalLabels:
# cluster_id: "${cluster_provider}_${cluster_name}"
# cluster: ${cluster_name}
# cluster_type: "${cluster_type}"
# prometheus_cluster: ${cluster_name}/aoi-prometheus
# provider: "${cluster_provider}"
externalLabels: {}
# -- relabel configs to apply to samples before ingestion.
relabelConfig: |
- source_labels: [cluster_id, namespace]
Expand Down

0 comments on commit b5218f1

Please sign in to comment.