Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add custom priority examples #278

Merged
merged 5 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions examples/aks/aks_cluster_autoscaler_policies/castai.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,23 @@ module "castai-aks-cluster" {
}
compute_optimized = false
storage_optimized = false

# Optional: define custom priority for instances selection.
#
# 1. Prioritize Standard_Fs spot instances above all else, regardless of price.
# 2. If Standard_FS is not available, try Standard_FXMDS family.
custom_priority = [
{
instance_families = ["Standard_FS"]
spot = true
},
{
instance_families = ["Standard_FXMDS"]
spot = true
}
# 3. instances not matching any of custom priority groups will be tried after
# nothing matches from priority groups.
]
}
}
}
Expand Down
17 changes: 17 additions & 0 deletions examples/eks/eks_cluster_autoscaler_policies/castai.tf
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,23 @@ module "castai-eks-cluster" {
compute_optimized = false
storage_optimized = false
is_gpu_only = false

# Optional: define custom priority for instances selection.
#
# 1. Prioritize C5a and C5ad spot instances above all else, regardless of price.
# 2. If C5a is not available, try C6a family.
custom_priority = [
{
instance_families = ["c5a", "c5ad"]
spot = true
},
{
instance_families = ["c6a"]
spot = true
}
# 3. instances not matching any of custom priority groups will be tried after
# nothing matches from priority groups.
]
}
}
}
Expand Down
17 changes: 17 additions & 0 deletions examples/gke/gke_cluster_autoscaler_policies/castai.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,23 @@ module "castai-gke-cluster" {
}
compute_optimized = false
storage_optimized = false

# Optional: define custom priority for instances selection.
#
# 1. Prioritize C2D and C2 spot instances above all else, regardless of price.
# 2. If C2D and C2 is not available, try C3D family.
custom_priority = [
{
instance_families = ["c2d", "c2"]
spot = true
},
{
instance_families = ["c3d"]
spot = true
}
# 3. instances not matching any of custom priority groups will be tried after
# nothing matches from priority groups.
]
}

custom_instances_enabled = true
Expand Down
Loading