Skip to content
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
41 changes: 38 additions & 3 deletions .github/workflows/ci-build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,20 @@ jobs:
runs-on: ubuntu-latest
env:
TRICKSTER_MYSQL_CLI_TEST: "1"
TRICKSTER_DNS_TEST: "1"
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Start developer environment
run: make developer-start
- name: Start developer environment (with integration containers)
run: make integration-start
- name: Show container status
if: always()
run: |
cd docs/developer/environment
docker compose ps
docker compose logs --tail=30 redis prometheus mysql grafana
docker compose logs --tail=30 redis prometheus mysql grafana coredns
- name: Run integration tests (with coverage)
run: make integration-cover
- name: Run integration tests (with race detection enabled)
Expand All @@ -143,6 +144,40 @@ jobs:
path-to-profile: integration/.integration.coverprofile
flag-name: integration
parallel: true

integration-kind:
# Kubernetes autodiscovery scenario (plan step 34): in-cluster
# Trickster over EndpointSlices discovery in a kind cluster
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Create kind cluster
uses: helm/kind-action@v1
with:
config: integration/kind/kind-config.yaml
cluster_name: trickster-it
- name: Build and load trickster image
run: |
docker build -t trickster:integration .
kind load docker-image trickster:integration --name trickster-it
- name: Deploy scenario manifests
run: |
kubectl --context kind-trickster-it apply -f integration/kind/manifests.yaml
kubectl --context kind-trickster-it -n trickster-it rollout status deployment/webecho deployment/trickster --timeout=180s
- name: Run kubernetes autodiscovery scenario
working-directory: integration
env:
TRICKSTER_KIND_TEST: "1"
run: go test -v -timeout 15m -run TestALBDiscoveryKind .
- name: Show cluster state on failure
if: failure()
run: |
kubectl --context kind-trickster-it -n trickster-it get pods -o wide || true
kubectl --context kind-trickster-it -n trickster-it describe deployment trickster webecho || true
kubectl --context kind-trickster-it -n trickster-it logs deployment/trickster --tail=100 || true
finish:
needs:
- build
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/nightly-soak.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Nightly Soak

on:
schedule:
# 08:10 UTC daily
- cron: "10 8 * * *"
workflow_dispatch: {}

permissions:
contents: read

jobs:
autodiscovery-soak:
# hours-scale continuous membership churn asserting no goroutine/fd
# growth (autodiscovery plan step 37); also the baseline for the
# gateway controller's endpoint-mode soak
runs-on: ubuntu-latest
timeout-minutes: 90
env:
TRICKSTER_SOAK_TEST: "1"
TRICKSTER_SOAK_DURATION: "60m"
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Run autodiscovery soak
working-directory: integration
run: go test -v -timeout 80m -run TestALBDiscoverySoak .
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,7 @@ notes.txt
# Local AI Agent Files & Directories
AGENTS.md
.claude

# mutable CoreDNS zone data for the autodiscovery integration tests
# (seeded from docker-compose-data/coredns/*.seed by `make integration-start`)
docs/developer/environment/docker-compose-data/coredns-zones/
77 changes: 77 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,65 @@ developer-start:
developer-stop:
@cd docs/developer/environment && docker compose stop


# --- Integration-only container toggling -------------------------------------
# The compose file carries integration-only services (e.g. coredns for the
# autodiscovery DNS tests) commented out between the
# "-- INTEGRATION CONTAINERS BELOW --" / "-- ABOVE --" markers, so developer
# workstations never run them. integration-start uncomments that section,
# seeds the mutable CoreDNS zone directory, and brings the environment up;
# integration-stop stops the environment and comments the section back out.

COMPOSE_ENV_DIR := docs/developer/environment
COMPOSE_YML := $(COMPOSE_ENV_DIR)/docker-compose.yml
COREDNS_ZONES := $(COMPOSE_ENV_DIR)/docker-compose-data/coredns-zones
# services defined only in the integration section of the compose file
INTEGRATION_SERVICES := coredns

