Executor Parameters Reference¶
Each executor type accepts a specific parameter schema in the parameters field of a HibernatePlan target.
See API Reference for the core CRD types.
Executor Types¶
- EKSParameters (
type: eks) - KarpenterParameters (
type: karpenter) - EC2Parameters (
type: ec2) - RDSParameters (
type: rds) - GKEParameters (
type: gke) - CloudSQLParameters (
type: cloudsql) - WorkloadScalerParameters (
type: workloadscaler) - NoOpParameters (
type: noop)
EKSParameters¶
Executor type: eks
EKSParameters defines the expected parameters for the EKS executor.
EKS executor only handles Managed Node Groups via AWS API.
For Karpenter NodePools, use the separate Karpenter executor.
| Field | Type | Description |
|---|---|---|
clusterName |
string | ClusterName is the EKS cluster name (required). |
nodeGroups |
[]EKSNodeGroup | NodeGroups to hibernate. If empty, all node groups in the cluster are targeted. |
awaitCompletion |
AwaitCompletion | AwaitCompletion configures whether to wait for node groups to reach the desired state. |
EKSNodeGroup¶
EKSNodeGroup specifies a managed node group to hibernate.
| Field | Type | Description |
|---|---|---|
name |
string | Name is the name of the managed node group. |
AwaitCompletion¶
AwaitCompletion configures whether to wait for operations to complete and timeout settings.
When Enabled=true, executors will poll asynchronously until operations reach the desired state.
Progress is logged through streamlogs at regular intervals (15s) for observability.
Timeout behavior:
- If Enabled=false: no waiting, operation returns immediately after API call (default behavior)
- If Timeout is set (e.g., "5m"): operation will fail if not completed within duration
- If Timeout is empty string: it subjected to each executor default timeout
Defaults vary by executor based on expected operation duration:
- EC2: 5m
- EKS: 10m
- RDS: 15m
- Karpenter: 5m
- WorkloadScaler: 5m
| Field | Type | Description |
|---|---|---|
enabled |
bool | Enabled controls whether to wait for operation completion. Default: false |
timeout |
string | Timeout is the maximum duration to wait for operation completion. Format: duration string (e.g., "5m", "10m", "15m30s") Empty string means no timeout (wait indefinitely). Only applies when Enabled=true. |
KarpenterParameters¶
Executor type: karpenter
KarpenterParameters defines the expected parameters for the Karpenter executor.
| Field | Type | Description |
|---|---|---|
nodePools |
[]string | NodePools is a list of Karpenter NodePool names to hibernate. DEPRECATED: Use nodeSelector for label-based selection. Mutually exclusive with NodeSelector. |
nodeSelector |
*metav1.LabelSelector | NodeSelector selects NodePools by labels using Kubernetes LabelSelector semantics. Mutually exclusive with NodePools. |
awaitCompletion |
AwaitCompletion | AwaitCompletion configures whether to wait for node pools to drain. |
EC2Parameters¶
Executor type: ec2
EC2Parameters defines the expected parameters for the EC2 executor.
| Field | Type | Description |
|---|---|---|
selector |
EC2Selector | Selector defines how to find EC2 instances to hibernate. |
awaitCompletion |
AwaitCompletion | AwaitCompletion configures whether to wait for EC2 instances to reach the desired state. |
EC2Selector¶
EC2Selector defines how to find EC2 instances.
SELECTION METHODS (mutually exclusive server-side filters):
- Tags: server-side filter via AWS DescribeInstances Filters
- InstanceIDs: server-side filter via explicit InstanceIds
CLIENT-SIDE FILTER:
- TagSelector: applied AFTER instances are fetched. Can be used alone or combined
with InstanceIDs, but is mutually exclusive with Tags.
At least one selection method must be specified.
| Field | Type | Description |
|---|---|---|
tags |
map[string]string | Tags filters instances by AWS resource tags using DescribeInstances Filters. Applied server-side before instances are returned. Mutually exclusive with InstanceIDs (both are server-side filters). |
tagSelector |
*TagSelector | TagSelector provides flexible expression-based tag matching. Applied client-side after instances are fetched. Mutually exclusive with Tags. |
instanceIds |
[]string | InstanceIDs is a list of explicit EC2 instance IDs to target. Applied server-side via DescribeInstances InstanceIds. Mutually exclusive with Tags (both are server-side filters). |
TagSelector¶
TagSelector defines how to select AWS resources by tags.
| Field | Type | Description |
|---|---|---|
matchTags |
map[string]string | MatchTags is a map of {key,value} pairs. A single {key,value} is equivalent to a MatchExpression with operator "In" and a single value. Empty value means match any value for that key (Exists semantics). |
matchExpressions |
[]TagSelectorRequirement | MatchExpressions is a list of tag selector requirements. The requirements are ANDed. |
TagSelectorRequirement¶
TagSelectorRequirement is a selector that contains values, a key, and an operator that
relates the key and values.
| Field | Type | Description |
|---|---|---|
key |
string | Key is the tag key that the selector applies to. |
operator |
string | Operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist, Matches, and NotMatches. |
values |
[]string | Values is an array of string values. If the operator is In, NotIn, Matches, or NotMatches,the values array must be non-empty. If the operator is Exists or DoesNotExist,the values array must be empty. |
RDSParameters¶
Executor type: rds
RDSParameters defines the expected parameters for the RDS executor.
| Field | Type | Description |
|---|---|---|
snapshotBeforeStop |
bool | SnapshotBeforeStop creates a final snapshot before stopping RDS instances. |
selector |
RDSSelector | Selector defines how to find RDS instances and clusters to hibernate. |
awaitCompletion |
AwaitCompletion | AwaitCompletion configures whether to wait for RDS resources to reach the desired state. |
RDSSelector¶
RDSSelector defines how to find RDS instances and clusters.
MUTUAL EXCLUSIVITY RULES:
Only ONE of the following selection methods can be used:
1. Tag-based selection: tags OR excludeTags OR tagSelector
2. Explicit IDs: instanceIds and/or clusterIds (intent-based, discovers exactly what you specify)
3. Discovery mode: includeAll
RESOURCE TYPE CONTROL:
For intent-based selection (instanceIds/clusterIds), resource types are implicit:
- If instanceIds specified → discovers instances
- If clusterIds specified → discovers clusters
- If both specified → discovers both
For dynamic discovery (tags/excludeTags/tagSelector/includeAll), discoverInstances and discoverClusters
must be explicitly enabled (opt-out by default):
- Neither set: no resources discovered (no-op)
- discoverInstances: true only: discovers only DB instances
- discoverClusters: true only: discovers only DB clusters
- Both true: discovers both instances and clusters
Examples (valid):
- {tags: {"env": "prod"}, discoverInstances: true} — tag-based, discovers only DB instances
- {excludeTags: {"critical": "true"}, discoverClusters: true} — exclusion-based, discovers only DB clusters
- {tagSelector: {matchTags: {"env": "prod"}}, discoverInstances: true} — expression-based
- {instanceIds: ["db-1", "db-2"], clusterIds: ["cluster-1"]} — explicit IDs; resource types inferred from which IDs are provided
- {includeAll: true, discoverInstances: true, discoverClusters: true} — discovers all instances and clusters in the region
Examples (no-op — nothing will be discovered):
- {tags: {"env": "prod"}} — tag-based selection requires at least one of discoverInstances or discoverClusters
Examples (invalid — rejected at validation):
- {tags: {...}, instanceIds: [...]} — cannot mix tag-based selection with explicit IDs
- {tags: {...}, excludeTags: {...}} — tags and excludeTags are mutually exclusive
- {tags: {...}, tagSelector: {...}} — tags and tagSelector are mutually exclusive
- {includeAll: true, tags: {...}} — includeAll cannot be combined with any other selector
| Field | Type | Description |
|---|---|---|
tags |
map[string]string | Tags for inclusion. If value is empty string "", matches any instance with that key. If value is non-empty, matches only exact key=value. DEPRECATED: Use tagSelector for expression-based matching. Mutually exclusive with: ExcludeTags, TagSelector, InstanceIDs, ClusterIDs, IncludeAll. |
excludeTags |
map[string]string | ExcludeTags for exclusion. Same logic: empty value = exclude if key exists. DEPRECATED: Use tagSelector with DoesNotExist/NotIn operators instead. Mutually exclusive with: Tags, TagSelector, InstanceIDs, ClusterIDs, IncludeAll. |
tagSelector |
*TagSelector | TagSelector provides flexible expression-based tag matching. Mutually exclusive with Tags and ExcludeTags. |
instanceIds |
[]string | Explicit DB instance IDs to target. Can be combined with ClusterIDs, but mutually exclusive with tag-based selection or IncludeAll. |
clusterIds |
[]string | Explicit DB cluster IDs to target. Can be combined with InstanceIDs, but mutually exclusive with tag-based selection or IncludeAll. |
includeAll |
bool | IncludeAll discovers all DB instances and clusters in the account/region. Mutually exclusive with all other selection methods. |
discoverInstances |
bool | DiscoverInstances controls whether to discover DB instances for dynamic selection methods. Only used with tags, excludeTags, tagSelector, or includeAll (ignored for explicit instanceIds/clusterIds).Must be explicitly set to true to discover instances. Default: false (opt-out, no-op). |
discoverClusters |
bool | DiscoverClusters controls whether to discover DB clusters for dynamic selection methods. Only used with tags, excludeTags, tagSelector, or includeAll (ignored for explicit instanceIds/clusterIds).Must be explicitly set to true to discover clusters. Default: false (opt-out, no-op). |
GKEParameters¶
Executor type: gke
GKEParameters defines the expected parameters for the GKE executor.
| Field | Type | Description |
|---|---|---|
nodePools |
[]string | NodePools is a list of GKE node pool names to hibernate. |
CloudSQLParameters¶
Executor type: cloudsql
CloudSQLParameters defines the expected parameters for the Cloud SQL executor.
| Field | Type | Description |
|---|---|---|
instanceName |
string | InstanceName is the Cloud SQL instance name. |
project |
string | Project is the GCP project ID containing the instance. |
WorkloadScalerParameters¶
Executor type: workloadscaler
WorkloadScalerParameters defines the expected parameters for the workloadscaler executor.
| Field | Type | Description |
|---|---|---|
includedGroups |
[]string | IncludedGroups specifies which workload kinds to scale. Defaults to [Deployment]. |
namespace |
NamespaceSelector | Namespace specifies the namespace scope for discovery (exactly one must be set). |
workloadSelector |
*metav1.LabelSelector | WorkloadSelector filters workloads by labels (optional). |
awaitCompletion |
AwaitCompletion | AwaitCompletion controls whether to wait for replica counts to match desired state. |
NamespaceSelector¶
NamespaceSelector defines how to select namespaces.
| Field | Type | Description |
|---|---|---|
literals |
[]string | Literals is a list of explicit namespace names. |
selector |
map[string]string | Selector is a label selector for namespaces (mutually exclusive with Literals). |
NoOpParameters¶
Executor type: noop
NoOpParameters defines the expected parameters for the noop executor.
| Field | Type | Description |
|---|---|---|
randomDelaySeconds |
int | RandomDelaySeconds specifies the maximum duration in seconds for random sleep during operations. The actual delay will be randomly chosen between 0 and this value. Maximum allowed is 30 seconds. Defaults to 1 if not specified. |
failureMode |
string | FailureMode specifies when to simulate failures. Valid values: "none", "shutdown", "wakeup", "both". Defaults to "none". |
failureMessage |
string | FailureMessage allows customizing the error message for simulated failures. If empty, a default message will be used. |