castai-hibernate

by Cast AI

Helm chartv0.2.12App v0.14Verified publisher

CAST AI hibernate CronJobs used to pause and resume Kubernetes cluster on a defined schedule.

About this chart

castai-hibernate

CAST AI hibernate CronJobs used to pause and resume Kubernetes cluster on a defined schedule.

Values

KeyTypeDefaultDescription
agentNamespacestring"castai-agent"
apiKeystring""API token with Full Access permissions and encode base64
apiKeySecretRefstring""Name of secret with Token to be used for authorizing evictor access to the API apiKey and apiKeySecretRef are mutually exclusive The referenced secret must provide the token in .data["API_KEY"].
apiUrlfor Europe use https://api.eu.cast.ai"https://api.cast.ai"
backoffLimitint0
cloudstring""Set CronJobs "Cloud" env variable to [EKS
clusterRoleBindingAdminNamestring"hibernate-admin"
clusterRoleBindingNamestring"hibernate"
clusterRoleNamestring"hibernate"
concurrencyPolicystring"Forbid"
configMapNameFallbackstring"castai-cluster-controller"Name of the fallback ConfigMap (legacy) for backwards compatibility.
configMapNamePrimarystring"castai-agent-metadata"Name of the primary ConfigMap (created by CAST AI agent v0.22.0+) that holds cluster metadata.
hibernateNodestring""Set the HIBERNATE_NODE environment variable to override the default node sizing selections. Make sure the size selected is appropriate for your cloud.
hibernateNodeLabelsstring""
image.pullPolicystring"Always"
image.repositorystring"castai/hibernate"
image.tagstring""Tag is set using Chart.yaml appVersion field.
namespacestring"castai-agent"By default namespace is expected to be created by castai-agent.
namespacesToKeepstring""Set the NAMESPACES_TO_KEEP environment variable to override, "opa,istio""
pauseCronJobNamestring"hibernate-pause"hibernate-pause cronjob schedule.
pauseCronSchedulestring"0 22 * * 1-5"update hibernate-pause schedule according to business needs.
podSecurityContext.fsGroupint1003
podSecurityContext.runAsGroupint1003
podSecurityContext.runAsNonRootbooltrue
podSecurityContext.runAsUserint1003
protectRemovalDisabledstring"false"This looks for the autoscaling.cast.ai/removal-disabled="true" label on a node and if it exists excludes it from being cordoned and deleted.
restartPolicystring"OnFailure"
resumeCronJobNamestring"hibernate-resume"hibernate-resume cronjob schedule.
resumeCronSchedulestring"0 7 * * 1-5"update hibernate-resume schedule according to business needs.
roleBindingNamestring"hibernate"
roleNamestring"hibernate"
secretNamestring"castai-hibernate"
serviceAccountNamestring"hibernate"
timeZonestring""Set CronJobs timezone, if no time zone specified the kube-controller-manager interprets schedules relative to its local time zone

Migration Guide

v0.2.11 - ConfigMap Name Change

The default ConfigMap reference has been changed from castai-cluster-controller to castai-agent-metadata to align with the new CAST AI agent metadata ConfigMap.

Action required when upgrading:

  • If you are upgrading from v0.2.10 or earlier and have not overridden configMapNamePrimary/configMapNameFallback, the hibernate CronJobs will now reference the castai-agent-metadata ConfigMap (primary) with fallback to castai-cluster-controller for the CLUSTER_ID value.
  • Ensure the castai-agent-metadata ConfigMap exists in the target namespace (typically castai-agent) and contains the CLUSTER_ID key.
  • This ConfigMap is created automatically by the CAST AI agent (castai-agent chart) v0.22.0+.
  • If you are using an older agent version or a custom setup, you may need to create this ConfigMap manually or override configMapNamePrimary/configMapNameFallback to point to your existing ConfigMap.

Deploy castai-hibernate with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has castai-hibernate on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcastai-hibernate is pinned at v0.2.12 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply