Skip to content

Gi-v/Platform-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ–ˆβ•—      β–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ•‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘     β•šβ–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘      β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘     β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘      β–ˆβ–ˆβ•‘
β•šβ•β•     β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•   β•šβ•β•   β•šβ•β•      β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•šβ•β•     β•šβ•β•      β•šβ•β•

Internal Developer Platform β€” from idea to production in under 10 minutes.

Bootstrap ArgoCD Crossplane Kyverno OTel License


⚑ 60-second overview

Developer fills Backstage form
        β”‚
        β–Ό
 Crossplane provisions:          ArgoCD watches git β†’
  β”œβ”€ RDS PostgreSQL               auto-deploys every push
  β”œβ”€ S3 Bucket                         β”‚
  β”œβ”€ ElastiCache Redis                 β–Ό
  └─ Kubernetes namespace        Kyverno enforces:
        β”‚                          β”œβ”€ Required labels
        β–Ό                          β”œβ”€ Resource limits
  OTel Collector (auto-injected)  β”œβ”€ OTel env injection
  β”œβ”€ Metrics β†’ Prometheus          └─ Cosign signatures (Audit)
  β”œβ”€ Traces  β†’ Tempo
  └─ Logs    β†’ Loki β†’ Grafana

No tickets. No waiting. No toil.


🚨 Before you do anything β€” replace YOUR_ORG

Every image reference, GitOps repo URL, and Go module path uses YOUR_ORG as a placeholder. Run this once from the project root before any other command:

ORG=your-github-org-name          # e.g. acme-corp
grep -rl "YOUR_ORG" . \
  --include="*.yaml" \
  --include="*.mod"  \
  --include="*.go"   \
  | xargs sed -i "s/YOUR_ORG/${ORG}/g"

That's the only change required for local Codespaces dev.


πŸš€ Quickstart

Option A β€” GitHub Codespaces (recommended)

  1. Push this repo to github.com/YOUR_ORG/platform-one
  2. Click Code β†’ Codespaces β†’ Create codespace on main
  3. Wait ~8 minutes β€” bootstrap.sh runs fully automatically
  4. All UIs appear as forwarded ports in the Codespaces panel

Option B β€” Local (requires Docker + 16 GB RAM)

# 1. Scaffold the directory structure
bash init.sh ./platform-one && cd platform-one

# 2. Replace org placeholder
grep -rl "YOUR_ORG" . --include="*.yaml" --include="*.mod" \
  | xargs sed -i "s/YOUR_ORG/your-org/g"

# 3. Bootstrap everything
bash .devcontainer/bootstrap.sh

# 4. Open all UIs via port-forward
make pf

# 5. Seed Vault with platform secrets
make vault-setup

πŸ–₯️ UIs & access .

Service URL Credentials
Platform Portal http://localhost:8080 β€”
ArgoCD http://localhost:8090 admin / make argocd-pw
Grafana http://localhost:3000 admin / prom-operator
Prometheus http://localhost:9090 β€”
Vault http://localhost:8200 token: root

πŸ“‹ All commands

make help             # Full command reference

# ── Cluster ───────────────────────────────────────────────
make bootstrap        # Full install: cluster + all infra (idempotent)
make up               # Start a stopped cluster
make down             # Stop cluster, preserve state
make reset            # Destroy + recreate from scratch

# ── Access ────────────────────────────────────────────────
make pf               # Start port-forwards for all UIs
make pf-stop          # Stop port-forwards
make argocd-pw        # Print ArgoCD admin password
make status           # Show pod + ArgoCD app health

# ── Platform ops ──────────────────────────────────────────
make vault-setup      # Seed Vault + configure k8s auth
make apply-policies   # Apply/update Kyverno policies
make apply-xrds       # Apply Crossplane XRDs + compositions

# ── Development ───────────────────────────────────────────
make portal-dev       # Run portal locally, no k8s needed
make build-all        # Build all Docker images
make lint             # conftest policy checks on k8s manifests
make test             # Run Go unit tests
make logs             # Tail logs from all app pods

πŸ“ Project structure

