diff --git a/charts/prometheus-nginx-exporter/Chart.lock b/charts/prometheus-nginx-exporter/Chart.lock index a4bb33abfde9..e8429201d799 100644 --- a/charts/prometheus-nginx-exporter/Chart.lock +++ b/charts/prometheus-nginx-exporter/Chart.lock @@ -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" diff --git a/charts/prometheus-nginx-exporter/Chart.yaml b/charts/prometheus-nginx-exporter/Chart.yaml index 2aad071b6b51..21152341c6ad 100644 --- a/charts/prometheus-nginx-exporter/Chart.yaml +++ b/charts/prometheus-nginx-exporter/Chart.yaml @@ -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 @@ -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 diff --git a/charts/prometheus-nginx-exporter/README.md b/charts/prometheus-nginx-exporter/README.md index efc96817b418..adad316833ea 100644 --- a/charts/prometheus-nginx-exporter/README.md +++ b/charts/prometheus-nginx-exporter/README.md @@ -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: diff --git a/charts/prometheus-nginx-exporter/ci/ci-values.yaml b/charts/prometheus-nginx-exporter/ci/ci-values.yaml index 01ea9b1f8792..4c87d0be02cb 100644 --- a/charts/prometheus-nginx-exporter/ci/ci-values.yaml +++ b/charts/prometheus-nginx-exporter/ci/ci-values.yaml @@ -21,3 +21,6 @@ nginx: stub_status on; } } + +options: + nginx.timeout: 10s diff --git a/charts/prometheus-nginx-exporter/templates/_helpers.tpl b/charts/prometheus-nginx-exporter/templates/_helpers.tpl index 08bf752c9fe2..848cb68bc7bd 100644 --- a/charts/prometheus-nginx-exporter/templates/_helpers.tpl +++ b/charts/prometheus-nginx-exporter/templates/_helpers.tpl @@ -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 }} diff --git a/charts/prometheus-nginx-exporter/templates/deployment.yaml b/charts/prometheus-nginx-exporter/templates/deployment.yaml index 1ae04acca18b..96963aecc250 100644 --- a/charts/prometheus-nginx-exporter/templates/deployment.yaml +++ b/charts/prometheus-nginx-exporter/templates/deployment.yaml @@ -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 }} diff --git a/charts/prometheus-nginx-exporter/values.yaml b/charts/prometheus-nginx-exporter/values.yaml index 812120cf7684..dcedc218d6b3 100644 --- a/charts/prometheus-nginx-exporter/values.yaml +++ b/charts/prometheus-nginx-exporter/values.yaml @@ -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: @@ -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