.PHONY: integration-env-enable
integration-env-enable:
@awk 'BEGIN{p=0} \
/-- INTEGRATION CONTAINERS BELOW --/{p=1;print;next} \
/-- INTEGRATION CONTAINERS ABOVE --/{p=0;print;next} \
p==1 && /^#/{sub(/^#/,"");print;next} \
{print}' $(COMPOSE_YML) > $(COMPOSE_YML).tmp \
&& mv $(COMPOSE_YML).tmp $(COMPOSE_YML)
@mkdir -p $(COREDNS_ZONES)
@cp -f $(COMPOSE_ENV_DIR)/docker-compose-data/coredns/trickster.test.db.seed \
$(COREDNS_ZONES)/trickster.test.db
@echo "integration containers enabled in $(COMPOSE_YML)"

.PHONY: integration-env-disable
integration-env-disable:
@awk 'BEGIN{p=0} \
/-- INTEGRATION CONTAINERS BELOW --/{p=1;print;next} \
/-- INTEGRATION CONTAINERS ABOVE --/{p=0;print;next} \
p==1 && !/^[[:space:]]*#/ && !/^[[:space:]]*$$/{print "#" $$0;next} \
{print}' $(COMPOSE_YML) > $(COMPOSE_YML).tmp \
&& mv $(COMPOSE_YML).tmp $(COMPOSE_YML)
@echo "integration containers disabled in $(COMPOSE_YML)"

.PHONY: integration-start
integration-start: integration-env-enable developer-start

.PHONY: integration-stop
integration-stop:
@$(MAKE) integration-env-enable >/dev/null
@# stop-and-remove the integration-only containers so a restart policy
@# cannot resurrect them on developer machines
@cd $(COMPOSE_ENV_DIR) && docker compose rm -sf $(INTEGRATION_SERVICES)
@$(MAKE) developer-stop
@$(MAKE) integration-env-disable

.PHONY: integration-delete
integration-delete:
@$(MAKE) integration-env-enable >/dev/null
@$(MAKE) developer-delete
@$(MAKE) integration-env-disable

# --- End Integration-only container toggling ---------------------------------


.PHONY: developer-delete
developer-delete:
@cd docs/developer/environment && docker compose down -v --remove-orphans
Expand All @@ -420,3 +479,21 @@ serve-dev:

serve-dev-data-race:
RUN_FLAGS=-race $(MAKE) serve-dev 2>&1 | tee race-output.log

# --- Kubernetes autodiscovery integration scenario ---------------------------
# Creates the kind cluster for integration/kind (TestALBDiscoveryKind),
# builds the trickster image, loads it, and deploys the manifests.
KIND_CLUSTER := trickster-it

.PHONY: kind-integration-start
kind-integration-start:
kind create cluster --config integration/kind/kind-config.yaml
docker build -t trickster:integration .
kind load docker-image trickster:integration --name $(KIND_CLUSTER)
kubectl --context kind-$(KIND_CLUSTER) apply -f integration/kind/manifests.yaml
kubectl --context kind-$(KIND_CLUSTER) -n trickster-it rollout status \
deployment/webecho deployment/trickster --timeout=180s

.PHONY: kind-integration-stop
kind-integration-stop:
kind delete cluster --name $(KIND_CLUSTER)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Trickster is a fully-featured HTTP Reverse Proxy Cache for HTTP applications lik

### Proxy Feature Highlights

* A unique and powerful [Application Load Balancer](./docs/alb.md) for Time Series and generic HTTP endpoints
* A unique and powerful [Application Load Balancer](./docs/alb.md) for Time Series and generic HTTP endpoints, with [pool autodiscovery](./docs/alb-autodiscovery.md) from Kubernetes, DNS or a member file
* [Supports TLS](./docs/tls.md) and HTTP/2 for frontend termination and backend origination
* Offers several options for a [caching layer](./docs/caches.md), including in-memory, filesystem, Redis and bbolt
* [Highly customizable](./docs/configuring.md), using simple yaml configuration settings, [down to the HTTP Path](./docs/paths.md)
Expand Down
Loading
Loading