Skip to content

Commit

Permalink
[prometheus-nginx-exporter] bump to 1.4.0 (#5093)
Browse files Browse the repository at this point in the history
* bump to 1.4.0

Signed-off-by: drfaust92 <[email protected]>

* Add an option in CI test case

Signed-off-by: zeritti <[email protected]>

* Correct and update comments at options

Signed-off-by: zeritti <[email protected]>

* Use new flag format

Signed-off-by: zeritti <[email protected]>

* Add an upgrade note

Signed-off-by: zeritti <[email protected]>

* Insert namespaceOverride in values.yaml

Signed-off-by: zeritti <[email protected]>

* Set app version label from image tag first if present

Signed-off-by: zeritti <[email protected]>

---------

Signed-off-by: drfaust92 <[email protected]>
Signed-off-by: zeritti <[email protected]>
Co-authored-by: zeritti <[email protected]>
  • Loading branch information
DrFaust92 and zeritti authored Dec 27, 2024
1 parent eb7ab52 commit a1ef252
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 13 deletions.
6 changes: 3 additions & 3 deletions charts/prometheus-nginx-exporter/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: nginx
repository: https://charts.bitnami.com/bitnami
version: 15.3.4
digest: sha256:c5ee96dcdfa5a8ef4aa0a91e734ddedeb3c43f04fa29775a9ec6465f5eeb0192
generated: "2023-10-15T13:18:06.969016+03:00"
version: 18.3.1
digest: sha256:0c9d53b23d2d09220457f35ba99516e7fe3a6f1ca71e2d165139d5a83db8430f
generated: "2024-12-24T10:01:22.264584-05:00"
6 changes: 3 additions & 3 deletions charts/prometheus-nginx-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
apiVersion: v2
description: A Helm chart for NGINX Prometheus Exporter
name: prometheus-nginx-exporter
version: 0.2.2
appVersion: 0.11.0
version: 1.0.0
appVersion: 1.4.0
home: https://github.com/nginxinc/nginx-prometheus-exporter
sources:
- https://github.com/nginxinc/nginx-prometheus-exporter
Expand All @@ -30,6 +30,6 @@ annotations:
type: application
dependencies:
- name: nginx
version: "15.3.4"
version: "18.3.1"
repository: https://charts.bitnami.com/bitnami
condition: nginx.enabled
7 changes: 7 additions & 0 deletions charts/prometheus-nginx-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ helm upgrade [RELEASE_NAME] prometheus-community/prometheus-nginx-exporter --ins

_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._

### To 1.0

Chart release 1.0 reflects a major bump of the default NGINX Exporter image tag from major number 0 to 1.

This release has switched to using flags in the new format (`--flag`) but still supports the
deprecated format (`-flag`) transparently for NGINX Exporter below release 1.0.0.

## Configuring

See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:
Expand Down
3 changes: 3 additions & 0 deletions charts/prometheus-nginx-exporter/ci/ci-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ nginx:
stub_status on;
}
}
options:
nginx.timeout: 10s
4 changes: 1 addition & 3 deletions charts/prometheus-nginx-exporter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/component: metrics
app.kubernetes.io/part-of: {{ template "prometheus-nginx-exporter.name" . }}
{{- include "prometheus-nginx-exporter.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/version: {{ default .Chart.AppVersion .Values.image.tag | quote }}
{{- if .Values.additionalLabels }}
{{ toYaml .Values.additionalLabels }}
{{- end }}
Expand Down
9 changes: 8 additions & 1 deletion charts/prometheus-nginx-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
{{- if semverCompare ">=1.0.0-0" (coalesce .Values.image.tag .Chart.AppVersion) }}
- "--nginx.scrape-uri={{ tpl .Values.nginxServer . }}"
{{- range $key, $value := .Values.options }}
- "--{{ $key }}{{ if $value }}={{ $value }}{{ end }}"
{{- end }}
{{- else }}
- "-nginx.scrape-uri={{ tpl .Values.nginxServer . }}"
{{- range $key, $value := .Values.options }}
- "-{{ $key }}{{ if $value }}={{ $value }}{{ end }}"
{{- end }}
{{- end}}
{{- end}}
ports:
- name: http
containerPort: {{ .Values.service.port }}
Expand Down
8 changes: 5 additions & 3 deletions charts/prometheus-nginx-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ image:
nameOverride: ""
fullnameOverride: ""

# Overide deployment namespace
namespaceOverride: ""

# Add your nginx server details here
nginxServer: "http://{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local:8080/stub_status"
# nginxServer: "http://frontend.default.svc.cluster.local:8080/stub_status"

# Arguments - https://github.com/nginxinc/nginx-prometheus-exporter#command-line-arguments
options: {}
# -nginx.plus
# -nginx.retries int
# nginx.plus:
# nginx.timeout: 5s

livenessProbe:
httpGet:
Expand All @@ -57,7 +60,6 @@ service:

podAnnotations: {}


resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down

0 comments on commit a1ef252

Please sign in to comment.