Skip to content

Commit c87bafc

Browse files
Update main.tf (#492)
Added some evictor settings
1 parent 2061eba commit c87bafc

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

examples/anywhere/main.tf

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Start Minikube using the Docker driver
22
resource "null_resource" "start_minikube" {
33
provisioner "local-exec" {
4-
command = "minikube start --driver=docker"
4+
command = "minikube start --nodes=3 --driver=docker"
55
}
66
}
77

@@ -102,18 +102,29 @@ resource "helm_release" "castai_evictor" {
102102
create_namespace = false
103103
timeout = 600
104104

105+
# other settings
105106
set {
106107
name = "managedByCASTAI"
107108
value = var.managed_by_castai
108109
}
109110
set {
110111
name = "replicaCount"
111-
value = "1"
112-
}
113-
set {
114-
name = "aggressive_mode"
115-
value = "false" # change to true if needed but use with caution
116-
}
112+
value = "0"
113+
}
114+
115+
# evictor-specific settings
116+
values = [
117+
yamlencode({
118+
evictor = {
119+
aggressive_mode = false
120+
cycle_interval = "5m10s"
121+
dry_run = false
122+
enabled = true
123+
node_grace_period_minutes = 5
124+
scoped_mode = false
125+
}
126+
})
127+
]
117128
}
118129

119130
# Install CAST AI Pod Mutator
@@ -138,14 +149,12 @@ resource "helm_release" "castai_pod_mutator" {
138149
name = "enableTopologySpreadConstraints"
139150
value = "true"
140151
}
141-
142152
set {
143153
name = "castai.organizationID"
144154
value = var.organization_id
145155
}
146156
}
147157

148-
149158
# Install CAST AI Workload Autoscaler
150159
resource "helm_release" "castai_workload_autoscaler" {
151160
depends_on = [helm_release.castai_pod_mutator]

0 commit comments

Comments
 (0)