{"id":30182785,"url":"https://github.com/datum-cloud/test-infra","last_synced_at":"2026-04-10T20:07:17.368Z","repository":{"id":307563634,"uuid":"1029380565","full_name":"datum-cloud/test-infra","owner":"datum-cloud","description":"Shared infrastructure for testing software components","archived":false,"fork":false,"pushed_at":"2026-02-06T00:14:53.000Z","size":101,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-06T10:20:30.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datum-cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-31T00:57:54.000Z","updated_at":"2026-02-04T15:49:23.000Z","dependencies_parsed_at":"2025-12-16T23:00:45.329Z","dependency_job_id":null,"html_url":"https://github.com/datum-cloud/test-infra","commit_stats":null,"previous_names":["datum-cloud/test-infra"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/datum-cloud/test-infra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datum-cloud%2Ftest-infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datum-cloud%2Ftest-infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datum-cloud%2Ftest-infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datum-cloud%2Ftest-infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datum-cloud","download_url":"https://codeload.github.com/datum-cloud/test-infra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datum-cloud%2Ftest-infra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29540245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T08:11:05.436Z","status":"ssl_error","status_checked_at":"2026-02-17T08:09:38.860Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-12T10:16:57.787Z","updated_at":"2026-02-17T10:38:43.888Z","avatar_url":"https://github.com/datum-cloud.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test Infrastructure\n\nA comprehensive test‑infrastructure repository designed to support software testing across an organization. This repository provides **standardized Kubernetes test environments** with pre‑configured shared infrastructure components, enabling consistent and efficient testing workflows for services that operate within Kubernetes clusters.\n\n## Overview\n\n- 🚀 **Fast Test Environment Provisioning** – get a fully configured Kubernetes cluster in **2–3 minutes**.\n- 🔄 **Standardized Infrastructure** – cert‑manager, Flux CD and Kyverno installed and version‑pinned out‑of‑the‑box.\n- ⚡ **CI/CD Optimized** – purpose‑built for GitHub Actions with minimal resource overhead.\n- 🎯 **Ephemeral by Design** – perfect for short‑lived test environments that can be created and destroyed on‑demand.\n- 📦 **GitOps Ready** – pre‑configured Flux installation supports declarative infrastructure management.\n- 🌐 **Gateway Ready** – Envoy Gateway with merged configuration provides HTTP/HTTPS ingress on non-privileged ports.\n\n## Port Configuration\n\nThe cluster exposes several ports for easy access without requiring port-forwarding:\n\n- **30443**: HTTPS Gateway (Envoy Gateway)\n- **30000**: Grafana dashboard (after installing observability)\n\nAll ports use non-privileged ranges (\u003e1024) to avoid requiring administrative privileges.\n\n---\n\n## Prerequisites\n\n| Requirement | Version | Why |\n|-------------|---------|-----|\n| Docker      | ≥ 20.10 | KIND creates Docker containers that act as Kubernetes nodes |\n| Bash (or PowerShell) | n/a | Scripts \u0026 Taskfile helpers |\n\n\u003e [!NOTE]\n\u003e\n\u003e **Windows users** – use a *Git Bash* or *WSL2* environment for best results. PowerShell functions are also included where possible.\n\n---\n\n## Quick‑start\n\n### Local Usage\n\n```bash\n# Clone the repo and spin up everything (tools + cluster + add‑ons)\n$ git clone https://github.com/datum-cloud/test-infra.git \u0026\u0026 cd test-infra\n$ task cluster-up\n\n# Use the kubectl wrapper to connect to the test-infra cluster\n$ task kubectl -- get nodes  # Automatically uses correct kubeconfig\n$ task k9s                    # Launch k9s terminal UI for cluster browsing\n\n# Tear everything down when finished\n$ task cluster-down\n```\n\n### Remote Usage (Include in Your Project)\n\nYou can include this test infrastructure in any project without cloning. See the [Using from Other Repositories](#using-from-other-repositories) section for complete setup instructions.\n\n## Parallels on Windows\nIf you prefer PowerShell:\n\n```powershell\nPS\u003e task ensure-tools         # idempotent – only installs what is missing\nPS\u003e task create-kind          # create the KIND cluster only\nPS\u003e task install-components   # deploy cert‑manager, Flux \u0026 Kyverno via kustomize\n```\n\n## How it Works\n\n- `task ensure-tools` – installs or upgrades **kind**, **kubectl**, **kustomize**, and **flux** binaries using system package managers or direct downloads.\n- `task create-kind` – boots a single-node **kind** cluster using `cluster/kind-config.yaml` and writes kubeconfig to `./kubeconfig`.\n- `task install-components` – applies `cluster/kustomization.yaml`; that file, in turn, references **all** `components/*` Kustomizations. Each component is pinned to a specific, well-tested upstream release.\n- **GitOps (optional)** – once Flux is running you can point it at your service repositories to sync manifests or Helm charts exactly as in production.\n\n\u003e [!NOTE]\n\u003e The cluster kubeconfig location depends on context:\n\u003e - When running in the test-infra repo: `./kubeconfig`\n\u003e - When running from another repo: `.test-infra/kubeconfig`\n\u003e\n\u003e This file is gitignored and should not be committed. The Taskfile automatically uses the correct path.\n\n\n## Adding New Components\n\n1. Create a new directory under `components/NAME`.\n2. Add a `kustomization.yaml` that references either remote manifests, Helm charts, or local patches.\n3. (Optional) add a Task target:\n\n   ```yaml\n   install-NAME:\n     desc: \"Install NAME component\"\n     cmds:\n       - echo \"Installing NAME…\"\n       - kustomize build components/NAME | kubectl apply -f -\n    ```\n4. Append the component to the cluster overlay or just run the new Task target:\n    ```yaml\n    # cluster/kustomization.yaml\n    resources:\n      - components/NAME\n    ```\nThe modular layout keeps the bootstrap lean while letting teams layer in extra infrastructure as needed.\n\n\n## Task Targets\n\n### Core Targets\n\n`task cluster-up` - Full happy-path: ensures tooling, creates cluster, installs add-ons\n\n`task cluster-down` - Tears down the cluster and removes all resources\n\n`task ensure-tools` - Installs or upgrades the required tools (kind, kubectl, kustomize, flux)\n\n`task create-kind` - Creates a KIND cluster using the configuration in `cluster/kind-config.yaml`\n\n`task kubectl -- \u003cargs\u003e` - Run kubectl commands against the test-infra cluster without setting KUBECONFIG (e.g., `task kubectl -- get pods`)\n\n`task k9s` - Launch k9s to interactively browse the test-infra cluster\n\n`task install-components` - Applies the `kustomization.yaml` in the `cluster/` directory, which installs cert-manager, Flux, and Kyverno\n\n`task install-cert-manager`, `task install-flux`, `task install-kyverno`, `task install-envoy-gateway-operator` - Install individual components directly\n\n### Optional Components\n\n`task install-observability` - Deploy complete telemetry stack (Victoria Metrics, Loki, Tempo, Grafana with Promtail, and Prometheus CRDs)\n\nRun `task help` to see all available targets and their descriptions.\n\n## Optional Components\n\nThe test infrastructure provides optional components that can be deployed after the core cluster is running:\n\n### Observability Stack\n\nDeploy a comprehensive telemetry system for monitoring, logging, and distributed tracing:\n\n```bash\ntask cluster-up                   # Deploy core infrastructure first\ntask install-observability        # Add telemetry stack\n```\n\n**What's included:**\n- **Victoria Metrics** - Time-series metrics collection and storage\n- **Loki** - Log aggregation with container log collection via Promtail\n- **Tempo** - Distributed tracing storage\n- **Grafana** - Unified dashboard (accessible at http://localhost:30000, admin/datum123)\n- **Prometheus CRDs** - Custom resources for advanced metrics scraping and alerting (servicemonitors, podmonitors, etc.)\n\nThe observability stack is designed for development and testing environments with appropriate resource limits and simplified configurations.\n\n## Using from Other Repositories\n\nThis test infrastructure can be included and reused across multiple projects without requiring a full clone. The taskfile automatically handles repository management when used externally.\n\n### Basic Setup\n\n1. **Add to your project's `Taskfile.yml`:**\n   ```yaml\n   version: '3'\n\n   includes:\n     test-infra:\n       taskfile: https://raw.githubusercontent.com/datum-cloud/test-infra/main/Taskfile.yml\n   ```\n\n2. **Enable experimental remote taskfiles:**\n   ```bash\n   # One-time setup\n   export TASK_X_REMOTE_TASKFILES=1\n\n   # Or add to .env file in your project\n   echo \"TASK_X_REMOTE_TASKFILES=1\" \u003e\u003e .env\n   ```\n\n### Advanced Configuration\n\nOverride default settings by passing variables:\n\n```yaml\n# Your project's Taskfile.yml\nversion: '3'\n\nincludes:\n  test-infra:\n    taskfile: https://raw.githubusercontent.com/datum-cloud/test-infra/main/Taskfile.yml\n    vars:\n      CLUSTER_NAME: my-project-test     # Custom cluster name\n      K8S_VERSION: v1.32.0              # Specific Kubernetes version\n      REPO_REF: feature-branch          # Use specific branch/tag\n      WAIT_TIMEOUT: 600s                # Longer timeout for slower environments\n```\n\n### Available Tasks\n\nAll tasks are prefixed with your include name:\n\n```bash\ntask test-infra:help                       # Show all available commands\ntask test-infra:cluster-up                 # Deploy full infrastructure\ntask test-infra:cluster-down               # Destroy cluster\ntask test-infra:cluster-status             # Check cluster health\ntask test-infra:install-observability      # Add telemetry stack\n\n# Use the wrapper commands (recommended - automatic path detection):\ntask test-infra:kubectl -- get nodes    # Run kubectl commands\ntask test-infra:k9s                     # Launch k9s terminal UI\n```\n\n## Troubleshooting\n\n**Versions** – run `task ensure-tools` regularly; it will upgrade outdated binaries.\n\n**Docker conflicts** – if port collisions occur, delete the cluster and recreate with a different name: `task cluster-up CLUSTER_NAME=my‑test`.\n\n**Permissions** – tools are installed to system directories and may require sudo privileges.\n\n**Cluster interaction** – use the wrapper commands for automatic kubeconfig handling:\n- `task kubectl -- \u003cargs\u003e` / `task test-infra:kubectl -- \u003cargs\u003e` - Run kubectl commands\n- `task k9s` / `task test-infra:k9s` - Launch k9s terminal UI for interactive cluster browsing\n\nThese automatically use the correct kubeconfig path without manual setup.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatum-cloud%2Ftest-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatum-cloud%2Ftest-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatum-cloud%2Ftest-infra/lists"}