Presets¶
Presets recognize cluster infrastructure components that are not managed by Hydra apps but exist as part of the Kubernetes distribution.
Contents¶
- Builtin Presets — All ~30 builtin presets and their purpose
- Preset Structure — YAML format, predicates, optional markers
- Preset Overrides — Customizing presets via global.hydra.presets
- Cluster Overrides — Manually assign live resources to preset apps or normal apps via
hydra.yaml - Preset Activation — Activation logic, chains, debugging
Overview¶
A Kubernetes cluster contains many resources that are not deployed by your apps — CoreDNS, kube-proxy, flannel, metrics-server, etc. These are part of the cluster infrastructure.
Without presets, these resources would appear as untracked in hydra gitops untracked. Presets tell Hydra: "these resources belong to the cluster infrastructure."
How Presets Work¶
- Each preset defines predicates (IDs or CEL expressions) that match infrastructure resources.
- Hydra represents each enabled preset as a preset app, for example
in-cluster.preset.coredns. - Preset anchors and matches assign resources to that preset app in the shared resource model.
- Child resources are then attached through the same owner-reference and generic-ref logic used for normal apps.
Inspecting Presets¶
# Show which presets match against live cluster state
hydra gitops system prod
# Include disabled presets
hydra gitops system prod --all
Prerequisites¶
- Concepts: Dependency Graph
- CEL — CEL expressions are used in preset predicates