Preset Activation¶
How presets are activated, chained, and debugged.
Activation Logic¶
A preset is active if:
- Its
enabledoverride istrue, OR - Its embedded
defaultEnabledistrueand no override setsenabled: false, OR - Another active preset's
activateslist includes it and the target preset was not explicitly disabled
A preset is inactive if:
- Its
enabledoverride isfalse, OR - It is not
defaultEnabledand no active preset activates it, OR - It was only activated transitively and another active preset excludes it with
!<preset-id>
An explicit enabled: false wins over activation chains: other presets cannot turn that preset back on. An explicit enabled: true wins over defaultEnabled: false, but it must still be compatible with active exclusions.
Activation Chains¶
Presets can activate other presets:
presets:
talos:
enabled: true
activates:
- coredns # Also enable coredns
- "!flannel" # Do not activate flannel through this chain
activates is resolved as a fixpoint, so chains are transitive: if A activates B, and B activates C, enabling A also enables C.
Entries with ! are exclusions. They block automatic/transitive activation of that target. If the excluded target is still active because it is defaultEnabled or explicitly set to enabled: true, Hydra rejects the configuration instead of silently disabling it. Disable that target directly with enabled: false when you want it off.
Activation can also be gated by the Kubernetes minor version:
The map form supports:
| Field | Meaning |
|---|---|
preset |
Builtin preset id to activate or exclude |
exclude |
Set to true to express the same exclusion as !<preset-id> |
kubernetesMinorMin |
Apply only on Kubernetes minor versions greater than or equal to this value |
kubernetesMinorMax |
Apply only on Kubernetes minor versions less than or equal to this value |
The string form remains supported for simple cases:
Enabling and Disabling Presets¶
Put preset overrides under global.hydra.presets in values:
Use enabled: true to force-enable a builtin preset. Use enabled: false to force-disable it and prevent activation chains from re-enabling it. Omit enabled or set it to null to use the preset's embedded defaultEnabled.
Preset keys are builtin preset ids. Hydra validates unknown ids when it builds the effective preset set.
Inspecting Active Presets¶
# Show active presets and their matches against live cluster
hydra gitops system prod
# Show ALL presets (including inactive) with match status
hydra gitops system prod --all
The output shows:
- Which presets are enabled
- Which predicates match live resources
- Which predicates have unmatched resources (potential configuration issues)
Debugging: Why a Preset Doesn't Match¶
If hydra gitops system shows a preset as active but resources remain untracked:
- Check predicate IDs — Is the resource ID exactly right? (GVK + namespace + name must match perfectly)
- Check CEL expressions — Does the pattern cover the actual resource names?
- Check version gates — Is
kubernetesMinorMin/kubernetesMinorMaxblocking the predicate? - Check optional markers — Optional predicates don't flag as errors when unmatched
Useful Debug Commands¶
# List all live resource IDs
hydra gitops list prod
# Dump a specific resource to see its exact GVK
hydra gitops dump prod | grep "my-resource"
# Check which resources are untracked
hydra gitops untracked prod
Debugging: Unexpected Untracked Resources¶
If resources show as untracked:
- Check if a preset should cover them → enable or add predicates
- Check if an app should own them → add refs in values
- Check if they are truly orphaned → manual cleanup needed