From 94face002bfbc8cf3e6582895b52cc24487c7b12 Mon Sep 17 00:00:00 2001 From: Nicolas Takashi Date: Wed, 7 Feb 2024 09:48:25 +0000 Subject: [PATCH] [CHORE] adding missing templates Signed-off-by: Nicolas Takashi --- metrics/prometheus-agent/CHANGELOG.md | 4 ++++ metrics/prometheus-agent/Chart.yaml | 2 +- .../templates/prometheus.yaml | 22 ++++++++++++++++++- metrics/prometheus-agent/values.yaml | 8 ++++--- 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/metrics/prometheus-agent/CHANGELOG.md b/metrics/prometheus-agent/CHANGELOG.md index 08204e2f..7ec20f9b 100644 --- a/metrics/prometheus-agent/CHANGELOG.md +++ b/metrics/prometheus-agent/CHANGELOG.md @@ -2,6 +2,10 @@ ## Prometheus-Agent +### v0.0.18 / 2024-02-07 +* [FEATURE] Adding Prometheus Agent volumes and volumes mount +* [FEATURE] Adding Prometheus Agent image registry + ### v0.0.17 / 2024-02-07 * [FEATURE] Adding Pod Metadata to Prometheus Agent diff --git a/metrics/prometheus-agent/Chart.yaml b/metrics/prometheus-agent/Chart.yaml index 5cc42305..c011e9f2 100644 --- a/metrics/prometheus-agent/Chart.yaml +++ b/metrics/prometheus-agent/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: prometheus-agent-coralogix description: Prometheus running in agent mode -version: 0.0.17 +version: 0.0.18 appVersion: v2.42.0 keywords: - prometheus diff --git a/metrics/prometheus-agent/templates/prometheus.yaml b/metrics/prometheus-agent/templates/prometheus.yaml index 5b7509a1..08ee1a5f 100644 --- a/metrics/prometheus-agent/templates/prometheus.yaml +++ b/metrics/prometheus-agent/templates/prometheus.yaml @@ -119,7 +119,19 @@ spec: externalLabels: {{ tpl (toYaml .Values.prometheus.prometheusSpec.externalLabels | indent 4) . }} {{- end }} - image: "{{ .Values.prometheus.prometheusSpec.image.repository }}:{{ default .Chart.AppVersion .Values.prometheus.prometheusSpec.image.tag }}" +{{- if .Values.prometheus.prometheusSpec.image }} + {{- $registry := .Values.global.imageRegistry | default .Values.prometheus.prometheusSpec.image.registry -}} + {{- if and .Values.prometheus.prometheusSpec.image.tag .Values.prometheus.prometheusSpec.image.sha }} + image: "{{ $registry }}/{{ .Values.prometheus.prometheusSpec.image.repository }}:{{ .Values.prometheus.prometheusSpec.image.tag }}@sha256:{{ .Values.prometheus.prometheusSpec.image.sha }}" + {{- else if .Values.prometheus.prometheusSpec.image.sha }} + image: "{{ $registry }}/{{ .Values.prometheus.prometheusSpec.image.repository }}@sha256:{{ .Values.prometheus.prometheusSpec.image.sha }}" + {{- else if .Values.prometheus.prometheusSpec.image.tag }} + image: "{{ $registry }}/{{ .Values.prometheus.prometheusSpec.image.repository }}:{{ .Values.prometheus.prometheusSpec.image.tag }}" + {{- else }} + image: "{{ $registry }}/{{ .Values.prometheus.prometheusSpec.image.repository }}" + {{- end }} + version: {{ default .Values.prometheus.prometheusSpec.image.tag .Values.prometheus.prometheusSpec.version }} +{{- end }} {{- if .Values.global.imagePullSecrets }} imagePullSecrets: {{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 4 }} @@ -127,4 +139,12 @@ spec: {{- if .Values.prometheus.prometheusSpec.podMetadata }} podMetadata: {{ tpl (toYaml .Values.prometheus.prometheusSpec.podMetadata | indent 4) . }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.volumes }} + volumes: +{{ toYaml .Values.prometheus.prometheusSpec.volumes | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.volumeMounts }} + volumeMounts: +{{ toYaml .Values.prometheus.prometheusSpec.volumeMounts | indent 4 }} {{- end }} \ No newline at end of file diff --git a/metrics/prometheus-agent/values.yaml b/metrics/prometheus-agent/values.yaml index 67773d65..86409c6d 100644 --- a/metrics/prometheus-agent/values.yaml +++ b/metrics/prometheus-agent/values.yaml @@ -1,6 +1,8 @@ fullnameOverride: prometheus-agent global: + imagePullSecrets: [] + imageRegistry: "" rbac: create: true @@ -32,8 +34,9 @@ prometheus: enableFeatures: - memory-snapshot-on-shutdown - new-service-discovery-manager - image: - repository: quay.io/prometheus/prometheus + image: + registry: quay.io + repository: prometheus/alertmanager tag: v2.45.0 enableAdminAPI: true logFormat: json @@ -103,4 +106,3 @@ prometheus: bearerTokenFile: metricRelabelings: [] relabelings: [] -