From 66f760c221d9a9e7665399ff42fdd357c729f2d0 Mon Sep 17 00:00:00 2001 From: Marco Iorio Date: Fri, 5 Jul 2024 17:56:16 +0200 Subject: [PATCH] clustermesh: fix deprecated cloud internal LoadBalancer annotations * https://cloud.google.com/kubernetes-engine/docs/concepts/service-load-balancer#load_balancer_types * https://learn.microsoft.com/en-us/azure/aks/internal-lb?tabs=set-service-annotations#create-an-internal-load-balancer * https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/service/annotations/#lb-internal Signed-off-by: Marco Iorio --- clustermesh/clustermesh.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clustermesh/clustermesh.go b/clustermesh/clustermesh.go index abc3536b33..09e438c3dc 100644 --- a/clustermesh/clustermesh.go +++ b/clustermesh/clustermesh.go @@ -1441,12 +1441,12 @@ func generateEnableHelmValues(params Parameters, flavor k8s.Flavor) (map[string] if params.ServiceType == "" { switch flavor.Kind { case k8s.KindGKE: - log("🔮 Auto-exposing service within GCP VPC (cloud.google.com/load-balancer-type=Internal)") + log("🔮 Auto-exposing service within GCP VPC (networking.gke.io/load-balancer-type=Internal)") helmVals["clustermesh"].(map[string]interface{})["apiserver"] = map[string]interface{}{ "service": map[string]interface{}{ "type": corev1.ServiceTypeLoadBalancer, "annotations": map[string]interface{}{ - "cloud.google.com/load-balancer-type": "Internal", + "networking.gke.io/load-balancer-type": "Internal", // Allows cross-region access "networking.gke.io/internal-load-balancer-allow-global-access": "true", }, @@ -1463,12 +1463,12 @@ func generateEnableHelmValues(params Parameters, flavor k8s.Flavor) (map[string] }, } case k8s.KindEKS: - log("🔮 Auto-exposing service within AWS VPC (service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0") + log("🔮 Auto-exposing service within AWS VPC (service.beta.kubernetes.io/aws-load-balancer-scheme: internal") helmVals["clustermesh"].(map[string]interface{})["apiserver"] = map[string]interface{}{ "service": map[string]interface{}{ "type": corev1.ServiceTypeLoadBalancer, "annotations": map[string]interface{}{ - "service.beta.kubernetes.io/aws-load-balancer-internal": "0.0.0.0/0", + "service.beta.kubernetes.io/aws-load-balancer-scheme": "internal", }, }, }