Skip to content

Commit

Permalink
[prometheus] Add support for argumentless flags to extraArgs (#4508)
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Villacorta <[email protected]>
  • Loading branch information
h0tbird authored May 11, 2024
1 parent f8626ba commit 411ea4e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: prometheus
appVersion: v2.51.2
version: 25.20.1
version: 25.20.2
kubeVersion: ">=1.19.0-0"
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
Expand Down
8 changes: 8 additions & 0 deletions charts/prometheus/templates/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ spec:
{{- end }}
- --reload-url={{ default $default_url .Values.configmapReload.reloadUrl }}
{{- range $key, $value := .Values.configmapReload.prometheus.extraArgs }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
- --{{ $key }}
{{- end }}
{{- end }}
{{- range .Values.configmapReload.prometheus.extraVolumeDirs }}
- --watched-dir={{ . }}
Expand Down Expand Up @@ -144,7 +148,11 @@ spec:
- --{{ . }}
{{- end }}
{{- range $key, $value := .Values.server.extraArgs }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
- --{{ $key }}
{{- end }}
{{- end }}
{{- if .Values.server.prefixURL }}
- --web.route-prefix={{ .Values.server.prefixURL }}
Expand Down
8 changes: 8 additions & 0 deletions charts/prometheus/templates/sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ spec:
{{- end }}
- --reload-url={{ default $default_url .Values.configmapReload.reloadUrl }}
{{- range $key, $value := .Values.configmapReload.prometheus.extraArgs }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
- --{{ $key }}
{{- end }}
{{- end }}
{{- range .Values.configmapReload.prometheus.extraVolumeDirs }}
- --watched-dir={{ . }}
Expand Down Expand Up @@ -152,7 +156,11 @@ spec:
- --{{ . }}
{{- end }}
{{- range $key, $value := .Values.server.extraArgs }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
- --{{ $key }}
{{- end }}
{{- end }}
{{- if .Values.server.baseURL }}
- --web.external-url={{ .Values.server.baseURL }}
Expand Down
3 changes: 3 additions & 0 deletions charts/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ configmapReload:
# containerPort: 9533

## Additional configmap-reload container arguments
## Set to null for argumentless flags
##
extraArgs: {}

Expand Down Expand Up @@ -271,8 +272,10 @@ server:
# value: "Bearer ABCDEabcde12345"

## Additional Prometheus server container arguments
## Set to null for argumentless flags
##
extraArgs: {}
# web.enable-remote-write-receiver: null

## Additional InitContainers to initialize the pod
##
Expand Down

0 comments on commit 411ea4e

Please sign in to comment.