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
| Key | Type | Default | Description |
|---|---|---|---|
| agentNamespace | string | "castai-agent" | |
| apiKey | string | "" | API token with Full Access permissions and encode base64 |
| apiKeySecretRef | string | "" | 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"]. |
| apiUrl | for Europe use https://api.eu.cast.ai | "https://api.cast.ai" | |
| backoffLimit | int | 0 | |
| cloud | string | "" | Set CronJobs "Cloud" env variable to [EKS |
| clusterRoleBindingAdminName | string | "hibernate-admin" | |
| clusterRoleBindingName | string | "hibernate" | |
| clusterRoleName | string | "hibernate" | |
| concurrencyPolicy | string | "Forbid" | |
| configMapNameFallback | string | "castai-cluster-controller" | Name of the fallback ConfigMap (legacy) for backwards compatibility. |
| configMapNamePrimary | string | "castai-agent-metadata" | Name of the primary ConfigMap (created by CAST AI agent v0.22.0+) that holds cluster metadata. |
| hibernateNode | string | "" | Set the HIBERNATE_NODE environment variable to override the default node sizing selections. Make sure the size selected is appropriate for your cloud. |
| hibernateNodeLabels | string | "" | |
| image.pullPolicy | string | "Always" | |
| image.repository | string | "castai/hibernate" | |
| image.tag | string | "" | Tag is set using Chart.yaml appVersion field. |
| namespace | string | "castai-agent" | By default namespace is expected to be created by castai-agent. |
| namespacesToKeep | string | "" | Set the NAMESPACES_TO_KEEP environment variable to override, "opa,istio"" |
| pauseCronJobName | string | "hibernate-pause" | hibernate-pause cronjob schedule. |
| pauseCronSchedule | string | "0 22 * * 1-5" | update hibernate-pause schedule according to business needs. |
| podSecurityContext.fsGroup | int | 1003 | |
| podSecurityContext.runAsGroup | int | 1003 | |
| podSecurityContext.runAsNonRoot | bool | true | |
| podSecurityContext.runAsUser | int | 1003 | |
| protectRemovalDisabled | string | "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. |
| restartPolicy | string | "OnFailure" | |
| resumeCronJobName | string | "hibernate-resume" | hibernate-resume cronjob schedule. |
| resumeCronSchedule | string | "0 7 * * 1-5" | update hibernate-resume schedule according to business needs. |
| roleBindingName | string | "hibernate" | |
| roleName | string | "hibernate" | |
| secretName | string | "castai-hibernate" | |
| serviceAccountName | string | "hibernate" | |
| timeZone | string | "" | 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 thecastai-agent-metadataConfigMap (primary) with fallback tocastai-cluster-controllerfor theCLUSTER_IDvalue. - Ensure the
castai-agent-metadataConfigMap exists in the target namespace (typicallycastai-agent) and contains theCLUSTER_IDkey. - 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/configMapNameFallbackto 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartcastai-hibernate is pinned at v0.2.12 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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