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/charts/liqo-crds/crds/networking.liqo.io_publickeys.yaml b/deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_publickeys.yaml deleted file mode 100644 index 6549afa6c2..0000000000 --- a/deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_publickeys.yaml +++ /dev/null @@ -1,47 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: publickeys.networking.liqo.io -spec: - group: networking.liqo.io - names: - categories: - - liqo - kind: PublicKey - listKind: PublicKeyList - plural: publickeys - singular: publickey - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: PublicKey contains a public key data required by some interconnection - technologies. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: PublicKeySpec defines the desired state of PublicKey. - properties: - publicKey: - description: PublicKey contains the public key. - format: byte - type: string - type: object - type: object - served: true - storage: true 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/internal/liqonet/tunnel-operator/labelerOperator_test.go b/internal/liqonet/tunnel-operator/labelerOperator_test.go index 1602476560..e766675d53 100644 --- a/internal/liqonet/tunnel-operator/labelerOperator_test.go +++ b/internal/liqonet/tunnel-operator/labelerOperator_test.go @@ -78,7 +78,7 @@ var _ = Describe("LabelerOperator", func() { Name: labelerSvcName, Namespace: labelerReq.Namespace, Labels: map[string]string{ - consts.K8sAppNameKey: "gateway", + consts.K8sAppNameKey: "legacy-gateway", consts.K8sAppComponentKey: "networking", }, }, 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 3fd120a9fb..2ecabbca5c 100644 --- a/pkg/utils/labels/labelSelectors.go +++ b/pkg/utils/labels/labelSelectors.go @@ -182,7 +182,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.