From 3a13ba43d67fccc1460fc2e885401bfe4ae08aa9 Mon Sep 17 00:00:00 2001 From: Francesco Cheinasso Date: Wed, 18 Oct 2023 11:10:21 +0200 Subject: [PATCH] External-network: legacy gateway --- Makefile | 2 +- ...ay-ClusterRole.yaml => liqo-legacy-gateway-ClusterRole.yaml} | 0 .../{liqo-gateway-Role.yaml => liqo-legacy-gateway-Role.yaml} | 0 ...eway-deployment.yaml => liqo-legacy-gateway-deployment.yaml} | 2 +- .../{liqo-gateway-rbac.yaml => liqo-legacy-gateway-rbac.yaml} | 2 +- ...qo-gateway-service.yaml => liqo-legacy-gateway-service.yaml} | 2 +- ...vicemonitor.yaml => liqo-legacy-gateway-servicemonitor.yaml} | 2 +- pkg/liqoctl/status/local/pods.go | 2 +- pkg/utils/labels/labelSelectors.go | 2 +- 9 files changed, 7 insertions(+), 7 deletions(-) rename deployments/liqo/files/{liqo-gateway-ClusterRole.yaml => liqo-legacy-gateway-ClusterRole.yaml} (100%) rename deployments/liqo/files/{liqo-gateway-Role.yaml => liqo-legacy-gateway-Role.yaml} (100%) rename deployments/liqo/templates/{liqo-gateway-deployment.yaml => liqo-legacy-gateway-deployment.yaml} (97%) rename deployments/liqo/templates/{liqo-gateway-rbac.yaml => liqo-legacy-gateway-rbac.yaml} (95%) rename deployments/liqo/templates/{liqo-gateway-service.yaml => liqo-legacy-gateway-service.yaml} (96%) rename deployments/liqo/templates/{liqo-gateway-servicemonitor.yaml => liqo-legacy-gateway-servicemonitor.yaml} (88%) diff --git a/Makefile b/Makefile index d12e6e162b..151303fdfd 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ manifests: controller-gen rbacs: controller-gen rm -f deployments/liqo/files/* $(CONTROLLER_GEN) paths="./internal/liqonet/route-operator" rbac:roleName=liqo-route output:rbac:stdout | awk -v RS="---\n" 'NR>1{f="./deployments/liqo/files/liqo-route-" $$4 ".yaml";printf "%s",$$0 > f; close(f)}' && $(SED_COMMAND) deployments/liqo/files/liqo-route-ClusterRole.yaml deployments/liqo/files/liqo-route-Role.yaml - $(CONTROLLER_GEN) paths="./internal/liqonet/tunnel-operator" rbac:roleName=liqo-gateway output:rbac:stdout | awk -v RS="---\n" 'NR>1{f="./deployments/liqo/files/liqo-gateway-" $$4 ".yaml";printf "%s",$$0 > f; close(f)}' && $(SED_COMMAND) deployments/liqo/files/liqo-gateway-ClusterRole.yaml deployments/liqo/files/liqo-gateway-Role.yaml + $(CONTROLLER_GEN) paths="./internal/liqonet/tunnel-operator" rbac:roleName=liqo-legacy-gateway output:rbac:stdout | awk -v RS="---\n" 'NR>1{f="./deployments/liqo/files/liqo-legacy-gateway-" $$4 ".yaml";printf "%s",$$0 > f; close(f)}' && $(SED_COMMAND) deployments/liqo/files/liqo-legacy-gateway-ClusterRole.yaml deployments/liqo/files/liqo-legacy-gateway-Role.yaml $(CONTROLLER_GEN) paths="./internal/liqonet/network-manager/..." rbac:roleName=liqo-network-manager output:rbac:stdout | awk -v RS="---\n" 'NR>1{f="./deployments/liqo/files/liqo-network-manager-" $$4 ".yaml";printf "%s",$$0 > f; close(f)}' && $(SED_COMMAND) deployments/liqo/files/liqo-network-manager-ClusterRole.yaml deployments/liqo/files/liqo-network-manager-Role.yaml $(CONTROLLER_GEN) paths="./internal/crdReplicator" rbac:roleName=liqo-crd-replicator output:rbac:stdout | awk -v RS="---\n" 'NR>1{f="./deployments/liqo/files/liqo-crd-replicator-" $$4 ".yaml";printf "%s",$$0 > f; close(f)}' && $(SED_COMMAND) deployments/liqo/files/liqo-crd-replicator-ClusterRole.yaml deployments/liqo/files/liqo-crd-replicator-Role.yaml $(CONTROLLER_GEN) paths="./pkg/discoverymanager" rbac:roleName=liqo-discovery output:rbac:stdout | awk -v RS="---\n" 'NR>1{f="./deployments/liqo/files/liqo-discovery-" $$4 ".yaml";printf "%s",$$0 > f; close(f)}' && $(SED_COMMAND) deployments/liqo/files/liqo-discovery-ClusterRole.yaml deployments/liqo/files/liqo-discovery-Role.yaml diff --git a/deployments/liqo/files/liqo-gateway-ClusterRole.yaml b/deployments/liqo/files/liqo-legacy-gateway-ClusterRole.yaml similarity index 100% rename from deployments/liqo/files/liqo-gateway-ClusterRole.yaml rename to deployments/liqo/files/liqo-legacy-gateway-ClusterRole.yaml diff --git a/deployments/liqo/files/liqo-gateway-Role.yaml b/deployments/liqo/files/liqo-legacy-gateway-Role.yaml similarity index 100% rename from deployments/liqo/files/liqo-gateway-Role.yaml rename to deployments/liqo/files/liqo-legacy-gateway-Role.yaml diff --git a/deployments/liqo/templates/liqo-gateway-deployment.yaml b/deployments/liqo/templates/liqo-legacy-gateway-deployment.yaml similarity index 97% rename from deployments/liqo/templates/liqo-gateway-deployment.yaml rename to deployments/liqo/templates/liqo-legacy-gateway-deployment.yaml index ed56061095..580fdc5a43 100644 --- a/deployments/liqo/templates/liqo-gateway-deployment.yaml +++ b/deployments/liqo/templates/liqo-legacy-gateway-deployment.yaml @@ -1,5 +1,5 @@ --- -{{- $gatewayConfig := (merge (dict "name" "gateway" "module" "networking") .) -}} +{{- $gatewayConfig := (merge (dict "name" "legacy-gateway" "module" "networking") .) -}} {{- if .Values.networking.internal }} diff --git a/deployments/liqo/templates/liqo-gateway-rbac.yaml b/deployments/liqo/templates/liqo-legacy-gateway-rbac.yaml similarity index 95% rename from deployments/liqo/templates/liqo-gateway-rbac.yaml rename to deployments/liqo/templates/liqo-legacy-gateway-rbac.yaml index b0e1e23833..b95f0ad41e 100644 --- a/deployments/liqo/templates/liqo-gateway-rbac.yaml +++ b/deployments/liqo/templates/liqo-legacy-gateway-rbac.yaml @@ -1,5 +1,5 @@ --- -{{- $gatewayConfig := (merge (dict "name" "gateway" "module" "networking") .) -}} +{{- $gatewayConfig := (merge (dict "name" "legacy-gateway" "module" "networking") .) -}} {{- if .Values.networking.internal }} diff --git a/deployments/liqo/templates/liqo-gateway-service.yaml b/deployments/liqo/templates/liqo-legacy-gateway-service.yaml similarity index 96% rename from deployments/liqo/templates/liqo-gateway-service.yaml rename to deployments/liqo/templates/liqo-legacy-gateway-service.yaml index bdebe7f00e..bc8fde8d6b 100644 --- a/deployments/liqo/templates/liqo-gateway-service.yaml +++ b/deployments/liqo/templates/liqo-legacy-gateway-service.yaml @@ -1,5 +1,5 @@ --- -{{- $gatewayConfig := (merge (dict "name" "gateway" "module" "networking") .) -}} +{{- $gatewayConfig := (merge (dict "name" "legacy-gateway" "module" "networking") .) -}} {{- if .Values.networking.internal }} diff --git a/deployments/liqo/templates/liqo-gateway-servicemonitor.yaml b/deployments/liqo/templates/liqo-legacy-gateway-servicemonitor.yaml similarity index 88% rename from deployments/liqo/templates/liqo-gateway-servicemonitor.yaml rename to deployments/liqo/templates/liqo-legacy-gateway-servicemonitor.yaml index 3d0843f119..a5e7b4693c 100644 --- a/deployments/liqo/templates/liqo-gateway-servicemonitor.yaml +++ b/deployments/liqo/templates/liqo-legacy-gateway-servicemonitor.yaml @@ -1,7 +1,7 @@ {{- if .Values.networking.internal }} --- -{{- $gatewayMetricsConfig := (merge (dict "name" "gateway-metrics" "module" "networking") .) -}} +{{- $gatewayMetricsConfig := (merge (dict "name" "legacy-gateway-metrics" "module" "networking") .) -}} {{- if .Values.gateway.metrics.serviceMonitor.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor diff --git a/pkg/liqoctl/status/local/pods.go b/pkg/liqoctl/status/local/pods.go index d502515860..283cbd5891 100644 --- a/pkg/liqoctl/status/local/pods.go +++ b/pkg/liqoctl/status/local/pods.go @@ -44,7 +44,7 @@ var ( } liqoDeploymentsNetwork = []string{ "liqo-network-manager", - "liqo-gateway", + "liqo-legacy-gateway", } liqoDaemonSetsNetwork = []string{ "liqo-route", diff --git a/pkg/utils/labels/labelSelectors.go b/pkg/utils/labels/labelSelectors.go index 9da62a5800..61ef9a6a8c 100644 --- a/pkg/utils/labels/labelSelectors.go +++ b/pkg/utils/labels/labelSelectors.go @@ -181,7 +181,7 @@ func DiscoveryLabelSelector() labels.Selector { // GatewayLabelSelector returns the label selector associated with the gateway components. func GatewayLabelSelector() labels.Selector { - return ComponentLabelSelector("gateway", "networking") + return ComponentLabelSelector("legacy-gateway", "networking") } // RouteLabelSelector returns the label selector associated with the route components.