Skip to content

Commit

Permalink
Merge branch 'main' into prom-sd
Browse files Browse the repository at this point in the history
  • Loading branch information
zanhsieh authored Dec 29, 2024
2 parents cc548dc + 5710cd2 commit c143a7b
Show file tree
Hide file tree
Showing 20 changed files with 105 additions and 38 deletions.
22 changes: 2 additions & 20 deletions charts/prometheus-json-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,10 @@ keywords:
- metric
- monitoring
- prometheus

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.14.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
version: 0.14.1
appVersion: "v0.6.0"

home: https://github.com/prometheus-community/json_exporter
maintainers:
- name: schmiddim
email: [email protected]
Expand Down
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
2 changes: 1 addition & 1 deletion charts/prometheus-rabbitmq-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Rabbitmq metrics exporter for prometheus
name: prometheus-rabbitmq-exporter
version: 1.12.1
version: 1.13.0
appVersion: v0.29.0
home: https://github.com/kbudde/rabbitmq_exporter
sources:
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 }}
2 changes: 1 addition & 1 deletion charts/prometheus-smartctl-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.12.0
version: 0.13.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
1 change: 1 addition & 0 deletions charts/prometheus-smartctl-exporter/ci/default-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# default values
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# exclude devices
config:
device_exclude: "/dev/sr.*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# include devices
config:
device_include: "/dev/sd.*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# enable prometheus rules
prometheusRules:
enabled: true
extraLabels:
release: prometheus-operator
8 changes: 8 additions & 0 deletions charts/prometheus-smartctl-exporter/ci/resources-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# set resources
resources:
limits:
cpu: 100m
memory: 64Mi
requests:
cpu: 100m
memory: 64Mi
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# enable service monitor
serviceMonitor:
enabled: true
extraLabels:
release: prometheus-operator
12 changes: 12 additions & 0 deletions charts/prometheus-smartctl-exporter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,24 @@ spec:
{{- include "prometheus-smartctl-exporter.selectorLabels" $global | nindent 8 }}
idx: i{{ $idx }}
spec:
{{- if $global.Values.image.pullSecrets }}
imagePullSecrets:
{{- range $secret := $global.Values.image.pullSecrets }}
- name: {{ $secret }}
{{- end }}
{{- end }}
containers:
- image: "{{ $global.Values.image.repository }}:{{ $global.Values.image.tag | default $global.Chart.AppVersion }}"
imagePullPolicy: {{ $global.Values.image.pullPolicy }}
args:
- '--smartctl.path={{ $config.smartctl_location }}'
- '--smartctl.interval={{ $config.collect_not_more_than_period }}'
{{- if $config.device_exclude }}
- '--smartctl.device-exclude={{ $config.device_exclude }}'
{{- end }}
{{- if $config.device_include }}
- '--smartctl.device-include={{ $config.device_include }}'
{{- end }}
{{ range $config.devices }}
- '--smartctl.device={{ . }}'
{{ end }}
Expand Down
5 changes: 4 additions & 1 deletion charts/prometheus-smartctl-exporter/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
config: {}
# devices:
# - /dev/sda
# device_include: /dev/sd.*
# device_exclude: /dev/sr.*

extraInstances: []
# - config:
Expand Down Expand Up @@ -38,9 +40,10 @@ prometheusRules:

image:
repository: quay.io/prometheuscommunity/smartctl-exporter
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
pullPolicy: IfNotPresent
pullSecrets: []

serviceAccount:
# Specifies whether a service account should be created
Expand Down

0 comments on commit c143a7b

Please sign in to comment.