Skip to content

Commit

Permalink
Merge pull request #521 from paulfantom/datasource-fix
Browse files Browse the repository at this point in the history
{chart,scripts}: move datasource test to helm chart
  • Loading branch information
paulfantom authored Aug 4, 2022
2 parents 0c7c832 + 07ed6a7 commit fc84814
Show file tree
Hide file tree
Showing 8 changed files with 211 additions and 433 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
uses: helm/[email protected]

- name: Run chart-testing (lint)
run: ct lint --config ct.yaml
run: make lint

test:
runs-on: ubuntu-latest
strategy:
matrix:
kube-version:
kube:
- "1.23"
- "1.24"
steps:
Expand All @@ -39,23 +39,15 @@ jobs:

- name: Start kuberenetes cluster with cert-manager
env:
KUBE_VERSION: ${{ matrix.kube-version }}
KUBE_VERSION: ${{ matrix.kube }}
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: 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
- name: Run e2e chart-testing
run: make e2e

test-result:
name: End-to-End Test Results
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.vscode/
.idea/
chart/Chart.lock
chart/charts/*
chart/charts
tmp/
manifests.yaml
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,14 @@ helm-install: cert-manager load-images ## This is a phony target that is used t
helm dep up chart/
helm upgrade --install --wait --timeout 15m test chart/

.PHONY: check-datasources
./scripts/check-datasources.sh
.PHONY: lint
lint: ## Lint helm chart using ct (chart-testing).
ct lint --config ct.yaml

.PHONY: e2e
e2e: ## Run e2e installation tests using ct (chart-testing).
kubectl create ns tobs-test
ct install --config ct.yaml --namespace tobs-test

manifests.yaml:
helm template --namespace test test chart/ > $@
Expand Down
35 changes: 35 additions & 0 deletions chart/ci/default-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This is the default values for the chart to run in CI system and it can be used as
# a base template for other *-values.yaml files. Only resource requests are nullified
# to allow starting the stack on github action runner and prevent issues related
# to pod scheduling due to insufficient host resources.

timescaledb-single:
env:
- name: "TIMESCALEDB_TELEMETRY"
value: "off"
resources: null

promscale:
resources: null

kube-prometheus-stack:
alertmanager:
alertmanagerSpec:
resources: null
prometheusOperator:
prometheusConfigReloader:
resources: null
resources: null
prometheus:
prometheusSpec:
resources: null
grafana:
resources: null
kube-state-metrics:
resources: null
prometheus-node-exporter:
resources: null

opentelemetry-operator:
manager:
resources: null
Loading

0 comments on commit fc84814

Please sign in to comment.