Skip to content

Commit c2714f0

Browse files
authored
fix: convert prometheus charts to helm install (rackerlabs#597)
* fix: prometheus-blackbox-exporter kustomize->helm driven install * fix: prometheus-postgres-exporter kustomize->helm driven install * fix: prometheus-rabbitmq-exporter kustomize->helm driven install * fix: prometheus-pushgateway kustomize->helm driven install * fix: prometheus-mysql-exporter kustomize->helm driven install JIRA:OSPC-854
1 parent 749db1b commit c2714f0

31 files changed

+233
-151
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Helm GitHub Actions for Prometheus Blackbox Exporter
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- base-helm-configs/prometheus-blackbox-exporter/**
7+
- base-kustomize/prometheus-blackbox-exporter/**
8+
- .github/workflows/helm-prometheus-blackbox-exporter.yaml
9+
jobs:
10+
helm:
11+
strategy:
12+
matrix:
13+
overlays:
14+
- base
15+
name: Helm
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- uses: azure/setup-helm@v3
21+
with:
22+
version: latest
23+
token: "${{ secrets.GITHUB_TOKEN }}"
24+
id: helm
25+
- name: Add prometheus-community repo to helm
26+
run: |
27+
${{ steps.helm.outputs.helm-path }} repo add prometheus-community https://prometheus-community.github.io/helm-charts
28+
${{ steps.helm.outputs.helm-path }} repo update
29+
- name: Run Helm Template
30+
run: |
31+
${{ steps.helm.outputs.helm-path }} template prometheus-blackbox-exporter prometheus-community/prometheus-blackbox-exporter \
32+
--create-namespace \
33+
--namespace=prometheus \
34+
-f ${{ github.workspace }}//base-helm-configs/prometheus-blackbox-exporter/values.yaml \
35+
-f ${{ github.workspace }}//base-helm-configs/prometheus-blackbox-exporter/probe_targets.yaml \
36+
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
37+
--post-renderer-args prometheus-blackbox-exporter/${{ matrix.overlays }} > /tmp/rendered.yaml
38+
- name: Return helm Build
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: helm-prometheus-artifact-${{ matrix.overlays }}
42+
path: /tmp/rendered.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Helm GitHub Actions for Prometheus MySQL Exporter
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- base-helm-configs/prometheus-mysql-exporter/**
7+
- base-kustomize/prometheus-mysql-exporter/**
8+
- .github/workflows/helm-prometheus-mysql-exporter.yaml
9+
jobs:
10+
helm:
11+
strategy:
12+
matrix:
13+
overlays:
14+
- base
15+
name: Helm
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- uses: azure/setup-helm@v3
21+
with:
22+
version: latest
23+
token: "${{ secrets.GITHUB_TOKEN }}"
24+
id: helm
25+
- name: Add prometheus-community repo to helm
26+
run: |
27+
${{ steps.helm.outputs.helm-path }} repo add prometheus-community https://prometheus-community.github.io/helm-charts
28+
${{ steps.helm.outputs.helm-path }} repo update
29+
- name: Run Helm Template
30+
run: |
31+
${{ steps.helm.outputs.helm-path }} template prometheus-mysql-exporter prometheus-community/prometheus-mysql-exporter \
32+
--create-namespace \
33+
--namespace=prometheus \
34+
-f ${{ github.workspace }}//base-helm-configs/prometheus-mysql-exporter/values.yaml \
35+
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
36+
--post-renderer-args prometheus-mysql-exporter/${{ matrix.overlays }} > /tmp/rendered.yaml
37+
- name: Return helm Build
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: helm-prometheus-artifact-${{ matrix.overlays }}
41+
path: /tmp/rendered.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Helm GitHub Actions for Prometheus Postgres Exporter
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- base-helm-configs/prometheus-postgres-exporter/**
7+
- base-kustomize/prometheus-postgres-exporter/**
8+
- .github/workflows/helm-prometheus-postgres-exporter.yaml
9+
jobs:
10+
helm:
11+
strategy:
12+
matrix:
13+
overlays:
14+
- base
15+
name: Helm
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- uses: azure/setup-helm@v3
21+
with:
22+
version: latest
23+
token: "${{ secrets.GITHUB_TOKEN }}"
24+
id: helm
25+
- name: Add prometheus-community repo to helm
26+
run: |
27+
${{ steps.helm.outputs.helm-path }} repo add prometheus-community https://prometheus-community.github.io/helm-charts
28+
${{ steps.helm.outputs.helm-path }} repo update
29+
- name: Run Helm Template
30+
run: |
31+
${{ steps.helm.outputs.helm-path }} template prometheus prometheus-community/prometheus-postgres-exporter \
32+
--create-namespace \
33+
--namespace=prometheus \
34+
-f ${{ github.workspace }}//base-helm-configs/prometheus-postgres-exporter/values.yaml \
35+
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
36+
--post-renderer-args prometheus-postgres-exporter/${{ matrix.overlays }} > /tmp/rendered.yaml
37+
- name: Return helm Build
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: helm-prometheus-artifact-${{ matrix.overlays }}
41+
path: /tmp/rendered.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Helm GitHub Actions for Prometheus Pushgateway
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- base-helm-configs/prometheus-pushgateway/**
7+
- base-kustomize/prometheus-pushgateway/**
8+
- .github/workflows/helm-prometheus-pushgateway.yaml
9+
jobs:
10+
helm:
11+
strategy:
12+
matrix:
13+
overlays:
14+
- base
15+
name: Helm
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- uses: azure/setup-helm@v3
21+
with:
22+
version: latest
23+
token: "${{ secrets.GITHUB_TOKEN }}"
24+
id: helm
25+
- name: Add prometheus-community repo to helm
26+
run: |
27+
${{ steps.helm.outputs.helm-path }} repo add prometheus-community https://prometheus-community.github.io/helm-charts
28+
${{ steps.helm.outputs.helm-path }} repo update
29+
- name: Run Helm Template
30+
run: |
31+
${{ steps.helm.outputs.helm-path }} template prometheus-pushgateway prometheus-community/prometheus-pushgateway \
32+
--create-namespace \
33+
--namespace=prometheus \
34+
-f ${{ github.workspace }}//base-helm-configs/prometheus-pushgateway/values.yaml \
35+
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
36+
--post-renderer-args prometheus-pushgateway/${{ matrix.overlays }} > /tmp/rendered.yaml
37+
- name: Return helm Build
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: helm-prometheus-artifact-${{ matrix.overlays }}
41+
path: /tmp/rendered.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Helm GitHub Actions for Prometheus RabbitMQ Exporter
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- base-helm-configs/prometheus-rabbitmq-exporter/**
7+
- base-kustomize/prometheus-rabbitmq-exporter/**
8+
- .github/workflows/helm-prometheus-rabbitmq-exporter.yaml
9+
jobs:
10+
helm:
11+
strategy:
12+
matrix:
13+
overlays:
14+
- base
15+
name: Helm
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- uses: azure/setup-helm@v3
21+
with:
22+
version: latest
23+
token: "${{ secrets.GITHUB_TOKEN }}"
24+
id: helm
25+
- name: Add prometheus-community repo to helm
26+
run: |
27+
${{ steps.helm.outputs.helm-path }} repo add prometheus-community https://prometheus-community.github.io/helm-charts
28+
${{ steps.helm.outputs.helm-path }} repo update
29+
- name: Run Helm Template
30+
run: |
31+
${{ steps.helm.outputs.helm-path }} template prometheus-rabbitmq-exporter prometheus-community/prometheus-rabbitmq-exporter \
32+
--create-namespace \
33+
--namespace=openstack \
34+
-f ${{ github.workspace }}//base-helm-configs/prometheus-rabbitmq-exporter/values.yaml \
35+
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
36+
--post-renderer-args prometheus-rabbitmq-exporter/${{ matrix.overlays }} > /tmp/rendered.yaml
37+
- name: Return helm Build
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: helm-prometheus-artifact-${{ matrix.overlays }}
41+
path: /tmp/rendered.yaml

.github/workflows/kustomize-prometheus-mysql-exporter.yaml

-33
This file was deleted.

.github/workflows/kustomize-prometheus-postgres-exporter.yaml

-33
This file was deleted.

.github/workflows/kustomize-prometheus-rabbitmq-exporter.yaml

-33
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sortOptions:
2+
order: fifo
3+
resources:
4+
- all.yaml

base-kustomize/prometheus-blackbox-exporter/kustomization.yaml

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
sortOptions:
2+
order: fifo
3+
resources:
4+
- monitoring_user_create.yaml
5+
- monitoring_user_grant.yaml
6+
- all.yaml

base-kustomize/prometheus-mysql-exporter/kustomization.yaml

-13
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sortOptions:
2+
order: fifo
3+
resources:
4+
- all.yaml

base-kustomize/prometheus-postgres-exporter/kustomization.yaml

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sortOptions:
2+
order: fifo
3+
resources:
4+
- all.yaml

base-kustomize/prometheus-pushgateway/kustomization.yaml

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sortOptions:
2+
order: fifo
3+
resources:
4+
- all.yaml

base-kustomize/prometheus-rabbitmq-exporter/kustomization.yaml

-7
This file was deleted.

docs/prometheus-blackbox-exporter.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The blackbox exporter ideally would be ran outside the cluster but can still pro
88

99

1010
``` shell
11-
kubectl kustomize --enable-helm /etc/genestack/kustomize/prometheus-blackbox-exporter | kubectl apply -f -
11+
bin/install-chart.sh prometheus-blackbox-exporter
1212
```
1313

1414
!!! success

0 commit comments

Comments
 (0)