Space Templates
Loft allows you to create templates for spaces. Unlike Space Constraints which are enforced for a space, space templates are optional templates that a user can choose to apply when creating a space.
Common use cases for space templates may be:
- Adding development tooling to a namespace
- Deploying pre-populated databases with test data
- Equipping new namespaces with optional credentials such as image pull secrets
Security Templates
Do not use space templates for setting up security-related resources such as NetworkPolicies or LimitRanges. Instead, use Space Constraints to enforce tenant isolation and other security measures.
Working with Space Templates
1. Create Space Template
2. Use Space Template To Create A Space
Configuration
Metadata
Display Name

JSONPath in CRD:
spec.displayName (type: string)
Kubernetes Name

JSONPath in CRD:
metadata.name (type: string)
Description

JSONPath in CRD:
spec.description (type: string)
Labels

JSONPath in CRD:
metadata.labels (type: map[string]string)
Annotations

JSONPath in CRD:
metadata.annotations (type: map[string]string)
Template For Spaces
Labels

JSONPath in CRD:
spec.template.metadata.labels (type: map[string]string)
Annotations

JSONPath in CRD:
spec.template.metadata.annotations (type: map[string]string)
Sleep Mode
Inactivity Timeout

JSONPath in CRD:
spec.template.metadata.annotations["sleepmode.loft.sh/sleep-after"] (type: string)
Auto-Delete Timeout

JSONPath in CRD:
spec.template.metadata.annotations["sleepmode.loft.sh/delete-after"] (type: string)
Sleep Schedule

JSONPath in CRD:
spec.template.metadata.annotations["sleepmode.loft.sh/sleep-schedule"] (type: string)
Wake-Up Schedule

JSONPath in CRD:
spec.template.metadata.annotations["sleepmode.loft.sh/wakeup-schedule"] (type: string)
Scheduling Timezone

JSONPath in CRD:
spec.template.metadata.annotations["sleepmode.loft.sh/timezone"] (type: string)
Apps

JSONPath in CRD:
spec.template.apps (type: AppRef[])
Access To Space Template

JSONPath in CRD:
spec.access (type: Access[])