Skip to content

Commit 28a1b45

Browse files
authored
fix: tunnel domain update (#116)
Signed-off-by: Sammy Huang <sammy.huang@zilliz.com>
1 parent 2149229 commit 28a1b45

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

modules/azure/byoc_i/default-aks/booter.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ EOF
1919
agent_config = {
2020
repository = "${local.azure_agent_config.acr_name}.azurecr.io/${local.azure_agent_config.acr_prefix}"
2121
tag = var.agent_tag
22-
serverHost = "cloud-tunnel${local.host_suffix}"
22+
serverHost = local.server_host
2323
authToken = var.auth_token
2424
dataPlaneId = var.dataplane_id
25-
tunnelHost = "k8s${local.dataplane_suffix}${local.host_suffix}"
25+
tunnelHost = local.tunnel_host
2626
endpointIp = ""
2727
maintenanceClientId = azurerm_user_assigned_identity.maintenance.client_id
2828
}

modules/azure/byoc_i/default-aks/locals.tf

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@ locals {
2020
azure_agent_config = try(local.config.Azure.agent_config[local.location], {})
2121

2222
# Hosts
23-
dataplane_suffix = element(split("-", var.dataplane_id), length(split("-", var.dataplane_id)) - 1)
23+
24+
# The regex [^-]+$ matches one or more non-hyphen characters at the end of the string
25+
# zilliz-byoc-azure-southeastasia-xxxyyyzzz -> xxxyyyzzz
26+
dataplane_suffix = regex("[^-]+$", var.dataplane_id)
2427
env_domain = var.env == "UAT" ? "cloud-uat3.zilliz.com" : "cloud.zilliz.com"
25-
byoc_suffix = var.enable_private_endpoint ? ".byoc" : ""
26-
host_suffix = ".az-${local.location}${local.byoc_suffix}.${local.env_domain}"
28+
# if enable_private_endpoint is true, the server_host is cloud-tunnel.az-southeastasia.byoc.cloud.zilliz.com, otherwise it is cloud-tunnel.az-southeastasia.zilliz.com
29+
server_host = "cloud-tunnel.az-${local.location}${var.enable_private_endpoint ? ".byoc" : ""}.${local.env_domain}"
30+
# k8sxxxyyyzzz.az-southeastasia.byoc.cloud.zilliz.com
31+
tunnel_host = "k8s${local.dataplane_suffix}.az-${local.location}.byoc.${local.env_domain}"
2732

2833
# Standard tags for all resources (similar to AWS EKS pattern)
2934
# Merge Vendor tag with custom_tags

0 commit comments

Comments
 (0)