Skip to content

Commit

Permalink
[CHORE] adding missing templates (#364)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Takashi <[email protected]>
  • Loading branch information
nicolastakashi authored Feb 7, 2024
1 parent 669d37b commit 010eb48
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
4 changes: 4 additions & 0 deletions metrics/prometheus-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion metrics/prometheus-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
22 changes: 21 additions & 1 deletion metrics/prometheus-agent/templates/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,32 @@ 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 }}
{{- end }}
{{- 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 }}
8 changes: 5 additions & 3 deletions metrics/prometheus-agent/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
fullnameOverride: prometheus-agent

global:
imagePullSecrets: []
imageRegistry: ""
rbac:
create: true

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -103,4 +106,3 @@ prometheus:
bearerTokenFile:
metricRelabelings: []
relabelings: []

0 comments on commit 010eb48

Please sign in to comment.