Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-snmp-exporter] default serviceMonitor to Release Namespace #4086

Merged
merged 9 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/prometheus-snmp-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Prometheus SNMP Exporter
name: prometheus-snmp-exporter
version: 1.8.2
version: 2.0.0
appVersion: v0.21.0
home: https://github.com/prometheus/snmp_exporter
sources:
Expand Down
16 changes: 16 additions & 0 deletions charts/prometheus-snmp-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ _See [configuration](#configuration) below._

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

## Upgrading Chart
onedr0p marked this conversation as resolved.
Show resolved Hide resolved

```console
helm upgrade [RELEASE_NAME] prometheus-community/prometheus-snmp-exporter
```

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

### Upgrading an existing Release to a new major version

A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.

### From 1.x to 2.x

This version upgrades changes the `serviceMonitor.namespace` value from `monitoring` to the namespace the release is deployed to.

## Uninstall Chart

```console
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "prometheus-snmp-exporter.fullname" $ }}-{{ .name }}
{{- if $.Values.serviceMonitor.namespace }}
namespace: {{ $.Values.serviceMonitor.namespace }}
{{- end }}
namespace: {{ $.Values.serviceMonitor.namespace | default $.Release.Namespace }}
labels:
{{- include "prometheus-snmp-exporter.labels" $ | indent 4 }}
{{- range $key, $value := .labels | default $.Values.serviceMonitor.selector }}
Expand Down
3 changes: 2 additions & 1 deletion charts/prometheus-snmp-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ configmapReload:
# A service monitor will be created per each item in serviceMonitor.params[]
serviceMonitor:
enabled: false
namespace: monitoring
# Default value is the namespace the release is deployed to
# namespace: monitoring

path: /snmp

Expand Down