-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: linting and end-to-end collection tests (#28)
- Loading branch information
obs-gh-jeremyjackins
authored
Jul 27, 2023
1 parent
1d73a2b
commit 0f1cb99
Showing
50 changed files
with
1,694 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Test Charts | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
lint-charts: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.12.1 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
check-latest: true | ||
|
||
- name: Install chart-testing | ||
uses: helm/[email protected] | ||
with: | ||
version: v3.8.0 | ||
|
||
- name: Lint charts | ||
run: make lint | ||
|
||
test-charts: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.12.1 | ||
|
||
- name: Install kind | ||
uses: helm/[email protected] | ||
with: | ||
install_only: true | ||
|
||
- name: Test charts | ||
run: make test GOBUILD=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
*.tgz | ||
demo | ||
.kubeconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,49 @@ | ||
CHARTS := $(shell dirname `find . -name Chart.yaml`) | ||
# Charts will have their dependencies built in the order defined here. Endpoint is | ||
# a dependency of all charts, and should thus always be first in the list. Stack | ||
# and traces are umbrella charts and should always be at the end of the list. | ||
CHARTS := endpoint proxy events logs metrics stack traces | ||
|
||
.PHONY: all | ||
all: build-deps lint test | ||
|
||
add-repos: | ||
@helm repo add observe https://observeinc.github.io/helm-charts | ||
@helm repo add grafana https://grafana.github.io/helm-charts | ||
@helm repo add fluent https://fluent.github.io/helm-charts | ||
@helm repo add otel https://open-telemetry.github.io/opentelemetry-helm-charts | ||
helm repo up | ||
|
||
.PHONY: update-deps | ||
update-deps: | ||
update-deps: add-repos | ||
@for chart in $(CHARTS); do \ | ||
helm dependency update $$chart; \ | ||
helm dependency update --skip-refresh charts/$$chart; \ | ||
done | ||
|
||
.PHONY: build-deps | ||
build-deps: | ||
helm repo add grafana https://grafana.github.io/helm-charts | ||
helm repo add fluent https://fluent.github.io/helm-charts | ||
helm repo add otel https://open-telemetry.github.io/opentelemetry-helm-charts | ||
helm repo update | ||
build-deps: add-repos | ||
@for chart in $(CHARTS); do \ | ||
echo building chart dependencies for charts/$$chart...; \ | ||
helm dependency build --skip-refresh charts/$$chart; \ | ||
echo ; \ | ||
done | ||
|
||
.PHONY: test | ||
test: build-deps build-test-images | ||
test/test.sh stack traces | ||
|
||
.PHONY: lint | ||
lint: build-deps | ||
ct lint --all --helm-dependency-extra-args='--skip-refresh' | ||
|
||
.PHONY: clean | ||
clean: | ||
test/clean.sh | ||
@for chart in $(CHARTS); do \ | ||
helm dependency build --skip-refresh $$chart; \ | ||
echo rm -f charts/$$chart/charts/*.tgz; \ | ||
rm -f charts/$$chart/charts/*.tgz; \ | ||
done | ||
make -C test/cmd clean | ||
|
||
.PHONY: build-test-images | ||
build-test-images: | ||
make -C test/cmd all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ name: endpoint | |
description: Observe collection endpoint utility functions | ||
type: library | ||
version: 0.1.3 | ||
maintainers: | ||
- name: Observe | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
global: | ||
observe: | ||
collectionEndpoint: "" | ||
|
||
# Legacy configuration values, only used if collectionEndpoint is not set | ||
customer: "" | ||
collectorScheme: "https" | ||
collectorHost: "collect.observeinc.com" | ||
collectorPort: "443" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ dependencies: | |
- name: endpoint | ||
version: 0.1.3 | ||
repository: file://../endpoint | ||
maintainers: | ||
- name: Observe | ||
email: [email protected] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
charts/internal/events/values.yaml → charts/events/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ dependencies: | |
- name: endpoint | ||
version: 0.1.3 | ||
repository: file://../endpoint | ||
maintainers: | ||
- name: Observe | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ dependencies: | |
- name: endpoint | ||
version: 0.1.3 | ||
repository: file://../endpoint | ||
maintainers: | ||
- name: Observe | ||
email: [email protected] |
80 changes: 42 additions & 38 deletions
80
charts/internal/metrics/values.yaml → charts/metrics/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v2 | ||
name: proxy | ||
description: "Observe agent proxy (for testing only, do not use)" | ||
type: application | ||
version: 0.1.0 | ||
maintainers: | ||
- name: Observe | ||
email: [email protected] |
Oops, something went wrong.