Skip to content

Adds (Prometheus) ServiceMonitor integration #68

Adds (Prometheus) ServiceMonitor integration

Adds (Prometheus) ServiceMonitor integration #68

Workflow file for this run

# yamllint --format github .github/workflows/test.yml
---
name: test
# We test the helm chart including an apply following the steps described in
# https://github.com/helm/chart-testing-action
# We don't test documentation-only commits.
on:
push:
branches: master
paths-ignore:
- "**/*.md"
pull_request:
branches: master
paths-ignore:
- "**/*.md"
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0' # to see origin/master
- name: Configure Git
run: | # not zipkinci as this is for testing
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.14.1
- name: Install python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Set up chart-testing
uses: helm/chart-testing-action@v2
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Run chart-testing (lint)
run: ct lint --config .github/ct.yml
- name: Create kind cluster
uses: helm/kind-action@v1
if: steps.list-changed.outputs.changed == 'true'
# See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md#installing-the-operator
- name: Install serviceMonitor CRD
run: |
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/${PROMETHEUS_OPERATOR_VERSION}/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
env:
PROMETHEUS_OPERATOR_VERSION: v0.72.0
- name: Run chart-testing (install)
run: ct install