API Reference¶
Packages¶
hibernator.ardikabs.com/v1alpha1¶
Package v1alpha1 contains API Schema definitions for the hibernator v1alpha1 API group.
Resource Types¶
AWSAuth¶
AWSAuth defines AWS authentication configuration.
Appears in: - AWSConfig
| Field | Description | Default | Validation |
|---|---|---|---|
serviceAccount ServiceAccountAuth |
ServiceAccount configures IRSA-based authentication. | Optional: {} |
|
static StaticAuth |
Static configures static credential-based authentication. | Optional: {} |
AWSConfig¶
AWSConfig holds AWS-specific configuration.
Appears in: - CloudProviderSpec
| Field | Description | Default | Validation |
|---|---|---|---|
accountId string |
AccountId is the AWS account ID. | Required: {} |
|
region string |
Region is the AWS region. | Required: {} |
|
assumeRoleArn string |
AssumeRoleArn is the IAM role ARN to assume (optional). Can be used with both ServiceAccount (IRSA) and Static authentication. When using IRSA: the pod's SA credentials are used to assume this role. When using Static: the static credentials are used to assume this role. |
Optional: {} |
|
auth AWSAuth |
Auth configures authentication method. At least one of Auth.ServiceAccount or Auth.Static must be specified. |
Required: {} |
Behavior¶
Behavior defines execution behavior.
Appears in: - HibernatePlanSpec
| Field | Description | Default | Validation |
|---|---|---|---|
mode BehaviorMode |
Mode determines how failures are handled. | Strict | Enum: [Strict BestEffort] |
failFast boolean |
FailFast stops execution on first failure. Strict mode already implies fail-fast behavior. Deprecated: FailFast is deprecated and will be removed in a future release. Use Mode=Strict for fail-fast behavior. |
true | |
retries integer |
Retries is the maximum number of retry attempts for failed operations. | 3 | Maximum: 10 Minimum: 0 Optional: {} |
BehaviorMode¶
Underlying type: string
BehaviorMode defines execution behavior.
Validation: - Enum: [Strict BestEffort]
Appears in: - Behavior
| Field | Description |
|---|---|
Strict |
BehaviorStrict halts execution immediately when any target fails. No further targets (or stages) are started; the plan transitions to Error. |
BestEffort |
BehaviorBestEffort continues executing remaining targets even if some fail. Failed targets are recorded in status but do not block others. |
CloudProvider¶
CloudProvider is the Schema for the cloudproviders API.
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string |
hibernator.ardikabs.com/v1alpha1 |
||
kind string |
CloudProvider |
||
metadata ObjectMeta |
Refer to Kubernetes API documentation for fields of metadata. |
||
spec CloudProviderSpec |
Spec defines the desired state of CloudProvider. | ||
status CloudProviderStatus |
Status defines the observed state of CloudProvider. |
CloudProviderSpec¶
CloudProviderSpec defines the desired state of CloudProvider.
Appears in: - CloudProvider
| Field | Description | Default | Validation |
|---|---|---|---|
type CloudProviderType |
Type of cloud provider. | Enum: [aws] Required: {} |
|
aws AWSConfig |
AWS holds AWS-specific configuration (required when Type=aws). | Optional: {} |
CloudProviderStatus¶
CloudProviderStatus defines the observed state of CloudProvider.
Appears in: - CloudProvider
| Field | Description | Default | Validation |
|---|---|---|---|
ready boolean |
Ready indicates if the provider is ready to use. | ||
message string |
Message provides status details. | Optional: {} |
|
lastValidated Time |
LastValidated is when credentials were last validated. | Optional: {} |
CloudProviderType¶
Underlying type: string
CloudProviderType defines supported cloud providers.
Validation: - Enum: [aws]
Appears in: - CloudProviderSpec
| Field | Description |
|---|---|
aws |
ConnectorRef¶
ConnectorRef references a connector resource.
Appears in: - Target
| Field | Description | Default | Validation |
|---|---|---|---|
kind string |
Kind of the connector (CloudProvider or K8SCluster). | Enum: [CloudProvider K8SCluster] |
|
name string |
Name of the connector resource. | ||
namespace string |
Namespace of the connector resource (defaults to plan namespace). | Optional: {} |
Dependency¶
Dependency represents a DAG edge (from -> to).
Appears in: - ExecutionStrategy
| Field | Description | Default | Validation |
|---|---|---|---|
from string |
From is the source target name. | ||
to string |
To is the destination target name that depends on From. |
EKSConfig¶
EKSConfig holds EKS-specific configuration.
Appears in: - K8SClusterSpec
| Field | Description | Default | Validation |
|---|---|---|---|
name string |
Name is the EKS cluster name. | Required: {} |
|
region string |
Region is the AWS region. | Required: {} |
ExceptionReference¶
ExceptionReference tracks an exception in the plan's history.
Appears in: - HibernatePlanStatus
| Field | Description | Default | Validation |
|---|---|---|---|
name string |
Name of the ScheduleException. | ||
type ExceptionType |
Type of the exception (extend, suspend, replace). | Enum: [extend suspend replace] |
|
validFrom Time |
ValidFrom is when the exception period starts. | ||
validUntil Time |
ValidUntil is when the exception period ends. | ||
state ExceptionState |
State is the current state of the exception. | Enum: [Pending Active Expired Detached] |
|
appliedAt Time |
AppliedAt is when the exception was first applied. | Optional: {} |
ExceptionState¶
Underlying type: string
ExceptionState represents the lifecycle state of an exception.
Validation: - Enum: [Pending Active Expired Detached]
Appears in: - ExceptionReference - ScheduleExceptionStatus
| Field | Description |
|---|---|
Pending |
ExceptionStatePending indicates the exception is not yet active. |
Active |
ExceptionStateActive indicates the exception is currently active. |
Expired |
ExceptionStateExpired indicates the exception has passed its validUntil time. |
Detached |
ExceptionStateDetached indicates the referenced plan no longer exists. The exception is still a valid resource but is not bound to any plan. If a plan with the same name is re-created, the exception may transition back to a time-based state (Pending, Active, or Expired). |
ExceptionType¶
Underlying type: string
ExceptionType defines the type of schedule exception.
Validation: - Enum: [extend suspend replace]
Appears in: - ExceptionReference - ScheduleExceptionSpec
| Field | Description |
|---|---|
extend |
ExceptionExtend adds hibernation windows to the base schedule. |
suspend |
ExceptionSuspend prevents hibernation during specified windows (carve-out). |
replace |
ExceptionReplace completely replaces the base schedule during the exception period. |
Execution¶
Execution holds strategy configuration.
Appears in: - HibernatePlanSpec
| Field | Description | Default | Validation |
|---|---|---|---|
strategy ExecutionStrategy |
Strategy defines how targets are executed. |
ExecutionCycle¶
ExecutionCycle groups a shutdown and corresponding wakeup operation.
Appears in: - HibernatePlanStatus
| Field | Description | Default | Validation |
|---|---|---|---|
cycleId string |
CycleID is a unique identifier for this cycle. | ||
shutdownExecution ExecutionOperationSummary |
ShutdownExecution summarizes the shutdown operation. | Optional: {} |
|
wakeupExecution ExecutionOperationSummary |
WakeupExecution summarizes the wakeup operation. | Optional: {} |
ExecutionOperationSummary¶
ExecutionOperationSummary summarizes the results of a shutdown or wakeup operation.
Appears in: - ExecutionCycle
| Field | Description | Default | Validation |
|---|---|---|---|
operation PlanOperation |
Operation is the operation type (shutdown or wakeup). | Enum: [shutdown wakeup] |
|
startTime Time |
StartTime is when the operation started. | ||
endTime Time |
EndTime is when the operation completed. | Optional: {} |
|
targetResults TargetExecutionResult array |
TargetResults summarizes the result for each target. | Optional: {} |
|
success boolean |
Success indicates if all targets completed successfully. | ||
errorMessage string |
ErrorMessage contains error details if the operation failed. | Optional: {} |
ExecutionState¶
Underlying type: string
ExecutionState represents per-target execution state.
Validation: - Enum: [Pending Running Completed Failed Aborted]
Appears in: - ExecutionStatus - TargetExecutionResult
| Field | Description |
|---|---|
Pending |
StatePending means the target execution is waiting to start (e.g., waiting for schedule or dependencies). |
Running |
StateRunning means the target execution is in progress (e.g., runner Job is active). |
Completed |
StateCompleted means the target execution finished successfully. |
Failed |
StateFailed means the target execution finished with failure (e.g., runner Job failed). |
Aborted |
StateAborted indicates the target was not executed because an upstream dependency failed (DAG pruning). Distinct from StateFailed which means the target's own Job execution failed. Currently only relevant with DAG strategy and BestEffort behavior, but may be extended to other strategies/behaviors in the future. |
ExecutionStatus¶
ExecutionStatus represents per-target execution status.
Appears in: - HibernatePlanStatus
| Field | Description | Default | Validation |
|---|---|---|---|
target string |
Target identifier (type/name). | ||
executor string |
Executor used for this target. | ||
state ExecutionState |
State of execution. | Enum: [Pending Running Completed Failed Aborted] |
|
startedAt Time |
StartedAt is when execution started. | Optional: {} |
|
finishedAt Time |
FinishedAt is when execution finished. | Optional: {} |
|
attempts integer |
Attempts is the number of execution attempts. | ||
message string |
Message provides human-readable status. | Optional: {} |
|
jobRef string |
JobRef is the namespace/name of the runner Job. | Optional: {} |
|
logsRef string |
LogsRef is the reference to logs (stream id or object path). | Optional: {} |
|
restoreRef string |
RestoreRef is the reference to restore metadata artifact. | Optional: {} |
|
serviceAccountRef string |
ServiceAccountRef is the namespace/name of ephemeral SA. | Optional: {} |
|
connectorSecretRef string |
ConnectorSecretRef is the namespace/name of connector secret. | Optional: {} |
|
restoreConfigMapRef string |
RestoreConfigMapRef is the namespace/name of restore hints ConfigMap. | Optional: {} |
ExecutionStrategy¶
ExecutionStrategy defines how targets are executed.
Appears in: - Execution
| Field | Description | Default | Validation |
|---|---|---|---|
type ExecutionStrategyType |
Type of execution strategy. | Enum: [Sequential Parallel DAG Staged] Required: {} |
|
maxConcurrency integer |
MaxConcurrency limits concurrent executions (for Parallel/DAG/Staged). | Minimum: 1 Optional: {} |
|
dependencies Dependency array |
Dependencies define DAG edges (only valid when Type=DAG). | Optional: {} |
|
stages Stage array |
Stages define execution groups (only valid when Type=Staged). | Optional: {} |
ExecutionStrategyType¶
Underlying type: string
ExecutionStrategyType defines the execution strategy.
Validation: - Enum: [Sequential Parallel DAG Staged]
Appears in: - ExecutionStrategy
| Field | Description |
|---|---|
Sequential |
StrategySequential executes targets one at a time in the order they are listed in spec.targets. |
Parallel |
StrategyParallel executes all targets concurrently, optionally bounded by MaxConcurrency. |
DAG |
StrategyDAG executes targets according to a directed acyclic graph defined by spec.execution.strategy.dependencies. Targets with no incoming edges run first; downstream targets wait for their dependencies to complete. |
Staged |
StrategyStaged executes targets in explicitly defined groups (stages) in order. Within each stage targets may run sequentially or in parallel depending on stage.parallel. |
GKEConfig¶
GKEConfig holds GKE-specific configuration.
Appears in: - K8SClusterSpec
| Field | Description | Default | Validation |
|---|---|---|---|
name string |
Name is the GKE cluster name. | Required: {} |
|
project string |
Project is the GCP project. | Required: {} |
|
location string |
Zone or region of the cluster. | Required: {} |
HibernateNotification¶
HibernateNotification is the Schema for the hibernatenotifications API.
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string |
hibernator.ardikabs.com/v1alpha1 |
||
kind string |
HibernateNotification |
||
metadata ObjectMeta |
Refer to Kubernetes API documentation for fields of metadata. |
||
spec HibernateNotificationSpec |
Spec defines the desired state of HibernateNotification. | ||
status HibernateNotificationStatus |
Status defines the observed state of HibernateNotification. |
HibernateNotificationSpec¶
HibernateNotificationSpec defines the desired state of HibernateNotification.
Appears in: - HibernateNotification
| Field | Description | Default | Validation |
|---|---|---|---|
selector LabelSelector |
Selector selects HibernatePlans by label. The notification applies to all plans in the same namespace matching this selector. |
Required: {} |
|
onEvents NotificationEvent array |
OnEvents specifies which hook points trigger this notification. | Enum: [Start Success Failure Recovery PhaseChange ExecutionProgress] MinItems: 1 Required: {} |
|
sinks NotificationSink array |
Sinks defines the notification destinations. | MinItems: 1 Required: {} |
HibernateNotificationStatus¶
HibernateNotificationStatus defines the observed state of HibernateNotification.
Appears in: - HibernateNotification
| Field | Description | Default | Validation |
|---|---|---|---|
state NotificationState |
State is the lifecycle state of this notification: Bound or Detached. Bound means at least one HibernatePlan matches the selector. Detached means no HibernatePlan matches; the notification can be freely deleted. |
Detached | Enum: [Bound Detached] Optional: {} |
watchedPlans PlanReference array |
WatchedPlans is the list of HibernatePlan references currently matching the selector. | Optional: {} |
|
lastDeliveryTime Time |
LastDeliveryTime is the timestamp of the most recent successful notification delivery across all sinks. Nil if no successful delivery has occurred. |
Optional: {} |
|
lastFailureTime Time |
LastFailureTime is the timestamp of the most recent failed notification delivery across all sinks. Nil if no failure has occurred. |
Optional: {} |
|
sinkStatuses object (keys:string, values:NotificationSinkStatus) |
SinkStatuses stores tracked per-sink delivery state scoped by sink + plan + cycle + operation. The key format is implementation-defined by the controller. Retention prioritizes relevance: for each sink+plan pair, only the most recent 2 cycle entries are retained. |
Optional: {} |
|
observedGeneration integer |
ObservedGeneration is the most recent .metadata.generation observed by the controller. | Optional: {} |
HibernatePlan¶
HibernatePlan is the Schema for the hibernateplans API.
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string |
hibernator.ardikabs.com/v1alpha1 |
||
kind string |
HibernatePlan |
||
metadata ObjectMeta |
Refer to Kubernetes API documentation for fields of metadata. |
||
spec HibernatePlanSpec |
Spec defines the desired state of HibernatePlan. | ||
status HibernatePlanStatus |
Status defines the observed state of HibernatePlan. |
HibernatePlanSpec¶
HibernatePlanSpec defines the desired state of HibernatePlan.
Appears in: - HibernatePlan
| Field | Description | Default | Validation |
|---|---|---|---|
schedule Schedule |
Schedule defines when hibernation occurs. | Required: {} |
|
execution Execution |
Execution defines the execution strategy. | Required: {} |
|
behavior Behavior |
Behavior defines how failures are handled. | Optional: {} |
|
suspend boolean |
Suspend temporarily disables hibernation operations without deleting the plan. When set to true, the plan transitions to Suspended phase and stops all execution. When set to false, the plan transitions back to Active phase and resumes schedule evaluation. Running jobs complete naturally but no new jobs are created while suspended. |
Optional: {} |
|
targets Target array |
Targets are the resources to hibernate. | MinItems: 1 |
HibernatePlanStatus¶
HibernatePlanStatus defines the observed state of HibernatePlan.
Appears in: - HibernatePlan
| Field | Description | Default | Validation |
|---|---|---|---|
currentCycleID string |
CurrentCycleID is the current hibernation cycle identifier. | ||
phase PlanPhase |
Phase is the overall plan phase. | Enum: [Pending Active Hibernating Hibernated WakingUp Suspended Error] |
|
lastTransitionTime Time |
LastTransitionTime is when the phase last changed. | Optional: {} |
|
executions ExecutionStatus array |
Executions is the per-target execution ledger. | Optional: {} |
|
observedGeneration integer |
ObservedGeneration is the last observed generation. | ||
retryCount integer |
RetryCount tracks the number of retry attempts for error recovery. | Optional: {} |
|
lastRetryTime Time |
LastRetryTime is when the last retry attempt was made. | Optional: {} |
|
errorMessage string |
ErrorMessage provides details about the error that caused PhaseError. This field is persistent within a cycle (shutdown + wakeup pair): it is set when the plan enters PhaseError, replaced if a subsequent retry produces a different error, and only cleared when a new cycle begins. Consequently, a plan that recovered via retry may still carry the ErrorMessage from the earlier failure until the next cycle starts. A non-empty ErrorMessage on a completed operation indicates that the operation succeeded after a recovery attempt. |
Optional: {} |
|
exceptionReferences ExceptionReference array |
ExceptionReferences is the history of schedule exceptions for this plan. Maximum 10 entries, ordered by: active state first (most relevant), then by ValidFrom descending (most recent first). Oldest entries are pruned when limit is exceeded. |
Optional: {} |
|
currentStageIndex integer |
CurrentStageIndex tracks which stage is currently executing (0-based). Reset to 0 when starting new hibernation/wakeup cycle. |
Optional: {} |
|
currentOperation PlanOperation |
CurrentOperation tracks the current operation type (shutdown or wakeup). Used to determine which phase to transition to when stages complete. |
Enum: [shutdown wakeup] Optional: {} |
|
executionHistory ExecutionCycle array |
ExecutionHistory records historical execution cycles (max 5). Each cycle contains shutdown and wakeup operation summaries. Oldest cycles are pruned when limit is exceeded. |
Optional: {} |
K8SAccessConfig¶
K8SAccessConfig holds Kubernetes API access configuration.
Appears in: - K8SClusterSpec
| Field | Description | Default | Validation |
|---|---|---|---|
kubeconfigRef KubeconfigRef |
KubeconfigRef references a Secret containing kubeconfig. | Optional: {} |
|
inCluster boolean |
InCluster uses in-cluster config (for self-management). | Optional: {} |
K8SCluster¶
K8SCluster is the Schema for the k8sclusters API.
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string |
hibernator.ardikabs.com/v1alpha1 |
||
kind string |
K8SCluster |
||
metadata ObjectMeta |
Refer to Kubernetes API documentation for fields of metadata. |
||
spec K8SClusterSpec |
Spec defines the desired state of K8SCluster. | ||
status K8SClusterStatus |
Status defines the observed state of K8SCluster. |
K8SClusterSpec¶
K8SClusterSpec defines the desired state of K8SCluster.
Appears in: - K8SCluster
| Field | Description | Default | Validation |
|---|---|---|---|
providerRef ProviderRef |
ProviderRef references the CloudProvider (optional for generic k8s). | Optional: {} |
|
eks EKSConfig |
EKS holds EKS-specific configuration. | Optional: {} |
|
gke GKEConfig |
GKE holds GKE-specific configuration. | Optional: {} |
|
k8s K8SAccessConfig |
K8S holds generic Kubernetes access configuration. | Optional: {} |
K8SClusterStatus¶
K8SClusterStatus defines the observed state of K8SCluster.
Appears in: - K8SCluster
| Field | Description | Default | Validation |
|---|---|---|---|
ready boolean |
Ready indicates if the cluster is reachable. | ||
message string |
Message provides status details. | Optional: {} |
|
lastValidated Time |
LastValidated is when connectivity was last validated. | Optional: {} |
|
clusterType K8SClusterType |
ClusterType is the detected cluster type. | Enum: [eks gke k8s] Optional: {} |
K8SClusterType¶
Underlying type: string
K8SClusterType defines supported Kubernetes cluster types.
Validation: - Enum: [eks gke k8s]
Appears in: - K8SClusterStatus
| Field | Description |
|---|---|
eks |
|
gke |
|
k8s |
KubeconfigRef¶
KubeconfigRef references a kubeconfig Secret.
Appears in: - K8SAccessConfig
| Field | Description | Default | Validation |
|---|---|---|---|
name string |
Name is the name of the Secret containing kubeconfig data. | ||
namespace string |
Namespace is the namespace of the Secret. | Optional: {} |
NotificationEvent¶
Underlying type: string
NotificationEvent defines the hook point that triggers a notification.
Validation: - Enum: [Start Success Failure Recovery PhaseChange ExecutionProgress]
Appears in: - HibernateNotificationSpec
| Field | Description |
|---|---|
Start |
EventStart fires when execution begins after the transition status write succeeds (PostHook on Hibernating/WakingUp transition). |
Success |
EventSuccess fires after execution completes successfully (PostHook on Hibernated/Active). |
Failure |
EventFailure fires when retries exhausted and plan enters permanent Error state (PostHook on Error transition, gated by retryCount >= behavior.retries). |
Recovery |
EventRecovery fires each time the recovery system retries from Error (PreHook). |
PhaseChange |
EventPhaseChange fires on every phase transition (PostHook). Noisy — for audit trails. |
ExecutionProgress |
EventExecutionProgress fires when an individual target's execution state changes (e.g., Pending→Running, Running→Completed/Failed). Only fires on actual state transitions, not on every poll tick. |
NotificationSink¶
NotificationSink defines a destination for notification delivery. All sink-specific configuration (endpoints, credentials, options) is delegated to the referenced Secret under a well-known key ("config"). This minimizes the CRD footprint and keeps sensitive data out of the resource spec.
Appears in: - HibernateNotificationSpec
| Field | Description | Default | Validation |
|---|---|---|---|
name string |
Name is a human-readable identifier for this sink (unique within spec.sinks). | MinLength: 1 Required: {} |
|
type NotificationSinkType |
Type is the sink provider type. | Enum: [slack telegram webhook] Required: {} |
|
secretRef ObjectKeyReference |
SecretRef is the name of the Secret containing the sink configuration. The Secret must contain a key named "config" whose value is a JSON object with all sink-specific settings (endpoint URL, credentials, options). Slack config example: {"webhook_url": "https://hooks.slack.com/services/..."} Telegram config example: {"token": "bot123:ABC", "chat_id": "-100123", "parse_mode": "MarkdownV2"} Webhook config example: {"url": "https://example.com/hook", "headers": {"Authorization": "Bearer ..."}} |
Required: {} |
|
templateRef ObjectKeyReference |
TemplateRef references a ConfigMap key containing a Go template for message formatting. If omitted, a built-in default template is used for the sink type. |
Optional: {} |
NotificationSinkStatus¶
NotificationSinkStatus records tracked delivery state for a sink key.
Appears in: - HibernateNotificationStatus
| Field | Description | Default | Validation |
|---|---|---|---|
sinkName string |
SinkName is the sink name as defined in spec.sinks[].name. | ||
planRef PlanReference |
PlanRef identifies the plan this sink status belongs to. | ||
cycleId string |
CycleID is the execution cycle identifier. | Optional: {} |
|
operation string |
Operation is the operation associated with this sink status (shutdown/wakeup). | Optional: {} |
|
success boolean |
Success indicates whether the most recent delivery attempt succeeded. | ||
transitionTimestamp Time |
TransitionTimestamp is when the most recent delivery attempt completed. | ||
successCount integer |
SuccessCount is the number of successful deliveries for this sink key. | ||
failureCount integer |
FailureCount is the number of failed deliveries for this sink key. | ||
lastSuccessTime Time |
LastSuccessTime is when the most recent successful delivery completed. | Optional: {} |
|
lastFailureTime Time |
LastFailureTime is when the most recent failed delivery completed. | Optional: {} |
|
message string |
Message is a human-readable description of the most recent delivery outcome. | Optional: {} |
|
states object (keys:string, values:string) |
States carries sink-specific arbitrary key/value context for this sink key. Keys should be namespaced by sink type (for example, "slack.thread.root_ts") to avoid collisions. |
Optional: {} |
NotificationSinkType¶
Underlying type: string
NotificationSinkType defines supported notification sink types.
Validation: - Enum: [slack telegram webhook]
Appears in: - NotificationSink
| Field | Description |
|---|---|
slack |
SinkSlack sends notifications via Slack Incoming Webhook URL. |
telegram |
SinkTelegram sends notifications via Telegram Bot API. |
webhook |
SinkWebhook sends notifications via generic HTTP POST webhook. |
NotificationState¶
Underlying type: string
NotificationState defines the lifecycle state of a HibernateNotification.
Validation: - Enum: [Bound Detached]
Appears in: - HibernateNotificationStatus
| Field | Description |
|---|---|
Bound |
NotificationStateBound indicates the notification is attached to at least one HibernatePlan. The notification has a finalizer to ensure graceful cleanup on deletion. |
Detached |
NotificationStateDetached indicates no HibernatePlan references this notification. The finalizer is removed so the notification can be freely deleted. |
ObjectKeyReference¶
ObjectKeyReference is a reference to a specific key in a namespaced object.
Appears in: - NotificationSink
| Field | Description | Default | Validation |
|---|---|---|---|
name string |
Name is the name of the object. | Required: {} |
|
key string |
Key is the key within the object primarily for Secret or ConfigMap data. If omitted, the dispatcher uses a default key ("config" for SecretRef, "template.gotpl" for TemplateRef). |
Optional: {} |
OffHourWindow¶
OffHourWindow defines a time window for hibernation.
Appears in: - Schedule - ScheduleExceptionSpec
| Field | Description | Default | Validation |
|---|---|---|---|
start string |
Start time in HH:MM format (e.g., "20:00"). | Pattern: ^([0-1]?[0-9]\|2[0-3]):[0-5][0-9]$ Required: {} |
|
end string |
End time in HH:MM format (e.g., "06:00"). | Pattern: ^([0-1]?[0-9]\|2[0-3]):[0-5][0-9]$ Required: {} |
|
daysOfWeek string array |
DaysOfWeek specifies which days this window applies to. Valid values: MON, TUE, WED, THU, FRI, SAT, SUN |
MinItems: 1 items:Enum: [MON TUE WED THU FRI SAT SUN] |
Parameters¶
Parameters is an opaque container for executor-specific config. The JSON schema depends on the target's executor type. Each executor defines its own parameter struct in pkg/executorparams (e.g., EKSParameters, RDSParameters, EC2Parameters, KarpenterParameters).
Appears in: - Target
PlanOperation¶
Underlying type: string
PlanOperation identifies the type of operation a HibernatePlan is currently executing. Stored in HibernatePlanStatus.CurrentOperation and used as the LabelOperation value on runner Jobs.
Validation: - Enum: [shutdown wakeup]
Appears in: - ExecutionOperationSummary - HibernatePlanStatus
| Field | Description |
|---|---|
shutdown |
OperationHibernate is the operation value for a hibernate (shutdown) cycle. |
wakeup |
OperationWakeUp is the operation value for a wakeup cycle. |
PlanPhase¶
Underlying type: string
PlanPhase represents the overall phase of the HibernatePlan.
Validation: - Enum: [Pending Active Hibernating Hibernated WakingUp Suspended Error]
Appears in: - HibernatePlanStatus
| Field | Description |
|---|---|
Pending |
PhasePending is the initial phase before the plan has been fully initialized by the controller. |
Active |
PhaseActive means the plan is healthy and within an active (non-off-hour) window. The controller monitors the schedule and will transition to Hibernating when the off-hour window begins. |
Hibernating |
PhaseHibernating means a shutdown operation is in progress. Runner Jobs are being dispatched to stop the configured targets. |
Hibernated |
PhaseHibernated means all targets have been successfully shut down. The plan stays in this phase until the off-hour window ends, then transitions to WakingUp. |
WakingUp |
PhaseWakingUp means a wakeup (restore) operation is in progress. Runner Jobs are being dispatched to restore targets using persisted restore data. |
Suspended |
PhaseSuspended means the plan has been administratively paused via spec.suspend=true. No schedule evaluation or execution occurs while suspended. |
Error |
PhaseError means an execution operation failed and all configured retries have been exhausted. Manual intervention or the retry-now annotation is required to recover. |
PlanReference¶
PlanReference references a HibernatePlan.
Appears in: - HibernateNotificationStatus - NotificationSinkStatus - ScheduleExceptionSpec
| Field | Description | Default | Validation |
|---|---|---|---|
name string |
Name of the HibernatePlan. | Required: {} |
|
namespace string |
Namespace of the HibernatePlan. If empty, defaults to the exception's namespace. |
Optional: {} |
ProviderRef¶
ProviderRef references a CloudProvider.
Appears in: - K8SClusterSpec
| Field | Description | Default | Validation |
|---|---|---|---|
name string |
Name is the name of the CloudProvider resource. | ||
namespace string |
Namespace is the namespace of the CloudProvider resource. | Optional: {} |
Schedule¶
Schedule defines the hibernation schedule.
Appears in: - HibernatePlanSpec
| Field | Description | Default | Validation |
|---|---|---|---|
timezone string |
Timezone for schedule evaluation (e.g., "Asia/Jakarta"). | Required: {} |
|
offHours OffHourWindow array |
OffHours defines when hibernation should occur. | MinItems: 1 |
ScheduleException¶
ScheduleException is the Schema for the scheduleexceptions API.
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string |
hibernator.ardikabs.com/v1alpha1 |
||
kind string |
ScheduleException |
||
metadata ObjectMeta |
Refer to Kubernetes API documentation for fields of metadata. |
||
spec ScheduleExceptionSpec |
Spec defines the desired state of ScheduleException. | ||
status ScheduleExceptionStatus |
Status defines the observed state of ScheduleException. |
ScheduleExceptionSpec¶
ScheduleExceptionSpec defines the desired state of ScheduleException.
Appears in: - ScheduleException
| Field | Description | Default | Validation |
|---|---|---|---|
planRef PlanReference |
PlanRef references the HibernatePlan this exception applies to. | Required: {} |
|
validFrom Time |
ValidFrom is the start time of the exception period (RFC3339 format). | Format: date-time Required: {} Type: string |
|
validUntil Time |
ValidUntil is the end time of the exception period (RFC3339 format). | Format: date-time Required: {} Type: string |
|
type ExceptionType |
Type specifies the exception type: extend, suspend, or replace. | Enum: [extend suspend replace] Required: {} |
|
leadTime string |
LeadTime specifies buffer period before suspension window. Only valid when Type is "suspend". Format: duration string (e.g., "30m", "1h", "3600s"). Prevents NEW hibernation starts within this buffer before suspension. |
Optional: {} Pattern: ^([0-9]+(\.[0-9]+)?(ns\|us\|µs\|ms\|s\|m\|h))+$ |
|
windows OffHourWindow array |
Windows defines the time windows for this exception. Meaning depends on Type: - extend: Additional hibernation windows (union with base schedule) - suspend: Windows to prevent hibernation (carve-out from schedule) - replace: Complete replacement schedule (ignore base schedule) |
MinItems: 1 |
ScheduleExceptionStatus¶
ScheduleExceptionStatus defines the observed state of ScheduleException.
Appears in: - ScheduleException
| Field | Description | Default | Validation |
|---|---|---|---|
state ExceptionState |
State is the current lifecycle state of the exception. | Enum: [Pending Active Expired Detached] |
|
appliedAt Time |
AppliedAt is when the exception was first applied. | Optional: {} |
|
expiredAt Time |
ExpiredAt is when the exception transitioned to Expired state. | Optional: {} |
|
detachedAt Time |
DetachedAt is when the exception transitioned to Detached state (plan was deleted). | Optional: {} |
|
message string |
Message provides diagnostic information about the exception state. | Optional: {} |
SecretReference¶
SecretReference is a reference to a Secret.
Appears in: - StaticAuth
| Field | Description | Default | Validation |
|---|---|---|---|
name string |
Name is the name of the Secret. | ||
namespace string |
Namespace is the namespace of the Secret. | Optional: {} |
ServiceAccountAuth¶
ServiceAccountAuth configures IRSA (IAM Roles for Service Accounts). When specified (even as empty struct), indicates that the runner pod's ServiceAccount should be used for authentication via workload identity. The pod's ServiceAccount must have appropriate cloud provider annotations (e.g., eks.amazonaws.com/role-arn for AWS IRSA).
Appears in: - AWSAuth
Stage¶
Stage defines a group of targets to execute together.
Appears in: - ExecutionStrategy
| Field | Description | Default | Validation |
|---|---|---|---|
name string |
Name of the stage. | ||
parallel boolean |
Parallel indicates if targets in this stage run in parallel. | false | |
maxConcurrency integer |
MaxConcurrency limits parallelism within this stage. | Minimum: 1 Optional: {} |
|
targets string array |
Targets are the names of targets in this stage. |
StaticAuth¶
StaticAuth configures static credentials.
Appears in: - AWSAuth
| Field | Description | Default | Validation |
|---|---|---|---|
secretRef SecretReference |
SecretRef references a Secret containing credentials. |
Target¶
Target defines a hibernation target.
Appears in: - HibernatePlanSpec
| Field | Description | Default | Validation |
|---|---|---|---|
name string |
Name is the unique identifier for this target within the plan. | Required: {} |
|
type string |
Type of the target (e.g., eks, rds, ec2). | Required: {} |
|
connectorRef ConnectorRef |
ConnectorRef references the connector for this target. | Required: {} |
|
parameters Parameters |
Parameters are executor-specific configuration. | Optional: {} |
TargetExecutionResult¶
TargetExecutionResult is the result of a single target execution.
Appears in: - ExecutionOperationSummary
| Field | Description | Default | Validation |
|---|---|---|---|
target string |
Target is the target identifier (type/name). | ||
state ExecutionState |
State is the final execution state (Completed or Failed). | Enum: [Pending Running Completed Failed Aborted] |
|
attempts integer |
Attempts is the number of attempts made. | ||
executionId string |
ExecutionID is the unique identifier for this target execution. | Optional: {} |
|
startedAt Time |
StartedAt is when execution started. | Optional: {} |
|
finishedAt Time |
FinishedAt is when execution finished. | Optional: {} |
|
message string |
Message provides details about the execution outcome. | Optional: {} |