Composing infrastructure across any environment
This repository contains all materials for the PlatformCon 2026 workshop: "Crossplane as your cloud API: Composing infrastructure across any environment."
We build four platform services (DBaaS, FaaS, Object Storage, Cache), each with compositions for Kubernetes (live demo), AWS, Azure, and GCP — all using Crossplane v2.2 with namespace-scoped XRs.
Click Code → Codespaces → Create codespace on main.
The devcontainer automatically bootstraps:
kindcluster namedplatform- Crossplane v2.2 with
function-go-templating,function-pythonic,function-auto-ready - CloudNativePG, Knative Serving, SeaweedFS Operator, Valkey Operator
- Kyverno with all policies
- All XRDs and k8s compositions
Start with: labs/00-setup.md
.
├── .devcontainer/
│ ├── devcontainer.json # Codespaces config (8 core / 16GB recommended)
│ └── post-create.sh # Bootstrap script
├── bootstrap/
│ ├── providers.yaml # Crossplane Providers (k8s + cloud family providers)
│ ├── functions.yaml # Composition Functions (go-templating, pythonic, auto-ready)
│ └── provider-configs.yaml # ProviderConfigs (kubernetes in-cluster + cloud placeholders)
├── xrds/
│ ├── database/ # Database (DBaaS) — CloudNativePG / RDS / Azure DB / CloudSQL
│ ├── function/ # Function (FaaS) — Knative / Lambda / Function App / Cloud Functions
│ ├── bucket/ # Bucket (Storage) — SeaweedFS / S3 / Blob / GCS
│ └── cache/ # Cache (Cache) — Valkey / ElastiCache / Cache for Redis / Memorystore
├── policies/
│ └── kyverno/ # 6 Kyverno policies (validate + mutate)
├── claims/
│ └── examples/ # Example XR manifests per service
├── slides/
│ └── deck.md # Marp slide deck (~40 slides)
└── labs/
├── 00-setup.md # Verify environment
├── 01-install-crossplane.md # Understand the installation
├── 02-database.md # First Database with CloudNativePG
├── 03-multi-cloud.md # go-templating vs pythonic, cloud compositions
├── 04-function-bucket-cache.md # Remaining services
├── 05-kyverno-policy.md # Policy enforcement
└── 06-golden-paths.md # End-to-end platform experience
| Service | k8s Operator | AWS | Azure | GCP |
|---|---|---|---|---|
| Database | CloudNativePG | RDS | Flexible Server | CloudSQL |
| Function | Knative Serving | Lambda | Function App | Cloud Functions v2 |
| Bucket | SeaweedFS | S3 | Blob Storage | Cloud Storage |
| Cache | Valkey (CNCF) | ElastiCache | Cache for Redis | Memorystore |
| Function | Version | Used for |
|---|---|---|
function-go-templating |
v0.11.6 | Database + Bucket compositions |
function-pythonic |
v0.6.0 | Function + Cache compositions |
function-auto-ready |
v0.5.0 | Final step in every pipeline |
The Database k8s composition has both implementations for side-by-side comparison.
| Policy | Type | Rule |
|---|---|---|
require-team-label |
Validate | team label required on all services |
require-cost-center |
Validate | cost-center annotation required |
deny-public-database |
Validate | publicAccess: false on Database |
deny-public-bucket |
Validate | publicAccess: false on Bucket |
enforce-storage-limits |
Validate | ≤ 100 GB in dev-* namespaces |
inject-default-labels |
Mutate | Auto-adds managed-by: crossplane |
This workshop uses Crossplane v2.2 which introduced:
apiVersion: apiextensions.crossplane.io/v2for XRDsspec.scope: Namespaced— XRs are namespace-scoped (no separate claim kind)pkg.crossplane.io/v1for Function resources (not v1beta1)- Users create
Databasedirectly in their namespace — simpler mental model
View the slide deck with Marp:
# Install Marp CLI
npm install -g @marp-team/marp-cli
# Preview in browser
marp --preview slides/deck.md
# Export to HTML
marp slides/deck.md -o slides/deck.htmlApache 2.0