How kartverket/skiperator works
Main Components
a. Core Operator Components:
• Controller Manager (central component)
• Custom Resource Definitions (CRDs)
• Application
• SKIPJob
• Routing
b. Resource Generators:
• Deployment Generator
• Service Generator
• Network Policy Generator
• Certificate Generator
• Istio Resources Generator
• GCP Integration Components
• Monitoring Components
c. External Integration Points:
• Kubernetes API Server
• Istio Service Mesh
• GCP Services
• Prometheus Monitoring
• Identity Providers (IDPorten/Maskinporten)
┌─ Kubernetes Cluster ──────────────────────────────────────────┐
• ┌─ Skiperator Operator ─────────────────────────────┐ │
• Controllers Resource Generators │ │
• Application - Deployment │ │
• SKIPJob - Service │ │
• Routing - Network Policy │ │
• Namespace - Certificates │ │
• Istio Resources │ │
• Generated Resources │
• Deployments │
• Services │
• Network Policies │
• Certificates │
• Istio Configurations │
• ┘
Flow Directions
Key interactions:
• Custom Resource → Controller Manager
• Controller Manager → Resource Generators
• Resource Generators → Kubernetes API
• External Service Connections
Important Details
a. Resource Processing Pipeline:
CR Definition → Validation → Generation → Reconciliation → Status Update
b. Security Flow:
• Authentication paths
• Authorization policies
• Network policies
c. Monitoring Flow:
• Prometheus metrics
• Service monitoring
• Pod monitoring
Specific Implementation Notes
• Relationship between the three main CRDs (Application, SKIPJob, Routing)
• Resource generation pattern using the pkg/resourcegenerator structure
• Reconciliation loop pattern from pkg/reconciliation
• How the controller handles different resource types
Implementation Details
Controllers (internal/controllers/)
↓
Reconciliation (pkg/reconciliation/)
↓
Resource Generation (pkg/resourcegenerator/)
↓
Resource Processing (pkg/resourceprocessor/)
Remember to:
• Clear boundaries between components
• Operator pattern and Kubernetes native integration
• Major integration points visible in the code structure