Skip to content

Commit

Permalink
fix: remove_old_admin_gui (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
lzianekhodja-aneo authored Jan 4, 2024
2 parents a48eafd + b0f9e6f commit 673936a
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 81 deletions.
2 changes: 0 additions & 2 deletions armonik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

| Name | Source | Version |
|------|--------|---------|
| <a name="module_admin_0_8_gui_endpoint"></a> [admin\_0\_8\_gui\_endpoint](#module\_admin\_0\_8\_gui\_endpoint) | ../utils/service-ip | n/a |
| <a name="module_admin_0_9_gui_endpoint"></a> [admin\_0\_9\_gui\_endpoint](#module\_admin\_0\_9\_gui\_endpoint) | ../utils/service-ip | n/a |
| <a name="module_admin_gui_endpoint"></a> [admin\_gui\_endpoint](#module\_admin\_gui\_endpoint) | ../utils/service-ip | n/a |
| <a name="module_control_plane_endpoint"></a> [control\_plane\_endpoint](#module\_control\_plane\_endpoint) | ../utils/service-ip | n/a |
| <a name="module_ingress_endpoint"></a> [ingress\_endpoint](#module\_ingress\_endpoint) | ../utils/service-ip | n/a |
Expand Down
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
1 change: 1 addition & 0 deletions kubernetes/onpremise/kubeadm/examples/complete/id_rsa
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#insert your private ssh key here
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ master = {
name = "master-1"
public_dns = "PUBLIC_DNS_HERE" # it can be private if you are in the destination network
private_dns = "PRIVATE_DNS_HERE"
tls_private_key_pem_file = "TLS_PRIVATE_KEY_FILE_HERE"
tls_private_key_pem_file = "./id_rsa" # replace the content of this file with the private ssh key
}

workers = {
Expand Down

0 comments on commit 673936a

Please sign in to comment.