Skip to content

Commit a692fbf

Browse files
committed
fixup! fixup! Network: gateway routes
1 parent 7f80f40 commit a692fbf

21 files changed

+220
-68
lines changed

apis/networking/v1alpha1/internalfabric_types.go

+21-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ var InternalFabricGroupVersionResource = GroupVersion.WithResource(InternalFabri
3838
type InternalFabricSpecInterfaceNode struct {
3939
// Name is the name of the interface added to the nodes.
4040
Name string `json:"name"`
41+
// IP is the IP of the interface added to the nodes.
42+
IP IP `json:"ip"`
4143
}
4244

4345
// InternalFabricSpecInterface contains the information about network interfaces.
@@ -59,6 +61,23 @@ type InternalFabricSpec struct {
5961
GatewayIP IP `json:"gatewayIP"`
6062
}
6163

64+
// InternalFabricStatusInterfaceNode contains the information about the node interface.
65+
type InternalFabricStatusInterfaceNode struct {
66+
// Mac contains the MAC address of the node interface.
67+
Mac string `json:"mac"`
68+
}
69+
70+
// InternalFabricStatusInterface contains the information about the interface status.
71+
type InternalFabricStatusInterface struct {
72+
// Node contains the information about the node interface.
73+
Node InternalFabricStatusInterfaceNode `json:"node"`
74+
}
75+
76+
// InternalFabricStatus defines the observed state of InternalFabric.
77+
type InternalFabricStatus struct {
78+
Interface InternalFabricStatusInterface `json:"interface"`
79+
}
80+
6281
// +kubebuilder:object:root=true
6382
// +kubebuilder:resource:categories=liqo
6483
// +kubebuilder:printcolumn:name="Gateway IP",type=string,JSONPath=`.spec.gatewayIP`
@@ -71,7 +90,8 @@ type InternalFabric struct {
7190
metav1.TypeMeta `json:",inline"`
7291
metav1.ObjectMeta `json:"metadata,omitempty"`
7392

74-
Spec InternalFabricSpec `json:"spec,omitempty"`
93+
Spec InternalFabricSpec `json:"spec,omitempty"`
94+
Status InternalFabricStatus `json:"status,omitempty"`
7595
}
7696

7797
// +kubebuilder:object:root=true

apis/networking/v1alpha1/internalnode_types.go

+16
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ var InternalNodeGroupVersionResource = GroupVersion.WithResource(InternalNodeRes
3838
type InternalNodeSpecInterfaceGateway struct {
3939
// Name is the name of the interface added to the gateways.
4040
Name string `json:"name"`
41+
// IP is the IP of the interface added to the gateways.
42+
IP IP `json:"ip"`
4143
}
4244

4345
// InternalNodeSpecInterface contains the information about network interfaces.
@@ -62,10 +64,24 @@ type InternalNodeStatusNodeIP struct {
6264
Remote *IP `json:"remote,omitempty"`
6365
}
6466

67+
// InternalNodeStatusInterfaceGateway contains the information about the gateway interface.
68+
type InternalNodeStatusInterfaceGateway struct {
69+
// Mac is the MAC address of the gateway interface.
70+
Mac string `json:"mac"`
71+
}
72+
73+
// InternalNodeStatusInterface contains the information about network interfaces.
74+
type InternalNodeStatusInterface struct {
75+
// Gateway contains the information about the gateway interface.
76+
Gateway InternalNodeStatusInterfaceGateway `json:"gateway"`
77+
}
78+
6579
// InternalNodeStatus defines the observed state of InternalNode.
6680
type InternalNodeStatus struct {
6781
// NodeAddress is the address of the node.
6882
NodeIP InternalNodeStatusNodeIP `json:"nodeIP"`
83+
// Interface contains the information about network interfaces.
84+
Interface InternalNodeStatusInterface `json:"interface"`
6985
}
7086

7187
// +kubebuilder:object:root=true

apis/networking/v1alpha1/zz_generated.deepcopy.go

+80
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_internalfabrics.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,16 @@ spec:
5757
The node interface is created on every node to connect them
5858
to the gateway related with the internalfabric.
5959
properties:
60+
ip:
61+
description: IP is the IP of the interface added to the nodes.
62+
pattern: ^(([1-9]{0,1}[0-9]{0,2}|2[0-4][0-9]|25[0-5])\.){3}([1-9]{0,1}[0-9]{0,2}|2[0-4][0-9]|25[0-5])$
63+
type: string
6064
name:
6165
description: Name is the name of the interface added to the
6266
nodes.
6367
type: string
6468
required:
69+
- ip
6570
- name
6671
type: object
6772
required:
@@ -82,6 +87,28 @@ spec:
8287
- gatewayIP
8388
- interface
8489
type: object
90+
status:
91+
description: InternalFabricStatus defines the observed state of InternalFabric.
92+
properties:
93+
interface:
94+
description: InternalFabricStatusInterface contains the information
95+
about the interface status.
96+
properties:
97+
node:
98+
description: Node contains the information about the node interface.
99+
properties:
100+
mac:
101+
description: Mac contains the MAC address of the node interface.
102+
type: string
103+
required:
104+
- mac
105+
type: object
106+
required:
107+
- node
108+
type: object
109+
required:
110+
- interface
111+
type: object
85112
type: object
86113
served: true
87114
storage: true

deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_internalnodes.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,16 @@ spec:
5555
interface. The gateway interface is created on every gateway
5656
to connect them to the node related with the internalnode.
5757
properties:
58+
ip:
59+
description: IP is the IP of the interface added to the gateways.
60+
pattern: ^(([1-9]{0,1}[0-9]{0,2}|2[0-4][0-9]|25[0-5])\.){3}([1-9]{0,1}[0-9]{0,2}|2[0-4][0-9]|25[0-5])$
61+
type: string
5862
name:
5963
description: Name is the name of the interface added to the
6064
gateways.
6165
type: string
6266
required:
67+
- ip
6368
- name
6469
type: object
6570
required:
@@ -71,6 +76,22 @@ spec:
7176
status:
7277
description: InternalNodeStatus defines the observed state of InternalNode.
7378
properties:
79+
interface:
80+
description: Interface contains the information about network interfaces.
81+
properties:
82+
gateway:
83+
description: Gateway contains the information about the gateway
84+
interface.
85+
properties:
86+
mac:
87+
description: Mac is the MAC address of the gateway interface.
88+
type: string
89+
required:
90+
- mac
91+
type: object
92+
required:
93+
- gateway
94+
type: object
7495
nodeIP:
7596
description: NodeAddress is the address of the node.
7697
properties:
@@ -86,6 +107,7 @@ spec:
86107
type: string
87108
type: object
88109
required:
110+
- interface
89111
- nodeIP
90112
type: object
91113
type: object

deployments/liqo/templates/liqo-fabric-daemonset.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
command: ["/usr/bin/liqo-fabric"]
4444
args:
4545
- --nodename=$(NODE_NAME)
46-
- --enable-arp=false
46+
- --enable-arp=true
4747
{{- if .Values.common.extraArgs }}
4848
{{- toYaml .Values.common.extraArgs | nindent 10 }}
4949
{{- end }}

deployments/liqo/templates/liqo-wireguard-gateway-client-template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ spec:
8989
- --mode=server
9090
- --metrics-address=:8084
9191
- --health-probe-bind-address=:8085
92-
- --enable-arp=false
92+
- --enable-arp=true
9393
env:
9494
- name: NODE_NAME
9595
valueFrom:

deployments/liqo/templates/liqo-wireguard-gateway-server-template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ spec:
102102
- --mode=server
103103
- --metrics-address=:8084
104104
- --health-probe-bind-address=:8085
105-
- --enable-arp=false
105+
- --enable-arp=true
106106
env:
107107
- name: NODE_NAME
108108
valueFrom:

0 commit comments

Comments
 (0)