mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-28 20:21:48 +01:00
chore: Correct example ASG tag(s) to match cluster-autoscaler requirements (#2220)
This commit is contained in:
@@ -675,6 +675,14 @@ data "aws_ami" "eks_default_bottlerocket" {
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
locals {
|
locals {
|
||||||
|
|
||||||
|
# We need to lookup K8s taint effect from the AWS API value
|
||||||
|
taint_effects = {
|
||||||
|
NO_SCHEDULE = "NoSchedule"
|
||||||
|
NO_EXECUTE = "NoExecute"
|
||||||
|
PREFER_NO_SCHEDULE = "PreferNoSchedule"
|
||||||
|
}
|
||||||
|
|
||||||
cluster_autoscaler_label_tags = merge([
|
cluster_autoscaler_label_tags = merge([
|
||||||
for name, group in module.eks.eks_managed_node_groups : {
|
for name, group in module.eks.eks_managed_node_groups : {
|
||||||
for label_name, label_value in coalesce(group.node_group_labels, {}) : "${name}|label|${label_name}" => {
|
for label_name, label_value in coalesce(group.node_group_labels, {}) : "${name}|label|${label_name}" => {
|
||||||
@@ -690,7 +698,7 @@ locals {
|
|||||||
for taint in coalesce(group.node_group_taints, []) : "${name}|taint|${taint.key}" => {
|
for taint in coalesce(group.node_group_taints, []) : "${name}|taint|${taint.key}" => {
|
||||||
autoscaling_group = group.node_group_autoscaling_group_names[0],
|
autoscaling_group = group.node_group_autoscaling_group_names[0],
|
||||||
key = "k8s.io/cluster-autoscaler/node-template/taint/${taint.key}"
|
key = "k8s.io/cluster-autoscaler/node-template/taint/${taint.key}"
|
||||||
value = "${taint.value}:${taint.effect}"
|
value = "${taint.value}:${local.taint_effects[taint.effect]}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]...)
|
]...)
|
||||||
|
|||||||
Reference in New Issue
Block a user