Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.

Commit 56a33d1

Browse files
authored
Galactic CNI is now using host-device internally (#2)
1 parent 1780c5a commit 56a33d1

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

internal/cniconfig/cniconfig.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,14 @@ type PluginConfGalactic struct {
2121
VPCAttachment string `json:"vpcattachment"`
2222
MTU int `json:"mtu,omitempty"`
2323
Terminations []Termination `json:"terminations,omitempty"`
24+
IPAM IPAM `json:"ipam,omitempty"`
2425
}
2526

2627
type Termination struct {
2728
Network string `json:"network"`
2829
Via string `json:"via,omitempty"`
2930
}
3031

31-
type PluginConfHostDevice struct {
32-
Type string `json:"type"`
33-
Device string `json:"device"`
34-
IPAM IPAM `json:"ipam,omitempty"`
35-
}
36-
3732
type IPAM struct {
3833
Type string `json:"type"`
3934
Routes []Route `json:"routes,omitempty"`
@@ -112,10 +107,6 @@ func CNIConfigForVPCAttachment(vpc galacticv1alpha.VPC, vpcAttachment galacticv1
112107
VPCAttachment: vpcAttachmentIdentifierBase62,
113108
MTU: 1300,
114109
Terminations: terminations,
115-
},
116-
PluginConfHostDevice{
117-
Type: "host-device",
118-
Device: fmt.Sprintf("G%09s%03sG", vpcIdentifierBase62, vpcAttachmentIdentifierBase62),
119110
IPAM: IPAM{
120111
Type: "static",
121112
Addresses: addresses,

internal/cniconfig/cniconfig_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ func TestCNIConfigForVPCAttachment(t *testing.T) {
2727
{Network: "192.168.1.0/24", Via: "10.1.1.1"},
2828
{Network: "2001:1::/64", Via: "2001:10:1:1::1"},
2929
},
30-
},
31-
cniconfig.PluginConfHostDevice{
32-
Type: "host-device",
33-
Device: "G1hVwxnaA7h31G",
3430
IPAM: cniconfig.IPAM{
3531
Type: "static",
3632
Addresses: []cniconfig.Address{

0 commit comments

Comments
 (0)