No description
Find a file
2025-11-03 17:16:18 -07:00
apps/sample-app Fix ApplicationSet configuration and add sample app for testing 2025-11-02 21:44:24 -07:00
argocd goTemplate under spec 2025-11-03 17:16:18 -07:00
secrets Fix ApplicationSet configuration and add sample app for testing 2025-11-02 21:44:24 -07:00
local-hosts-example.txt Fix ApplicationSet configuration and add sample app for testing 2025-11-02 21:44:24 -07:00
Makefile Fix ApplicationSet configuration and add sample app for testing 2025-11-02 21:44:24 -07:00
QUICKSTART.md Fix ApplicationSet configuration and add sample app for testing 2025-11-02 21:44:24 -07:00
README.md Fix ApplicationSet configuration and add sample app for testing 2025-11-02 21:44:24 -07:00
test-local.sh Fix ApplicationSet configuration and add sample app for testing 2025-11-02 21:44:24 -07:00
TESTING.md Fix ApplicationSet configuration and add sample app for testing 2025-11-02 21:44:24 -07:00

K8s Deployment Repository

Kubernetes manifests for deploying applications with Kustomize and ArgoCD GitOps.

Directory Structure

.
├── apps/                    # Application deployments
│   └── sample-app/
│       ├── base/           # Base Kustomize configuration
│       └── overlays/       # Environment-specific overlays
│           ├── staging/
│           └── prod/
├── argocd/                 # ArgoCD ApplicationSet for GitOps
├── configs/                # Shared configuration files
├── envs/                   # Environment-specific values
├── secrets/                # Secret templates (not committed)
└── Makefile               # Build and deployment commands

Environments

Staging

Production

Quick Start

1. Validate Configuration

# No cluster required - just validates YAML
make test

2. Build Manifests

make build-staging
make build-prod

3. Deploy Manually

# Deploy to staging
kubectl apply -k apps/sample-app/overlays/staging

# Deploy to production (with confirmation)
kubectl apply -k apps/sample-app/overlays/prod

4. Or Use ArgoCD (GitOps)

# Apply ApplicationSet - ArgoCD will handle deployments
make argocd-apply

ArgoCD GitOps

The argocd/applications.yaml configures automatic deployments:

  • Watches staging branch → deploys to staging environment
  • Watches main branch → deploys to production environment (manual sync)
  • Auto-creates namespaces
  • Monitors all apps in apps/ directory

Local DNS Setup

Add to /etc/hosts for local testing:

127.0.0.1    staging.local.bunk3r.dev
127.0.0.1    app.local.bunk3r.dev
127.0.0.1    prod.local.bunk3r.dev

Adding New Applications

  1. Create app structure:
mkdir -p apps/new-app/{base,overlays/{staging,prod}}
  1. Add base resources in apps/new-app/base/
  2. Add environment overlays in apps/new-app/overlays/
  3. ArgoCD will automatically discover and deploy

Commands

make help           # Show all commands
make test          # Validate manifests
make build-staging # Build staging YAML
make build-prod    # Build production YAML
make status        # Show deployment status
make clean         # Clean generated files

Prerequisites

  • kubectl (1.24+)
  • kustomize (or kubectl 1.14+ with built-in kustomize)
  • ArgoCD (optional, for GitOps)