Skip to content

Commit

Permalink
Fix ingress bug with clone
Browse files Browse the repository at this point in the history
The clone cluster must ignore the public IP configuration from the main
cluster as it relies on the default IP mangaged by ingress-nginx
  • Loading branch information
saliceti committed Jan 25, 2024
1 parent 741aada commit e4f62c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cluster/terraform_kubernetes/ingress_controller.tf
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,12 @@ resource "helm_release" "ingress-nginx-clone" {
version = helm_release.ingress-nginx.version

dynamic "set" {
# Exclude loadBalancerIP set to force clone to use dynamic Public IP for load balancer ingress
for_each = [for s in helm_release.ingress-nginx.set : s if s.name != "controller.service.loadBalancerIP"]
# Exclude the load balancer IP to force clone to use dynamic Public IP for load balancer ingress
for_each = [
for s in helm_release.ingress-nginx.set : s
if s.name != "controller.service.annotations.service\\.beta\\.kubernetes\\.io/azure-load-balancer-ipv4"
&& s.name != "controller.service.annotations.service\\.beta\\.kubernetes\\.io/azure-load-balancer-resource-group"
]

content {
name = set.value["name"]
Expand Down

0 comments on commit e4f62c1

Please sign in to comment.