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

Add GH workflow to check if datasources are working #520

Closed
wants to merge 6 commits into from
Closed
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/check-datasources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Check Datasources"
on:
- push
- pull_request

env:
helm-version: v3.9.2
kube-version: "1.24"

jobs:
check:
runs-on: ubuntu-latest
name: Check Datasources
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Helm
uses: azure/[email protected]
with:
version: ${{ env.helm-version }}

- name: Start kuberenetes cluster with cert-manager
env:
KUBE_VERSION: ${{ env.kube-version }}
run: |
make cert-manager

- name: Wait for cluster to finish bootstraping
run: kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=300s

- name: Create namespace for installing the chart
run: kubectl create namespace tobs-test

- name: Install helm dependencies
run: cd ./chart && helm dependency build

- name: Install the helm chart with e2e-values
run: helm install --namespace tobs-test -f ./chart/ci/e2e-values.yaml --wait --timeout 600s test ./chart

- name: Check datasources
run: make check-datasources
15 changes: 8 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Helm
uses: azure/[email protected]
with:
fetch-depth: 0
version: ${{ env.helm-version }}

- name: Set up chart-testing
uses: helm/[email protected]
Expand All @@ -31,8 +34,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Helm
uses: azure/[email protected]
with:
fetch-depth: 0
version: ${{ env.helm-version }}

- name: Set up chart-testing
uses: helm/[email protected]
Expand All @@ -52,11 +58,6 @@ jobs:
- name: Run chart-testing (install)
run: ct install --config ct.yaml --namespace tobs-test

# TODO(onprem): Figure out a workaround to test datasources as ct just removes
# the chart release after a successful install.
# - name: Check datasources
# run: make check-datasources

test-result:
name: End-to-End Test Results
if: always()
Expand Down
4 changes: 2 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ kube-prometheus-stack:
# By default url of data source is set to ts-prom connector instance
# deployed with this chart. If a connector isn't used this should be
# set to the prometheus-server.
url: "http://{{ .Release.Name }}-promscale-connector.{{ .Release.Namespace }}.svc:9201"
url: "http://{{ .Release.Name }}-promscale.{{ .Release.Namespace }}.svc:9201"
timescale:
datasource:
enabled: true
Expand All @@ -299,7 +299,7 @@ kube-prometheus-stack:
port: 5432
jaeger:
# Endpoint for integrating jaeger datasource in grafana. This should point to HTTP endpoint, not gRPC.
promscaleTracesQueryEndPoint: "{{ .Release.Name }}-promscale-connector.{{ .Release.Namespace }}.svc:9201"
promscaleTracesQueryEndPoint: "{{ .Release.Name }}-promscale.{{ .Release.Namespace }}.svc:9201"

kube-state-metrics:
image:
Expand Down