platform-one/
β”‚
β”œβ”€β”€ πŸ“„ init.sh                          ← Scaffold entire skeleton in one command
β”œβ”€β”€ πŸ“„ Makefile                         ← All operational commands
β”‚
β”œβ”€β”€ πŸ“‚ .devcontainer/
β”‚   β”œβ”€β”€ devcontainer.json               ← Codespaces: 4 CPU, 16 GB, auto-bootstrap
β”‚   └── bootstrap.sh                    ← Full idempotent cluster + infra install
β”‚
β”œβ”€β”€ πŸ“‚ .github/workflows/
β”‚   β”œβ”€β”€ ci.yaml                         ← Trivy + Checkov + cosign + GitOps push
β”‚   └── portal.yaml                     ← Portal image build + sign + deploy
β”‚
β”œβ”€β”€ πŸ“‚ apps/
β”‚   β”œβ”€β”€ microservice/                   ← Go REST API (Prometheus, distroless, non-root)
β”‚   β”‚   β”œβ”€β”€ cmd/server/main.go          ← HTTP server with /healthz /metrics /api/items
β”‚   β”‚   β”œβ”€β”€ go.mod
β”‚   β”‚   β”œβ”€β”€ Dockerfile                  ← Multi-stage, gcr.io/distroless/static
β”‚   β”‚   β”œβ”€β”€ k8s/                        ← Namespace + Deployment + Service + Ingress
β”‚   β”‚   └── rollout.yaml                ← Argo Rollouts canary + AnalysisTemplates
β”‚   β”‚
β”‚   β”œβ”€β”€ frontend/                       ← React + Vite SPA (Nginx, 8080, non-root)
β”‚   β”‚   β”œβ”€β”€ src/                        ← React source (replace with your app)
β”‚   β”‚   β”œβ”€β”€ Dockerfile                  ← Node build β†’ Nginx serve
β”‚   β”‚   └── k8s/                        ← Namespace + Deployment + Service + Ingress
β”‚   β”‚
β”‚   └── kafka-consumer/                 ← Go Kafka consumer (DLQ, OTel, Prometheus)
β”‚       β”œβ”€β”€ cmd/consumer/main.go        ← Sarama consumer group with dead-letter queue
β”‚       β”œβ”€β”€ go.mod
β”‚       β”œβ”€β”€ Dockerfile
β”‚       └── k8s/                        ← Namespace + Deployment + ConfigMap + Service
β”‚
β”œβ”€β”€ πŸ“‚ backstage/templates/
β”‚   β”œβ”€β”€ rest-microservice-template.yaml ← Form β†’ repo + ArgoCD app + Crossplane infra
β”‚   β”œβ”€β”€ frontend-app-template.yaml
β”‚   └── kafka-consumer-template.yaml
β”‚
β”œβ”€β”€ πŸ“‚ infrastructure/
β”‚   β”œβ”€β”€ argocd/
β”‚   β”‚   β”œβ”€β”€ helm-values.yaml            ← ArgoCD Helm config (insecure local mode)
β”‚   β”‚   β”œβ”€β”€ apps/
β”‚   β”‚   β”‚   β”œβ”€β”€ root-app.yaml           ← App-of-apps bootstrap point
β”‚   β”‚   β”‚   β”œβ”€β”€ portal.yaml             ← Platform portal ArgoCD app
β”‚   β”‚   β”‚   └── tenant-apps.yaml        ← ApplicationSet: auto-discovers apps/*
β”‚   β”‚   β”œβ”€β”€ apps-infra/                 ← Infra app defs (reference; managed by Helm)
β”‚   β”‚   └── projects/platform-project.yaml
β”‚   β”‚
β”‚   β”œβ”€β”€ crossplane/
β”‚   β”‚   β”œβ”€β”€ xrds/                       ← AppEnvironment CRD definition
β”‚   β”‚   └── compositions/               ← AWS: RDS + S3 + ElastiCache + namespace
β”‚   β”‚
β”‚   β”œβ”€β”€ cert-manager/cluster-issuer.yaml← Self-signed CA for local dev
β”‚   β”œβ”€β”€ external-secrets/               ← ClusterSecretStore + ExternalSecret examples
β”‚   β”œβ”€β”€ monitoring/                     ← kube-prometheus-stack + Loki Helm values
β”‚   └── vault/helm-values.yaml          ← Vault dev mode (root token)
β”‚
β”œβ”€β”€ πŸ“‚ observability/
β”‚   β”œβ”€β”€ otel/collector-config.yaml      ← ConfigMap + OpenTelemetryCollector CR
β”‚   └── grafana/dora-slo-dashboard.json ← DORA 4 metrics + SLO burn rate dashboard
β”‚
β”œβ”€β”€ πŸ“‚ policies/
β”‚   β”œβ”€β”€ kyverno/policy-bundle.yaml      ← 5 policies (labels, limits, registries, OTel, cosign)
β”‚   └── rego/k8s.rego                   ← conftest policies for CI gates
β”‚
β”œβ”€β”€ πŸ“‚ portal/
β”‚   β”œβ”€β”€ server.js                       ← Zero-dependency Node.js server (built-ins only)
β”‚   β”œβ”€β”€ public/index.html               ← Full IDP dashboard UI
β”‚   β”œβ”€β”€ Dockerfile                      ← node:20-alpine, zero npm installs in k8s
β”‚   └── k8s/                            ← Namespace + RBAC + Deployment + Ingress
β”‚
└── πŸ“‚ scripts/
    β”œβ”€β”€ setup-vault.sh                  ← Seed secrets + configure k8s auth
    └── port-forward.sh                 ← Open all UIs [start|stop|status]

πŸ—οΈ Architecture planes

Developer Plane

Backstage Software Templates (3 golden paths: REST API, Frontend, Kafka Consumer). Each template creates a GitHub repo, registers in the Software Catalog, creates an ArgoCD Application, and fires a Crossplane Composite Resource Claim β€” all in one form submit.

GitOps Plane

ArgoCD with an ApplicationSet that auto-discovers every apps/*/k8s/ directory. Every new repo gets a fully managed ArgoCD Application with automated sync and self-heal. Argo Rollouts handles progressive delivery with Prometheus-gated canary analysis.

