From 52b553a97b39f796ee700c2463cc8e0576904d1b Mon Sep 17 00:00:00 2001 From: alouvion-aneo <113617172+alouvion-aneo@users.noreply.github.com> Date: Thu, 4 Jan 2024 17:16:55 +0100 Subject: [PATCH] remove_old_admin_gui --- armonik/external-data.tf | 35 ++------------------------------ armonik/ingress-configmap.tf | 39 ------------------------------------ armonik/outputs.tf | 6 ------ 3 files changed, 2 insertions(+), 78 deletions(-) diff --git a/armonik/external-data.tf b/armonik/external-data.tf index f9a86cede..6beef0af9 100644 --- a/armonik/external-data.tf +++ b/armonik/external-data.tf @@ -18,20 +18,6 @@ module "admin_gui_endpoint" { cluster_domain = local.cluster_domain } -# Deprecated, must be removed in a future version -module "admin_0_8_gui_endpoint" { - source = "../utils/service-ip" - service = one(kubernetes_service.admin_0_8_gui) - cluster_domain = local.cluster_domain -} - -# Deprecated, must be removed in a future version -module "admin_0_9_gui_endpoint" { - source = "../utils/service-ip" - service = one(kubernetes_service.admin_0_9_gui) - cluster_domain = local.cluster_domain -} - module "ingress_endpoint" { source = "../utils/service-ip" service = one(kubernetes_service.ingress) @@ -48,17 +34,6 @@ locals { ip = module.admin_gui_endpoint.host app_port = try(module.admin_gui_endpoint.ports[0], null) } - # Deprecated, must be removed in a future version - admin_0_8_gui_endpoints = { - ip = module.admin_0_8_gui_endpoint.host - api_port = try(module.admin_0_8_gui_endpoint.ports[0], null) - app_port = try(module.admin_0_8_gui_endpoint.ports[1], null) - } - # Deprecated, must be removed in a future version - admin_0_9_gui_endpoints = { - ip = module.admin_0_9_gui_endpoint.host - port = try(module.admin_0_9_gui_endpoint.ports[0], null) - } ingress_endpoint = { ip = module.ingress_endpoint.host http_port = var.ingress.http_port @@ -66,12 +41,6 @@ locals { } control_plane_url = "http://${local.control_plane_endpoints.ip}:${local.control_plane_endpoints.port}" admin_app_url = length(kubernetes_service.admin_gui) > 0 ? "http://${local.admin_gui_endpoints.ip}:${local.admin_gui_endpoints.app_port}" : null - # Deprecated, must be removed in a future version - admin_api_url = length(kubernetes_service.admin_0_8_gui) > 0 ? "http://${local.admin_0_8_gui_endpoints.ip}:${local.admin_0_8_gui_endpoints.api_port}/api" : null - # Deprecated, must be removed in a future version - admin_0_8_url = length(kubernetes_service.admin_0_8_gui) > 0 ? "http://${local.admin_0_8_gui_endpoints.ip}:${local.admin_0_8_gui_endpoints.app_port}/" : null - # Deprecated, must be removed in a future version - admin_0_9_url = length(kubernetes_service.admin_0_9_gui) > 0 ? "http://${local.admin_0_9_gui_endpoints.ip}:${local.admin_0_9_gui_endpoints.port}/" : null - ingress_http_url = var.ingress != null ? "${var.ingress.tls ? "https" : "http"}://${local.ingress_endpoint.ip}:${local.ingress_endpoint.http_port}" : "" - ingress_grpc_url = var.ingress != null ? "${var.ingress.tls ? "https" : "http"}://${local.ingress_endpoint.ip}:${local.ingress_endpoint.grpc_port}" : "" + ingress_http_url = var.ingress != null ? "${var.ingress.tls ? "https" : "http"}://${local.ingress_endpoint.ip}:${local.ingress_endpoint.http_port}" : "" + ingress_grpc_url = var.ingress != null ? "${var.ingress.tls ? "https" : "http"}://${local.ingress_endpoint.ip}:${local.ingress_endpoint.grpc_port}" : "" } diff --git a/armonik/ingress-configmap.tf b/armonik/ingress-configmap.tf index a14ba85ff..47449b524 100644 --- a/armonik/ingress-configmap.tf +++ b/armonik/ingress-configmap.tf @@ -65,50 +65,11 @@ server { location = /admin/fr { rewrite ^ $scheme://$http_host/admin/fr/; } - # Deprecated, must be removed in a new version. Keeped for retrocompatibility - location = /old-admin { - rewrite ^ $scheme://$http_host/admin-0.8/ permanent; - } - # Deprecated, must be removed in a new version - location = /admin-0.8 { - rewrite ^ $scheme://$http_host/admin-0.8/ permanent; - } - # Deprecated, must be removed in a new version - location = /admin-0.9 { - rewrite ^ $scheme://$http_host/admin-0.9/$accept_language/; - } - # Deprecated, must be removed in a new version - location = /admin-0.9/ { - rewrite ^ $scheme://$http_host/admin-0.9/$accept_language/; - } - # Deprecated, must be removed in a new version - location = /admin-0.9/en { - rewrite ^ $scheme://$http_host/admin-0.9/en/; - } - # Deprecated, must be removed in a new version - location = /admin-0.9/fr { - rewrite ^ $scheme://$http_host/admin-0.9/fr/; - } %{if var.admin_gui != null~} set $admin_app_upstream ${local.admin_app_url}; - set $admin_0_8_upstream ${local.admin_0_8_url}; - set $admin_0_9_upstream ${local.admin_0_9_url}; - set $admin_api_upstream ${local.admin_api_url}; location /admin/ { proxy_pass $admin_app_upstream$uri$is_args$args; } - # Deprecated, must be removed in a new version - location /admin-0.8/ { - proxy_pass $admin_0_8_upstream$uri$is_args$args; - } - # Deprecated, must be removed in a new version - location /admin-0.9/ { - proxy_pass $admin_0_9_upstream$uri$is_args$args; - } - # Deprecated, must be removed in a new version - location /api { - proxy_pass $admin_api_upstream$uri$is_args$args; - } %{endif~} set $armonik_upstream grpc://${local.control_plane_endpoints.ip}:${local.control_plane_endpoints.port}; diff --git a/armonik/outputs.tf b/armonik/outputs.tf index c2097062b..0033467da 100644 --- a/armonik/outputs.tf +++ b/armonik/outputs.tf @@ -5,17 +5,11 @@ output "endpoint_urls" { grafana_url = data.kubernetes_secret.grafana.data.enabled ? (local.ingress_http_url != "" ? "${local.ingress_http_url}/grafana/" : nonsensitive(data.kubernetes_secret.grafana.data.url)) : "" seq_web_url = data.kubernetes_secret.seq.data.enabled ? (local.ingress_http_url != "" ? "${local.ingress_http_url}/seq/" : nonsensitive(data.kubernetes_secret.seq.data.web_url)) : "" admin_app_url = length(kubernetes_service.admin_gui) > 0 ? (local.ingress_http_url != "" ? "${local.ingress_http_url}/admin" : local.admin_app_url) : null - admin_api_url = length(kubernetes_service.admin_0_8_gui) > 0 ? (local.ingress_http_url != "" ? "${local.ingress_http_url}/api" : local.admin_api_url) : null - admin_0_8_url = length(kubernetes_service.admin_0_8_gui) > 0 ? (local.ingress_http_url != "" ? "${local.ingress_http_url}/admin-0.8" : local.admin_0_8_url) : null - admin_0_9_url = length(kubernetes_service.admin_0_9_gui) > 0 ? (local.ingress_http_url != "" ? "${local.ingress_http_url}/admin-0.9" : local.admin_0_9_url) : null } : { control_plane_url = local.control_plane_url grafana_url = nonsensitive(data.kubernetes_secret.grafana.data.url) seq_web_url = nonsensitive(data.kubernetes_secret.seq.data.web_url) admin_app_url = local.admin_app_url - admin_api_url = local.admin_api_url - admin_0_8_url = local.admin_0_8_url - admin_0_9_url = local.admin_0_9_url } }