Skip to content

Commit

Permalink
output the cluster KMS key and re-condition pod affinity rules for co…
Browse files Browse the repository at this point in the history
…redns
  • Loading branch information
baixiac committed Nov 25, 2024
1 parent aea5f36 commit 6b9fd49
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cluster/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,20 @@ module "eks" {
nodeSelector : var.create_dmz_node_group ? {
role : "dmz-1"
} : {},
affinity : var.create_dmz_node_group ? {} : {
podAntiAffinity : {
requiredDuringSchedulingIgnoredDuringExecution : [{
labelSelector : {
matchExpressions : [{
key : "k8s-app"
operator : "In"
values : ["kube-dns"]
}]
},
topologyKey : "kubernetes.io/hostname"
}]
}
}
})
}
kube-proxy = {
Expand Down
4 changes: 4 additions & 0 deletions cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ output "radar_base_eks_cluser_endpoint" {
value = module.eks.cluster_endpoint
}

output "radar_base_eks_cluser_kms_key_arn" {
value = module.eks.kms_key_arn
}

output "radar_base_eks_dmz_node_group_name" {
value = var.create_dmz_node_group ? element(split(":", module.eks.eks_managed_node_groups["dmz-${var.eks_cluster_name}"].node_group_id), 1) : null
}
Expand Down

0 comments on commit 6b9fd49

Please sign in to comment.