Skip to content

[cluster]: don't fire HA alerts on replica clusters #1674

[cluster]: don't fire HA alerts on replica clusters

[cluster]: don't fire HA alerts on replica clusters #1674

name: test( cluster )
on:
pull_request:
branches-ignore:
- 'gh-pages'
permissions: read-all
jobs:
test-list:
runs-on: ubuntu-24.04
outputs:
tests: ${{ steps.listTests.outputs.tests }}
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 1
- id: listTests
run: |
echo "tests=$(ls charts/cluster/test -1 | jq -cRn '{ include: [inputs | { test: "\(.)" }]}')" >> $GITHUB_OUTPUT
test:
needs: test-list
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.test-list.outputs.tests) }}
name: ${{matrix.test}}
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Install Cosign
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
- name: Setup kind
uses: ./.github/actions/setup-kind
- name: Deploy the operator
uses: ./.github/actions/deploy-operator
- name: Install cert-manager
uses: ./.github/actions/deploy-cert-manager
- name: Install Barman CNPG-I plugin
run: |
helm upgrade --install plugin-barman-cloud \
--namespace cnpg-system \
./charts/plugin-barman-cloud
- name: Install Prometheus CRDs
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm install prometheus-crds prometheus-community/prometheus-operator-crds
- name: Install Chainsaw
uses: kyverno/action-install-chainsaw@1223ef75bedeb59c4e7b5455463d4316e76dff01 # v0.2.15
with:
verify: true
- name: Setup MinIO
run: |
helm repo add minio-operator https://operator.min.io
helm upgrade \
--install \
--namespace minio-system \
--create-namespace \
--wait \
operator minio-operator/operator
helm upgrade \
--install \
--namespace minio \
--create-namespace \
--wait \
--values ./.github/minio.yaml \
tenant minio-operator/tenant
- name: Run Kyverno/Chainsaw
env:
MATRIX_TEST: ${{ matrix.test }}
run: chainsaw test "charts/cluster/test/${MATRIX_TEST}"