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

{chart,scripts}: move datasource test to helm chart #521

Merged
merged 5 commits into from
Aug 4, 2022
Merged
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
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:
paulfantom marked this conversation as resolved.
Show resolved Hide resolved
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