Skip to content

Commit 9982c84

Browse files
committed
a bit more tuning
1 parent 5b79cb6 commit 9982c84

5 files changed

Lines changed: 24 additions & 0 deletions

File tree

examples/eks/eks_cluster_live_migration/castai.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ module "cluster" {
1717
subnets = module.vpc.private_subnets
1818
live_proxy_version = var.live_proxy_version
1919
live_helm_version = var.live_helm_version
20+
21+
install_helm_live = var.install_helm_live
22+
23+
delete_nodes_on_disconnect = var.delete_nodes_on_disconnect
2024
}

examples/eks/eks_cluster_live_migration/eks.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ module "eks" {
2020
}
2121
}
2222

23+
tags = var.tags
24+
2325
vpc_id = module.vpc.vpc_id
2426
subnet_ids = module.vpc.private_subnets
2527

examples/eks/eks_cluster_live_migration/module/castai/castai.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ module "castai-eks-cluster" {
148148

149149
resource "helm_release" "live-helm" {
150150
name = "castai-live"
151+
count = var.install_helm_live ? 1 : 0
151152

152153
repository = "https://castai.github.io/helm-charts"
153154
chart = "castai-live"
@@ -172,6 +173,11 @@ resource "helm_release" "live-helm" {
172173
value = var.castai_api_token
173174
}
174175

176+
set {
177+
name = "castai.apiURL"
178+
value = var.castai_api_url
179+
}
180+
175181
wait = false
176182

177183
depends_on = [module.castai-eks-cluster]

examples/eks/eks_cluster_live_migration/module/castai/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,9 @@ variable "delete_nodes_on_disconnect" {
5151
description = "Optional parameter, if set to true - CAST AI provisioned nodes will be deleted from cloud on cluster disconnection. For production use it is recommended to set it to false."
5252
default = true
5353
}
54+
55+
variable "install_helm_live" {
56+
type = bool
57+
description = "Optional parameter, if set to true - the 'castai-live' Helm chart will be installed on the cluster. This is required for live migration feature."
58+
default = true
59+
}

examples/eks/eks_cluster_live_migration/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ variable "enable_castai" {
4949
default = true
5050
}
5151

52+
variable "install_helm_live" {
53+
type = bool
54+
description = "Optional parameter, if set to true - the 'castai-live' Helm chart will be installed on the cluster. This is required for live migration feature."
55+
default = true
56+
}
57+
5258
variable "live_proxy_version" {
5359
type = string
5460
default = "0.30.0"

0 commit comments

Comments
 (0)