Skip to content

Commit 96a400f

Browse files
claudioloradamjensenbot
authored andcommitted
fix!: remove GatewayServer address and port override via annotation
This patch removes the possibility to use the override the address and port used by the client to connect to the GatewayServer via the `liqo.io/override-address` and `liqo.io/override-port` annotation. Introduced with PR #2384
1 parent 40abdb7 commit 96a400f

File tree

8 files changed

+22
-190
lines changed

8 files changed

+22
-190
lines changed

cmd/liqoctl/cmd/network.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ func newNetworkConnectCommand(ctx context.Context, options *network.Options) *co
166166
cmd.Flags().StringVar(&options.ClientGatewayType, "client-type", forge.DefaultGwClientType,
167167
"Type of Gateway Client. Leave empty to use default Liqo implementation of WireGuard")
168168
cmd.Flags().StringVar(&options.ClientConnectAddress, "client-address", "",
169-
"Define the address used by the gateway client to connect to the gateway server."+
169+
"Define the address used by the gateway client to connect to the gateway server. "+
170170
"This value overrides the one automatically retrieved by Liqo and it is useful when the server is "+
171171
"not directly reachable (e.g. the server is behind a NAT)")
172172
cmd.Flags().Int32Var(&options.ClientConnectPort, "client-port", 0,
173-
"Define the port used by the gateway client to connect to the gateway server."+
173+
"Define the port used by the gateway client to connect to the gateway server. "+
174174
"This value overrides the one automatically retrieved by Liqo and it is useful when the server is "+
175175
"not directly reachable (e.g. the server is behind a NAT)")
176176
cmd.Flags().StringVar(&options.ClientTemplateName, "client-template-name", forge.DefaultGwClientTemplateName,

cmd/liqoctl/cmd/peer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ func newPeerCommand(ctx context.Context, f *factory.Factory) *cobra.Command {
101101
cmd.Flags().StringVar(&options.ServerServiceLoadBalancerIP, "server-service-loadbalancerip", "",
102102
"IP of the LoadBalancer for the Gateway Server service")
103103
cmd.Flags().StringVar(&options.ClientConnectAddress, "client-address", "",
104-
"Define the address used by the gateway client to connect to the gateway server."+
104+
"Define the address used by the gateway client to connect to the gateway server. "+
105105
"This value overrides the one automatically retrieved by Liqo and it is useful when the server is "+
106106
"not directly reachable (e.g. the server is behind a NAT)")
107107
cmd.Flags().Int32Var(&options.ClientConnectPort, "client-port", 0,
108-
"Define the port used by the gateway client to connect to the gateway server."+
108+
"Define the port used by the gateway client to connect to the gateway server. "+
109109
"This value overrides the one automatically retrieved by Liqo and it is useful when the server is "+
110110
"not directly reachable (e.g. the server is behind a NAT)")
111111
cmd.Flags().IntVar(&options.MTU, "mtu", nwforge.DefaultMTU,

deployments/liqo/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
| ipam.reservedSubnets | list | `[]` | List of IP subnets that do not have to be used by Liqo. Liqo can perform automatic IP address remapping when a remote cluster is peering with you, e.g., in case IP address spaces (e.g., PodCIDR) overlaps. In order to prevent IP conflicting between locally used private subnets in your infrastructure and private subnets belonging to remote clusters you need tell liqo the subnets used in your cluster. E.g if your cluster nodes belong to the 192.168.2.0/24 subnet, then you should add that subnet to the reservedSubnets. PodCIDR and serviceCIDR used in the local cluster are automatically added to the reserved list. |
6565
| ipam.serviceCIDR | string | `""` | The subnet used by the services in you cluster, in CIDR notation (e.g., 172.16.0.0/16). |
6666
| metricAgent.config.timeout | object | `{"read":"30s","write":"30s"}` | Set the timeout for the metrics server. |
67-
| metricAgent.enable | bool | `true` | Enable/Disable the virtual kubelet metric agent. This component aggregates all the kubelet-related metrics (e.g., CPU, RAM, etc) collected on the nodes that are used by a remote cluster peered with you, then exporting the resulting values as a property of the virtual kubelet running on the remote cluster. |
67+
| metricAgent.enable | bool | `true` | Enable/Disable the virtual kubelet metric agent. This component aggregates all the kubelet-related metrics (e.g., CPU, RAM, etc) collected on the nodes that are used by a remote cluster peered with you, then exporting the resulting values as a property of the virtual kubelet running on the remote cluster. |
6868
| metricAgent.image.name | string | `"ghcr.io/liqotech/metric-agent"` | Image repository for the metricAgent pod. |
6969
| metricAgent.image.version | string | `""` | Custom version for the metricAgent image. If not specified, the global tag is used. |
7070
| metricAgent.initContainer.image.name | string | `"ghcr.io/liqotech/cert-creator"` | Image repository for the init container of the metricAgent pod. |
@@ -79,7 +79,7 @@
7979
| nameOverride | string | `""` | Override the standard name used by Helm and associated to Kubernetes/Liqo resources. |
8080
| networking.clientResources | list | `[{"apiVersion":"networking.liqo.io/v1beta1","resource":"wggatewayclients"}]` | Set the list of resources that implement the GatewayClient |
8181
| networking.enabled | bool | `true` | Use the default Liqo networking module. |
82-
| networking.fabric.config.fullMasquerade | bool | `false` | Enabe/Disable the full masquerade mode for the fabric pod. It means that all traffic will be masquerade using the first external cidr IP, instead of using the pod IP. Full masquerade is useful when the cluster nodeports uses a PodCIDR IP to masqerade the incoming traffic. IMPORTANT: Please consider that enabling this feature will masquerade the source IP of traffic towards a remote cluster, making impossible for a pod that receives the traffic to know the original source IP. |
82+
| networking.fabric.config.fullMasquerade | bool | `false` | Enabe/Disable the full masquerade mode for the fabric pod. It means that all traffic will be masquerade using the first external cidr IP, instead of using the pod IP. Full masquerade is useful when the cluster nodeports uses a PodCIDR IP to masqerade the incoming traffic. IMPORTANT: Please consider that enabling this feature will masquerade the source IP of traffic towards a remote cluster, making impossible for a pod that receives the traffic to know the original source IP. |
8383
| networking.fabric.config.gatewayMasqueradeBypass | bool | `false` | Enable/Disable the masquerade bypass for the gateway pods. It means that the packets from gateway pods will not be masqueraded from the host where the pod is scheduled. This is useful in scenarios where CNIs masquerade the traffic from pod to nodes. For example this is required when using the Azure CNI or Kindnet. |
8484
| networking.fabric.config.nftablesMonitor | bool | `true` | Enable/Disable the nftables monitor for the fabric pod. It means that the fabric pod will monitor the nftables rules and will restore them in case of changes. In some cases (like K3S), this monitor can cause a huge amount of CPU usage. If you are experiencing high CPU usage, you can disable this feature. |
8585
| networking.fabric.image.name | string | `"ghcr.io/liqotech/fabric"` | Image repository for the fabric pod. |
@@ -90,7 +90,7 @@
9090
| networking.fabric.pod.priorityClassName | string | `""` | PriorityClassName (https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority) for the fabric pod. |
9191
| networking.fabric.pod.resources | object | `{"limits":{},"requests":{}}` | Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the fabric pod. |
9292
| networking.fabric.tolerations | list | `[]` | Extra tolerations for the fabric daemonset. |
93-
| networking.gatewayTemplates | object | `{"container":{"gateway":{"image":{"name":"ghcr.io/liqotech/gateway","version":""}},"geneve":{"image":{"name":"ghcr.io/liqotech/gateway/geneve","version":""}},"wireguard":{"image":{"name":"ghcr.io/liqotech/gateway/wireguard","version":""}}},"ping":{"interval":"2s","lossThreshold":5,"updateStatusInterval":"10s"},"replicas":1,"server":{"service":{"allocateLoadBalancerNodePorts":"","annotations":null}},"wireguard":{"implementation":"kernel"}}` | Set the options for the default gateway (server/client) templates. The default templates use a WireGuard implementation to connect the gateway of the clusters. These options are used to configure only the default templates and should not be considered if a custom template is used. |
93+
| networking.gatewayTemplates | object | `{"container":{"gateway":{"image":{"name":"ghcr.io/liqotech/gateway","version":""}},"geneve":{"image":{"name":"ghcr.io/liqotech/gateway/geneve","version":""}},"wireguard":{"image":{"name":"ghcr.io/liqotech/gateway/wireguard","version":""}}},"ping":{"interval":"2s","lossThreshold":5,"updateStatusInterval":"10s"},"replicas":1,"server":{"service":{"allocateLoadBalancerNodePorts":"","annotations":{}}},"wireguard":{"implementation":"kernel"}}` | Set the options for the default gateway (server/client) templates. The default templates use a WireGuard implementation to connect the gateway of the clusters. These options are used to configure only the default templates and should not be considered if a custom template is used. |
9494
| networking.gatewayTemplates.container.gateway.image.name | string | `"ghcr.io/liqotech/gateway"` | Image repository for the gateway container. |
9595
| networking.gatewayTemplates.container.gateway.image.version | string | `""` | Custom version for the gateway image. If not specified, the global tag is used. |
9696
| networking.gatewayTemplates.container.geneve.image.name | string | `"ghcr.io/liqotech/gateway/geneve"` | Image repository for the geneve container. |
@@ -102,20 +102,20 @@
102102
| networking.gatewayTemplates.ping.lossThreshold | int | `5` | Set the number of consecutive pings that must fail to consider the connection as lost |
103103
| networking.gatewayTemplates.ping.updateStatusInterval | string | `"10s"` | Set the interval at which the connection resource status is updated |
104104
| networking.gatewayTemplates.replicas | int | `1` | Set the number of replicas for the gateway deployments |
105-
| networking.gatewayTemplates.server | object | `{"service":{"allocateLoadBalancerNodePorts":"","annotations":null}}` | Set the options to configure the gateway server |
106-
| networking.gatewayTemplates.server.service | object | `{"allocateLoadBalancerNodePorts":"","annotations":null}` | Set the options to configure the server service |
105+
| networking.gatewayTemplates.server | object | `{"service":{"allocateLoadBalancerNodePorts":"","annotations":{}}}` | Set the options to configure the gateway server |
106+
| networking.gatewayTemplates.server.service | object | `{"allocateLoadBalancerNodePorts":"","annotations":{}}` | Set the options to configure the server service |
107107
| networking.gatewayTemplates.server.service.allocateLoadBalancerNodePorts | string | `""` | Set to "false" if you expose the gateway service as LoadBalancer and you do not want to create also a NodePort associated to it (Note: this setting is useful only on cloud providers that support this feature). |
108-
| networking.gatewayTemplates.server.service.annotations | string | `nil` | Annotations for the server service. |
108+
| networking.gatewayTemplates.server.service.annotations | object | `{}` | Annotations for the server service. |
109109
| networking.gatewayTemplates.wireguard.implementation | string | `"kernel"` | Set the implementation used for the WireGuard connection. Possible values are "kernel" and "userspace". |
110110
| networking.genevePort | int | `6091` | The port used by the geneve tunnels. |
111111
| networking.reflectIPs | bool | `true` | Reflect pod IPs and EnpointSlices to the remote clusters. |
112112
| networking.serverResources | list | `[{"apiVersion":"networking.liqo.io/v1beta1","resource":"wggatewayservers"}]` | Set the list of resources that implement the GatewayServer |
113-
| offloading.createNode | bool | `true` | Enable/Disable the creation of a k8s node for each VirtualNode. This flag is cluster-wide, but you can configure the preferred behaviour for each VirtualNode by setting the "createNode" field in the resource Spec. |
113+
| offloading.createNode | bool | `true` | Enable/Disable the creation of a k8s node for each VirtualNode. This flag is cluster-wide, but you can configure the preferred behaviour for each VirtualNode by setting the "createNode" field in the resource Spec. |
114114
| offloading.defaultNodeResources.cpu | string | `"4"` | The amount of CPU to reserve for a virtual node targeting this cluster. |
115115
| offloading.defaultNodeResources.ephemeral-storage | string | `"20Gi"` | The amount of ephemeral storage to reserve for a virtual node targeting this cluster. |
116116
| offloading.defaultNodeResources.memory | string | `"8Gi"` | The amount of memory to reserve for a virtual node targeting this cluster. |
117117
| offloading.defaultNodeResources.pods | string | `"110"` | The amount of pods that can be scheduled on a virtual node targeting this cluster. |
118-
| offloading.disableNetworkCheck | bool | `false` | Enable/Disable the check of the liqo networking for virtual nodes. If check is disabled, the network status will not be added to node conditions. This flag is cluster-wide, but you can configure the preferred behaviour for each VirtualNode by setting the "disableNetworkCheck" field in the resource Spec. |
118+
| offloading.disableNetworkCheck | bool | `false` | Enable/Disable the check of the liqo networking for virtual nodes. If check is disabled, the network status will not be added to node conditions. This flag is cluster-wide, but you can configure the preferred behaviour for each VirtualNode by setting the "disableNetworkCheck" field in the resource Spec. |
119119
| offloading.enabled | bool | `true` | Enable/Disable the offloading module |
120120
| offloading.reflection.configmap.type | string | `"DenyList"` | The type of reflection used for the configmaps reflector. Ammitted values: "DenyList", "AllowList". |
121121
| offloading.reflection.configmap.workers | int | `3` | The number of workers used for the configmaps reflector. Set 0 to disable the reflection of configmaps. |
@@ -147,15 +147,15 @@
147147
| openshiftConfig.enable | bool | `false` | Enable/Disable the OpenShift support, enabling Openshift-specific resources, and setting the pod security contexts in a way that is compatible with Openshift. |
148148
| openshiftConfig.virtualKubeletSCCs | list | `["anyuid"]` | Security context configurations granted to the virtual kubelet in the local cluster. The configuration of one or more SCCs for the virtual kubelet is not strictly required, and privileges can be reduced in production environments. Still, the default configuration (i.e., anyuid) is suggested to prevent problems (i.e., the virtual kubelet fails to add the appropriate labels) when attempting to offload pods not managed by higher-level abstractions (e.g., Deployments), and not associated with a properly privileged service account. Indeed, "anyuid" is the SCC automatically associated with pods created by cluster administrators. Any pod granted a more privileged SCC and not linked to an adequately privileged service account will fail to be offloaded. |
149149
| proxy.config.listeningPort | int | `8118` | Port used by the proxy pod. |
150-
| proxy.enabled | bool | `true` | Enable/Disable the proxy pod. This pod is mandatory to allow in-band peering and to connect to the consumer k8s api server from a remotly offloaded pod. |
150+
| proxy.enabled | bool | `true` | Enable/Disable the proxy pod. This pod is mandatory to allow in-band peering and to connect to the consumer k8s api server from a remotly offloaded pod. |
151151
| proxy.image.name | string | `"ghcr.io/liqotech/proxy"` | Image repository for the proxy pod. |
152152
| proxy.image.version | string | `""` | Custom version for the proxy image. If not specified, the global tag is used. |
153153
| proxy.pod.annotations | object | `{}` | Annotations for the proxy pod. |
154154
| proxy.pod.extraArgs | list | `[]` | Extra arguments for the proxy pod. |
155155
| proxy.pod.labels | object | `{}` | Labels for the proxy pod. |
156156
| proxy.pod.priorityClassName | string | `""` | PriorityClassName (https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority) for the proxy pod. |
157157
| proxy.pod.resources | object | `{"limits":{},"requests":{}}` | Resource requests and limits (https://kubernetes.io/docs/user-guide/compute-resources/) for the proxy pod. |
158-
| proxy.replicas | int | `1` | Set the number of replicas for the proxy deployments |
158+
| proxy.replicas | int | `1` | Set the number of replicas for the proxy deployments |
159159
| proxy.service.annotations | object | `{}` | |
160160
| proxy.service.type | string | `"ClusterIP"` | |
161161
| pullPolicy | string | `"IfNotPresent"` | The pullPolicy for liqo pods. |

deployments/liqo/values.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,7 @@ networking:
7171
# -- Set to "false" if you expose the gateway service as LoadBalancer and you do not want to create also a NodePort associated to it (Note: this setting is useful only on cloud providers that support this feature).
7272
allocateLoadBalancerNodePorts: ""
7373
# -- Annotations for the server service.
74-
annotations:
75-
# -- Override the default address where your network gateway service is available.
76-
# You should configure it if the network gateway is behind a reverse proxy or NAT.
77-
# liqo.io/override-address: "10.43.12.182"
78-
# -- Overrides the port where your network gateway service is available.
79-
# You should configure it if the network gateway is behind a reverse proxy or NAT and is different from the listening port.
80-
# liqo.io/override-port: "51840"
74+
annotations: {}
8175
container:
8276
gateway:
8377
image:
@@ -122,8 +116,8 @@ networking:
122116
# -- Enabe/Disable the full masquerade mode for the fabric pod.
123117
# It means that all traffic will be masquerade using the first external cidr IP, instead of using the pod IP.
124118
# Full masquerade is useful when the cluster nodeports uses a PodCIDR IP to masqerade the incoming traffic.
125-
# IMPORTANT: Please consider that enabling this feature will masquerade the source IP of traffic towards a remote cluster,
126-
# making impossible for a pod that receives the traffic to know the original source IP.
119+
# IMPORTANT: Please consider that enabling this feature will masquerade the source IP of traffic towards a remote cluster,
120+
# making impossible for a pod that receives the traffic to know the original source IP.
127121
fullMasquerade: false
128122
# -- Enable/Disable the masquerade bypass for the gateway pods.
129123
# It means that the packets from gateway pods will not be masqueraded from the host where the pod is scheduled.
@@ -181,12 +175,12 @@ offloading:
181175
# -- The amount of ephemeral storage to reserve for a virtual node targeting this cluster.
182176
ephemeral-storage: "20Gi"
183177
# -- Enable/Disable the creation of a k8s node for each VirtualNode.
184-
# This flag is cluster-wide, but you can configure the preferred behaviour for each VirtualNode
178+
# This flag is cluster-wide, but you can configure the preferred behaviour for each VirtualNode
185179
# by setting the "createNode" field in the resource Spec.
186180
createNode: true
187181
# -- Enable/Disable the check of the liqo networking for virtual nodes.
188182
# If check is disabled, the network status will not be added to node conditions.
189-
# This flag is cluster-wide, but you can configure the preferred behaviour for each VirtualNode
183+
# This flag is cluster-wide, but you can configure the preferred behaviour for each VirtualNode
190184
# by setting the "disableNetworkCheck" field in the resource Spec.
191185
disableNetworkCheck: false
192186
runtimeClass:
@@ -506,7 +500,7 @@ discovery:
506500

507501
metricAgent:
508502
# -- Enable/Disable the virtual kubelet metric agent. This component aggregates all the kubelet-related metrics
509-
# (e.g., CPU, RAM, etc) collected on the nodes that are used by a remote cluster peered with you, then exporting
503+
# (e.g., CPU, RAM, etc) collected on the nodes that are used by a remote cluster peered with you, then exporting
510504
# the resulting values as a property of the virtual kubelet running on the remote cluster.
511505
enable: true
512506
config:
@@ -622,10 +616,10 @@ uninstaller:
622616

623617
proxy:
624618
# -- Enable/Disable the proxy pod.
625-
# This pod is mandatory to allow in-band peering
619+
# This pod is mandatory to allow in-band peering
626620
# and to connect to the consumer k8s api server from a remotly offloaded pod.
627621
enabled: true
628-
# -- Set the number of replicas for the proxy deployments
622+
# -- Set the number of replicas for the proxy deployments
629623
replicas: 1
630624
pod:
631625
# -- Annotations for the proxy pod.

0 commit comments

Comments
 (0)