From fa83adb53b7ea0224611129354b089b274105833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Wed, 22 Jan 2025 15:26:39 +0100 Subject: [PATCH] update pingdom exporter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Bauer --- charts/prometheus-pingdom-exporter/Chart.yaml | 27 +++++++++-------- charts/prometheus-pingdom-exporter/README.md | 27 +++++++---------- .../templates/deployment.yaml | 29 ++----------------- .../templates/secret.yaml | 7 ++--- .../prometheus-pingdom-exporter/values.yaml | 17 +++-------- 5 files changed, 32 insertions(+), 75 deletions(-) diff --git a/charts/prometheus-pingdom-exporter/Chart.yaml b/charts/prometheus-pingdom-exporter/Chart.yaml index e24c2223fcfe..ab00128e926c 100644 --- a/charts/prometheus-pingdom-exporter/Chart.yaml +++ b/charts/prometheus-pingdom-exporter/Chart.yaml @@ -1,23 +1,22 @@ -apiVersion: v1 +apiVersion: v2 name: prometheus-pingdom-exporter -version: 2.5.0 -appVersion: 20190610-1 +version: 3.0.0 +appVersion: v0.2.0 home: https://github.com/giantswarm/prometheus-pingdom-exporter description: A Helm chart for Prometheus Pingdom Exporter keywords: -- prometheus -- pingdom + - prometheus + - pingdom sources: -- https://github.com/giantswarm/prometheus-pingdom-exporter -- https://github.com/camptocamp/prometheus-pingdom-exporter -- https://github.com/prometheus-community/helm-charts + - https://github.com/monotek/pingdom-exporter + - https://github.com/prometheus-community/helm-charts maintainers: -- name: monotek - email: monotek23@gmail.com - url: https://github.com/monotek -- name: rpahli - email: pahli88@googlemail.com - url: https://github.com/rpahli + - name: monotek + email: monotek23@gmail.com + url: https://github.com/monotek + - name: rpahli + email: pahli88@googlemail.com + url: https://github.com/rpahli icon: https://raw.githubusercontent.com/cncf/artwork/master/prometheus/icon/color/prometheus-icon-color.svg annotations: artifacthub.io/links: | diff --git a/charts/prometheus-pingdom-exporter/README.md b/charts/prometheus-pingdom-exporter/README.md index d0d1040510cf..af2e864bf288 100644 --- a/charts/prometheus-pingdom-exporter/README.md +++ b/charts/prometheus-pingdom-exporter/README.md @@ -20,11 +20,7 @@ _See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation ## Install Chart ```console -# Helm 3 -$ helm install [RELEASE_NAME] prometheus-community/prometheus-pingdom-exporter - -# Helm 2 -$ helm install --name [RELEASE_NAME] prometheus-community/prometheus-pingdom-exporter +helm install [RELEASE_NAME] prometheus-community/prometheus-pingdom-exporter ``` _See [configuration](#configuration) below._ @@ -34,11 +30,7 @@ _See [helm install](https://helm.sh/docs/helm/helm_install/) for command documen ## Uninstall Chart ```console -# Helm 3 -$ helm uninstall [RELEASE_NAME] - -# Helm 2 -# helm delete --purge [RELEASE_NAME] +helm uninstall [RELEASE_NAME] ``` This removes all the Kubernetes components associated with the chart and deletes the release. @@ -48,20 +40,21 @@ _See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command doc ## Upgrading Chart ```console -# Helm 3 or 2 -$ helm upgrade [RELEASE_NAME] [CHART] --install +helm upgrade [RELEASE_NAME] [CHART] --install ``` _See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._ +### To version 3.0.0 + +The docker image has been change too . + +The config uses pingdom.apiToken only which is used as env var. + ## 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: ```console -# Helm 2 -$ helm inspect values prometheus-community/prometheus-pingdom-exporter - -# Helm 3 -$ helm show values prometheus-community/prometheus-pingdom-exporter +helm show values prometheus-community/prometheus-pingdom-exporter ``` diff --git a/charts/prometheus-pingdom-exporter/templates/deployment.yaml b/charts/prometheus-pingdom-exporter/templates/deployment.yaml index 7f4663ddcf5f..fe6cbb721d5a 100644 --- a/charts/prometheus-pingdom-exporter/templates/deployment.yaml +++ b/charts/prometheus-pingdom-exporter/templates/deployment.yaml @@ -21,37 +21,14 @@ spec: serviceAccountName: {{ template "prometheus-pingdom-exporter.serviceAccountName" . }} containers: - name: {{ .Chart.Name }} - args: - - server - - "$(PINGDOM_USER)" - - "$(PINGDOM_PASSWORD)" - - "$(PINGDOM_APPID)" - - "$(PINGDOM_ACCOUNT)" - - "--port={{ .Values.service.port }}" - - "--wait={{ .Values.pingdom.wait }}" - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: - - name: PINGDOM_USER + - name: PINGDOM_API_TOKEN valueFrom: secretKeyRef: name: {{ include "prometheus-pingdom-exporter.secretName" . }} - key: user - - name: PINGDOM_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "prometheus-pingdom-exporter.secretName" . }} - key: password - - name: PINGDOM_APPID - valueFrom: - secretKeyRef: - name: {{ include "prometheus-pingdom-exporter.secretName" . }} - key: appId - - name: PINGDOM_ACCOUNT - valueFrom: - secretKeyRef: - name: {{ include "prometheus-pingdom-exporter.secretName" . }} - key: accountEmail + key: apiToken ports: - name: http containerPort: {{ .Values.service.port }} diff --git a/charts/prometheus-pingdom-exporter/templates/secret.yaml b/charts/prometheus-pingdom-exporter/templates/secret.yaml index bc90b5235446..a9fe4c783a74 100644 --- a/charts/prometheus-pingdom-exporter/templates/secret.yaml +++ b/charts/prometheus-pingdom-exporter/templates/secret.yaml @@ -11,8 +11,5 @@ metadata: {{- include "prometheus-pingdom-exporter.labels" . | nindent 4 }} type: Opaque data: - user: {{ .Values.pingdom.user | b64enc }} - password: {{ .Values.pingdom.password | b64enc }} - appId: {{ .Values.pingdom.appId | b64enc }} - accountEmail: {{ .Values.pingdom.accountEmail | b64enc }} -{{- end }} \ No newline at end of file + apiToken: {{ .Values.pingdom.apiToken | b64enc }} +{{- end }} diff --git a/charts/prometheus-pingdom-exporter/values.yaml b/charts/prometheus-pingdom-exporter/values.yaml index 480e389b3c63..c2fa25ecb962 100644 --- a/charts/prometheus-pingdom-exporter/values.yaml +++ b/charts/prometheus-pingdom-exporter/values.yaml @@ -5,9 +5,9 @@ replicaCount: 1 image: - # we use camptocamp/prometheus-pingdom-exporter image as giantswarm did not publish recent versions after 0.1.1 - repository: camptocamp/prometheus-pingdom-exporter - tag: 20190610-1 + repository: ghcr.io/monotek/pingdom-exporter + # if not set appVersion field from Chart.yaml is used + tag: "" pullPolicy: IfNotPresent nameOverride: "" @@ -40,16 +40,7 @@ affinity: {} # configuration of the pingdom credentials pingdom: - # username of the pingdom account - user: somebody@invalid - # password of the pingdom account - password: totallysecret - # application id / api secret can be created on the pingdom website - appId: alsototallysecret - # account email of the account owner if using multiaccount / team accounts - accountEmail: somebodyorelse@invalid - # time (in seconds) between accessing the Pingdom API - wait: 10 + apiToken: "YourPingdomApiToken" pod: annotations: {}