Policy Plane

Kyverno with five policies applied at admission time:

Policy Mode What it does
require-labels Enforce Blocks any Deployment missing team or app.kubernetes.io/name
require-resource-limits Enforce Blocks any Pod without CPU + memory limits
restrict-image-registries Audit Reports images not from approved registries
inject-otel-env Mutate Adds OTEL_* env vars to pods in labelled namespaces
verify-image-signatures Audit Reports unsigned images (cosign keyless)

Infrastructure Plane

Crossplane AppEnvironment Composite Resource provisions: RDS PostgreSQL + S3 bucket + optional ElastiCache Redis + Kubernetes namespace β€” all from one kubectl apply.

Observability Plane

OpenTelemetry Collector running as a Deployment:

  • Metrics β†’ Prometheus (remote write)
  • Traces β†’ Tempo
  • Logs β†’ Loki

All correlated in Grafana via exemplars. DORA metrics dashboard included.


πŸ“ Implementation roadmap

Week 1-2   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  k3d + ArgoCD + GitOps structure
Week 3-4   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  Backstage + 3 Software Templates
Week 5-6   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘  Crossplane XRDs + AWS provisioning
Week 7-8   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  Vault + ESO + Kyverno policies
Week 9-10  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  Argo Rollouts + OTel pipeline
Week 11-12 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  Karpenter + CI gates + DORA dashboard

🏭 Production (AWS EKS)

Additional requirements beyond local dev:

# IAM roles needed
KarpenterNodeRole-platform-one
CrossplaneProviderRole   # AmazonRDS*, AmazonS3*, AmazonElastiCache*, EKS*

# Additional placeholder to replace
your-ecr-account β†’ your AWS account ID
# In: policies/kyverno/policy-bundle.yaml

# Secrets in AWS Secrets Manager
/platform-one/argocd/github-token
/platform-one/backstage/github-oauth-client-id
/platform-one/backstage/github-oauth-client-secret

πŸ“Š DORA metrics (target)

Metric Target Elite threshold
Deployment Frequency 14.2 /day > 1/day
Lead Time for Changes 23 min < 1 hour
Change Failure Rate 2.1 % < 5%
MTTR 18 min < 1 hour

πŸ›‘οΈ Security posture

  • Zero-trust networking β€” SPIFFE/SPIRE workload identity (phase 6)
  • Keyless image signing β€” cosign OIDC via GitHub Actions OIDC token
  • No long-lived secrets β€” all secrets from Vault via External Secrets Operator
  • Admission control β€” Kyverno blocks non-compliant workloads at API server
  • Supply chain β€” Trivy + Checkov + conftest in every PR
  • Audit mode for strict policies β€” cosign + registry restrictions are Audit in dev, switch to Enforce in production by editing validationFailureAction

πŸ’° Cost optimisation

Karpenter NodePool configured for spot/on-demand mix:

  • Prefers spot instances (karpenter.sh/capacity-type: spot)
  • Falls back to on-demand automatically
  • Consolidates underutilised nodes every 30 seconds
  • Expected saving: ~65% vs on-demand only

🀝 Contributing

  1. Fork the repo
  2. Open in Codespaces (bootstrap runs automatically)
  3. Make changes in a branch
  4. CI runs: trivy + checkov + conftest on every PR
  5. Merge β†’ ArgoCD auto-deploys

Built with Backstage Β· Crossplane Β· ArgoCD Β· Kyverno Β· Vault Β· OpenTelemetry

⭐ Star this repo if it saved you from filing a ticket

About

An enterprise-ready Internal Developer Platform (IDP) enabling self-service app provisioning, policy-as-code guardrails, and deep DORA observability

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors