Skip to content

Helm: add metrics.enabled conditional checks for serviceMonitor #640

Helm: add metrics.enabled conditional checks for serviceMonitor

Helm: add metrics.enabled conditional checks for serviceMonitor #640

Workflow file for this run

name: check_helm
on:
pull_request:
branches:
- '*'
push:
branches:
- '*'
jobs:
check_helm:
name: Test Helm Chart
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: medyagh/setup-minikube@master
with:
driver: docker
container-runtime: containerd
kubernetes-version: v1.33.0
cpus: max
memory: max
- uses: gabe565/setup-helm-docs-action@v1
with:
version: latest
- name: Local Helm Test
run: |
set -xe
minikube kubectl create ns test
./dev/generate_helm_chart.sh
helm install -n test test-operator ./deploy/helm/clickhouse-operator/
sleep 10
workflow_count=$(kubectl get all --all-namespaces | grep -c "test-operator")
configmap_count=$(kubectl get cm --all-namespaces | grep -c "test-operator")
if [ "$workflow_count" -lt 4 ]; then
echo "Error: Workload count is less than 4. Current count: $workflow_count"
exit 1
fi
if [ "$configmap_count" -lt 9 ]; then
echo "Error: ConfigMap count is less than 9. Current count: $configmap_count"
exit 1
fi
kubectl apply -n test -f ./docs/chi-examples/01-simple-layout-01-1shard-1repl.yaml
kubectl wait -n test --for=create chi/simple-01 --timeout=60s
kubectl wait -n test --for=jsonpath='{.status.status}'=Completed chi/simple-01 --timeout=1m
kubectl wait -n test --for=condition=Ready pod/chi-simple-01-simple-0-0-0