Skip to content

Commit

Permalink
remove_old_admin_gui
Browse files Browse the repository at this point in the history
  • Loading branch information
alouvion-aneo committed Jan 4, 2024
1 parent a48eafd commit 52b553a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 78 deletions.
35 changes: 2 additions & 33 deletions armonik/external-data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -48,30 +34,13 @@ 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
grpc_port = var.ingress.grpc_port
}
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}" : ""
}
39 changes: 0 additions & 39 deletions armonik/ingress-configmap.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
6 changes: 0 additions & 6 deletions armonik/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 52b553a

Please sign in to comment.