Skip to content

Commit

Permalink
the Prometheus <-> tests connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Szefler committed Jul 5, 2024
1 parent aae69ca commit 3a240aa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/test-prometrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
with:
python-version: 3.8

# setup a KIND cluster with Prometheus
- name: Create k8s Kind Cluster
uses: helm/[email protected]
- name: Install Prometheus
Expand All @@ -34,17 +33,21 @@ jobs:
kubectl get namespaces
echo "=== PODS ==="
kubectl get pods --all-namespaces
echo "=== PROMETHEUS NS ==="
kubectl get all --namespace prometheus
# install Prometrix so that we can run tests on it
- name: Install Prometrix
run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.4.0
poetry config virtualenvs.create false
poetry install --with test
# run the actual tests
- name: Test Prometrix
- name: Setup Prometrix <-> Github runner tunnel
uses: vbem/k8s-port-forward@v1
with:
workload: 'service/kind-prometheus-kube-prome-prometheus'
mappings: 9090:9090
options: '-n prometheus'

- name: Run Prometrix tests
run: |
# kubectl port-forward -n prometheus service/kind-prometheus-kube-prome-prometheus 9090:9090
python tests/main.py tests/config_github_kind.yaml
11 changes: 5 additions & 6 deletions tests/config_github_kind.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
testConfig:
- type: "PrometheusConfig"
params:
url:
disable_ssl:
headers:
prometheus_auth:
prometheus_url_query_string:
additional_labels:
url: localhost:9090
# headers:
# prometheus_auth:
# prometheus_url_query_string:
# additional_labels:

0 comments on commit 3a240aa

Please sign in to comment.