Examples
This directory contains example YAML manifests for the Phase 1.1 controller-based architecture.
Platform CR Examples
Simple Platform
platform-simple.yaml - A basic Platform CR that references a GiteaProvider.
Complete Platform
platform-complete.yaml - A complete example with both Platform and GiteaProvider CRs in a single file.
GiteaProvider Examples
Simple GiteaProvider
giteaprovider-simple.yaml - A basic GiteaProvider CR with auto-generated credentials and organizations.
Usage
- First, ensure you have a Kubernetes cluster running:
kind create cluster
- Apply the CRD manifests:
kubectl apply -f pkg/controllers/resources/idpbuilder.cnoe.io_giteaproviders.yaml
kubectl apply -f pkg/controllers/resources/idpbuilder.cnoe.io_platforms.yaml
- Create the namespace for Gitea:
kubectl create namespace gitea
- Apply the complete example:
kubectl apply -f examples/platform-complete.yaml
- Check the status:
# Check GiteaProvider status
kubectl get giteaprovider -n gitea
# Check Platform status
kubectl get platform
# Get detailed status
kubectl describe platform my-platform
Status Fields
GiteaProvider Status
The GiteaProvider exposes the following duck-typed status fields that the Platform controller uses:
endpoint- External URL for Gitea web UI and cloninginternalEndpoint- Cluster-internal URL for API accesscredentialsSecretRef- Reference to the secret containing admin credentialsconditions- Kubernetes-style conditions, including a "Ready" condition
Platform Status
The Platform aggregates status from all referenced providers:
providers.gitProviders[]- Summary of all Git provider statusesconditions- Overall platform conditionsphase- Current phase (Pending, Ready, Failed)