-
Notifications
You must be signed in to change notification settings - Fork 0
Development
genesluna edited this page Jan 2, 2026
·
2 revisions
Welcome to the development documentation for the k8s-ephemeral-environments platform. This section provides everything contributors need to get started, understand the codebase, and submit quality contributions.
The k8s-ephemeral-environments platform consists of several components:
k8s-ephemeral-environments/
+-- .github/
| +-- actions/ # Reusable composite actions
| +-- workflows/ # CI/CD workflows
+-- charts/ # Helm charts
| +-- k8s-ee-app/ # Main application chart
| +-- k8s-ee-*/ # Database subchart packages
+-- demo-app/ # Demo application (NestJS API + React Web)
| +-- packages/
| +-- api/ # NestJS backend
| +-- web/ # React frontend
+-- docs/ # Documentation
+-- k8s/ # Kubernetes manifests
+-- scripts/ # Utility scripts
Complete guide for new team members:
- Prerequisites - Required tools and versions
- First-time setup - Clone, install, run locally
- Cluster access - SSH and kubeconfig setup
- Observability - Grafana dashboards and log queries
- Development workflow - Branch, code, test, PR flow
- Quick reference - Essential kubectl and helm commands
Guidelines for making contributions:
- Code style - TypeScript conventions, linting, formatting
- Branch naming - Patterns for features, fixes, hotfixes
- Commit messages - Conventional commits format
- Pull request process - From branch to merge
- Testing requirements - Coverage expectations
- Documentation - When and how to update docs
# Clone the repository
git clone https://github.com/koder-cat/k8s-ephemeral-environments.git
cd k8s-ephemeral-environments
# Install demo app dependencies
cd demo-app
pnpm install
# Start local development environment
pnpm dev:localgit checkout -b feat/us-XXX-descriptioncd demo-app
pnpm dev # Start dev servers
pnpm test # Run tests
pnpm lint # Check code stylegit commit -m "feat(scope): add new feature"
git push -u origin feat/us-XXX-description
gh pr createOnce CI completes, your PR gets an automatic preview environment:
- URL:
k8s-ee-pr-{number}.k8s-ee.genesluna.dev - Bot comments on PR with the link
- Check Grafana for logs and metrics
| Tool | Purpose | Required Version |
|---|---|---|
| Node.js | JavaScript runtime | 22+ |
| pnpm | Package manager | 9+ |
| Docker | Container runtime | Latest |
| kubectl | Kubernetes CLI | 1.31+ |
| Helm | Kubernetes package manager | 3.16+ |
| GitHub CLI | GitHub operations | Latest |
The demo app showcases the platform capabilities:
| Package | Technology | Purpose |
|---|---|---|
@demo-app/api |
NestJS | Backend API with metrics, health checks |
@demo-app/web |
React + Vite | Frontend with simulator and dashboards |
| Chart | Purpose |
|---|---|
k8s-ee-app |
Main application chart |
k8s-ee-postgresql |
PostgreSQL via CloudNativePG |
k8s-ee-mongodb |
MongoDB via Community Operator |
k8s-ee-redis |
Redis deployment |
k8s-ee-minio |
MinIO (S3-compatible storage) |
k8s-ee-mariadb |
MariaDB deployment |
| Component | Purpose |
|---|---|
| Composite Actions | Modular, reusable CI/CD steps |
| Reusable Workflows | Complete PR environment lifecycle |
| Self-hosted Runners | In-cluster job execution |
| Type | Tool | Coverage Target |
|---|---|---|
| Unit Tests | Jest/Vitest | 50% minimum |
| Integration Tests | Jest + Supertest | API endpoints |
| E2E Tests | Playwright | Critical flows |
Run all tests:
cd demo-app
pnpm test # All tests
pnpm test:cov # With coverage report
pnpm test:watch # Watch mode| Document | Purpose |
|---|---|
| Developer-Onboarding | New contributor setup |
| Contributing | Contribution guidelines |
| Configuration-Reference | k8s-ee.yaml schema |
| Service-Development | Database integration patterns |
| Security-and-Access-Control | Security architecture |
- Check existing GitHub Issues
- Review the User-Guides section for operational guides
- Consult the Architecture section for system design
- Developer-Onboarding - Complete setup guide for new developers
- Contributing - Contribution guidelines and processes
- Architecture - System architecture overview
- Configuration-Reference - Configuration schema reference
- Home - Documentation home page
Getting Started
User Guides
- Database Setup
- Database Migrations
- Database Seeding
- Service Development
- Security and Access Control
- Alternative CI Integration
Troubleshooting
Operations
- VPS Access
- K3s Operations
- ARC Runner Management
- Cleanup Job
- Preserve Environment
- Grafana Dashboards
- Cluster Recovery
Architecture
Demo Applications
Development