Skip to content

Commit

Permalink
Merge branch 'main' into rabbitmq-1.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Ilia Lazebnik <[email protected]>
  • Loading branch information
DrFaust92 authored Dec 28, 2024
2 parents b30aafb + 4dac64a commit f8ab8d0
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 15 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
10 changes: 8 additions & 2 deletions charts/prometheus-rabbitmq-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ spec:
key: "{{ .Values.rabbitmq.existingPasswordSecretKey }}"
{{- else if .Values.rabbitmq.password }}
- name: RABBIT_PASSWORD
value: {{ .Values.rabbitmq.password }}
valueFrom:
secretKeyRef:
name: {{ template "prometheus-rabbitmq-exporter.fullname" . }}
key: RABBIT_PASSWORD
{{- end }}
{{- if .Values.rabbitmq.existingUserSecret }}
- name: RABBIT_USER
Expand All @@ -67,7 +70,10 @@ spec:
key: "{{ .Values.rabbitmq.existingUserSecretKey }}"
{{- else if .Values.rabbitmq.user }}
- name: RABBIT_USER
value: {{ .Values.rabbitmq.user }}
valueFrom:
secretKeyRef:
name: {{ template "prometheus-rabbitmq-exporter.fullname" . }}
key: RABBIT_USER
{{- end }}
{{- if .Values.rabbitmq.url }}
- name: RABBIT_URL
Expand Down
22 changes: 22 additions & 0 deletions charts/prometheus-rabbitmq-exporter/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if or (and (.Values.rabbitmq.password) (not .Values.rabbitmq.existingPasswordSecret)) (and (.Values.rabbitmq.user) (not .Values.rabbitmq.existingUserSecret)) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "prometheus-rabbitmq-exporter.fullname" . }}
labels:
app: {{ template "prometheus-rabbitmq-exporter.name" . }}
chart: {{ template "prometheus-rabbitmq-exporter.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.additionalLabels }}
{{ toYaml .Values.additionalLabels | indent 4 }}
{{- end }}
type: Opaque
data:
{{- if and (.Values.rabbitmq.password) (not .Values.rabbitmq.existingPasswordSecret) }}
RABBIT_PASSWORD: {{ .Values.rabbitmq.password | b64enc }}
{{- end }}
{{- if and (.Values.rabbitmq.user) (not .Values.rabbitmq.existingUserSecret) }}
RABBIT_USER: {{ .Values.rabbitmq.user | b64enc }}
{{- end }}
{{- end }}

0 comments on commit f8ab8d0

Please sign in to comment.