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

fix: convert prometheus charts to helm install #597

Merged
merged 11 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
42 changes: 42 additions & 0 deletions .github/workflows/helm-prometheus-blackbox-exporter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Helm GitHub Actions for Prometheus Blackbox Exporter

on:
pull_request:
paths:
- base-helm-configs/prometheus-blackbox-exporter/**
- base-kustomize/prometheus-blackbox-exporter/**
- .github/workflows/helm-prometheus-blackbox-exporter.yaml
jobs:
helm:
strategy:
matrix:
overlays:
- base
name: Helm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: azure/setup-helm@v3
with:
version: latest
token: "${{ secrets.GITHUB_TOKEN }}"
id: helm
- name: Add prometheus-community repo to helm
run: |
${{ steps.helm.outputs.helm-path }} repo add prometheus-community https://prometheus-community.github.io/helm-charts
${{ steps.helm.outputs.helm-path }} repo update
- name: Run Helm Template
run: |
${{ steps.helm.outputs.helm-path }} template prometheus-blackbox-exporter prometheus-community/prometheus-blackbox-exporter \
--create-namespace \
--namespace=prometheus \
-f ${{ github.workspace }}//base-helm-configs/prometheus-blackbox-exporter/values.yaml \
-f ${{ github.workspace }}//base-helm-configs/prometheus-blackbox-exporter/probe_targets.yaml \
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
--post-renderer-args prometheus-blackbox-exporter/${{ matrix.overlays }} > /tmp/rendered.yaml
- name: Return helm Build
uses: actions/upload-artifact@v4
with:
name: helm-prometheus-artifact-${{ matrix.overlays }}
path: /tmp/rendered.yaml
41 changes: 41 additions & 0 deletions .github/workflows/helm-prometheus-mysql-exporter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Helm GitHub Actions for Prometheus MySQL Exporter

on:
pull_request:
paths:
- base-helm-configs/prometheus-mysql-exporter/**
- base-kustomize/prometheus-mysql-exporter/**
- .github/workflows/helm-prometheus-mysql-exporter.yaml
jobs:
helm:
strategy:
matrix:
overlays:
- base
name: Helm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: azure/setup-helm@v3
with:
version: latest
token: "${{ secrets.GITHUB_TOKEN }}"
id: helm
- name: Add prometheus-community repo to helm
run: |
${{ steps.helm.outputs.helm-path }} repo add prometheus-community https://prometheus-community.github.io/helm-charts
${{ steps.helm.outputs.helm-path }} repo update
- name: Run Helm Template
run: |
${{ steps.helm.outputs.helm-path }} template prometheus-mysql-exporter prometheus-community/prometheus-mysql-exporter \
--create-namespace \
--namespace=prometheus \
-f ${{ github.workspace }}//base-helm-configs/prometheus-mysql-exporter/values.yaml \
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
--post-renderer-args prometheus-mysql-exporter/${{ matrix.overlays }} > /tmp/rendered.yaml
- name: Return helm Build
uses: actions/upload-artifact@v4
with:
name: helm-prometheus-artifact-${{ matrix.overlays }}
path: /tmp/rendered.yaml
41 changes: 41 additions & 0 deletions .github/workflows/helm-prometheus-postgres-exporter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Helm GitHub Actions for Prometheus Postgres Exporter

on:
pull_request:
paths:
- base-helm-configs/prometheus-postgres-exporter/**
- base-kustomize/prometheus-postgres-exporter/**
- .github/workflows/helm-prometheus-postgres-exporter.yaml
jobs:
helm:
strategy:
matrix:
overlays:
- base
name: Helm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: azure/setup-helm@v3
with:
version: latest
token: "${{ secrets.GITHUB_TOKEN }}"
id: helm
- name: Add prometheus-community repo to helm
run: |
${{ steps.helm.outputs.helm-path }} repo add prometheus-community https://prometheus-community.github.io/helm-charts
${{ steps.helm.outputs.helm-path }} repo update
- name: Run Helm Template
run: |
${{ steps.helm.outputs.helm-path }} template prometheus prometheus-community/prometheus-postgres-exporter \
--create-namespace \
--namespace=prometheus \
-f ${{ github.workspace }}//base-helm-configs/prometheus-postgres-exporter/values.yaml \
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
--post-renderer-args prometheus-postgres-exporter/${{ matrix.overlays }} > /tmp/rendered.yaml
- name: Return helm Build
uses: actions/upload-artifact@v4
with:
name: helm-prometheus-artifact-${{ matrix.overlays }}
path: /tmp/rendered.yaml
41 changes: 41 additions & 0 deletions .github/workflows/helm-prometheus-pushgateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Helm GitHub Actions for Prometheus Pushgateway

on:
pull_request:
paths:
- base-helm-configs/prometheus-pushgateway/**
- base-kustomize/prometheus-pushgateway/**
- .github/workflows/helm-prometheus-pushgateway.yaml
jobs:
helm:
strategy:
matrix:
overlays:
- base
name: Helm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: azure/setup-helm@v3
with:
version: latest
token: "${{ secrets.GITHUB_TOKEN }}"
id: helm
- name: Add prometheus-community repo to helm
run: |
${{ steps.helm.outputs.helm-path }} repo add prometheus-community https://prometheus-community.github.io/helm-charts
${{ steps.helm.outputs.helm-path }} repo update
- name: Run Helm Template
run: |
${{ steps.helm.outputs.helm-path }} template prometheus-pushgateway prometheus-community/prometheus-pushgateway \
--create-namespace \
--namespace=prometheus \
-f ${{ github.workspace }}//base-helm-configs/prometheus-pushgateway/values.yaml \
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
--post-renderer-args prometheus-pushgateway/${{ matrix.overlays }} > /tmp/rendered.yaml
- name: Return helm Build
uses: actions/upload-artifact@v4
with:
name: helm-prometheus-artifact-${{ matrix.overlays }}
path: /tmp/rendered.yaml
41 changes: 41 additions & 0 deletions .github/workflows/helm-prometheus-rabbitmq-exporter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Helm GitHub Actions for Prometheus RabbitMQ Exporter

on:
pull_request:
paths:
- base-helm-configs/prometheus-rabbitmq-exporter/**
- base-kustomize/prometheus-rabbitmq-exporter/**
- .github/workflows/helm-prometheus-rabbitmq-exporter.yaml
jobs:
helm:
strategy:
matrix:
overlays:
- base
name: Helm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: azure/setup-helm@v3
with:
version: latest
token: "${{ secrets.GITHUB_TOKEN }}"
id: helm
- name: Add prometheus-community repo to helm
run: |
${{ steps.helm.outputs.helm-path }} repo add prometheus-community https://prometheus-community.github.io/helm-charts
${{ steps.helm.outputs.helm-path }} repo update
- name: Run Helm Template
run: |
${{ steps.helm.outputs.helm-path }} template prometheus-rabbitmq-exporter prometheus-community/prometheus-rabbitmq-exporter \
--create-namespace \
--namespace=openstack \
-f ${{ github.workspace }}//base-helm-configs/prometheus-rabbitmq-exporter/values.yaml \
--post-renderer ${{ github.workspace }}/base-kustomize/kustomize.sh \
--post-renderer-args prometheus-rabbitmq-exporter/${{ matrix.overlays }} > /tmp/rendered.yaml
- name: Return helm Build
uses: actions/upload-artifact@v4
with:
name: helm-prometheus-artifact-${{ matrix.overlays }}
path: /tmp/rendered.yaml
33 changes: 0 additions & 33 deletions .github/workflows/kustomize-prometheus-mysql-exporter.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/kustomize-prometheus-postgres-exporter.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/kustomize-prometheus-rabbitmq-exporter.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sortOptions:
order: fifo
resources:
- all.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sortOptions:
order: fifo
resources:
- monitoring_user_create.yaml
- monitoring_user_grant.yaml
- all.yaml
13 changes: 0 additions & 13 deletions base-kustomize/prometheus-mysql-exporter/kustomization.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sortOptions:
order: fifo
resources:
- all.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions base-kustomize/prometheus-pushgateway/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sortOptions:
order: fifo
resources:
- all.yaml
7 changes: 0 additions & 7 deletions base-kustomize/prometheus-pushgateway/kustomization.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sortOptions:
order: fifo
resources:
- all.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/prometheus-blackbox-exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The blackbox exporter ideally would be ran outside the cluster but can still pro


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

!!! success
Expand Down
Loading
Loading