fix: set default route priority for hcloud platform

Otherwise route gets created with priority '0' and it seems to get into
conflict with what Cilium tries to add.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
Andrey Smirnov 2023-09-14 18:54:27 +04:00
parent 87c1b3ddd8
commit a7edd0523f
No known key found for this signature in database
GPG Key ID: FE042E3D4085A811
2 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import (
"github.com/siderolabs/go-procfs/procfs"
"gopkg.in/yaml.v3"
networkctrl "github.com/siderolabs/talos/internal/app/machined/pkg/controllers/network"
"github.com/siderolabs/talos/internal/app/machined/pkg/runtime"
"github.com/siderolabs/talos/internal/app/machined/pkg/runtime/v1alpha1/platform/errors"
"github.com/siderolabs/talos/internal/app/machined/pkg/runtime/v1alpha1/platform/internal/netutils"
@ -75,7 +76,7 @@ func (h *Hcloud) ParseMetadata(unmarshalledNetworkConfig *NetworkConfig, metadat
Operator: network.OperatorDHCP4,
LinkName: ntwrk.Interfaces,
DHCP4: network.DHCP4OperatorSpec{
RouteMetric: 1024,
RouteMetric: networkctrl.DefaultRouteMetric,
},
ConfigLayer: network.ConfigPlatform,
})
@ -120,6 +121,7 @@ func (h *Hcloud) ParseMetadata(unmarshalledNetworkConfig *NetworkConfig, metadat
Protocol: nethelpers.ProtocolStatic,
Type: nethelpers.TypeUnicast,
Family: nethelpers.FamilyInet6,
Priority: networkctrl.DefaultRouteMetric,
}
route.Normalize()

View File

@ -20,6 +20,7 @@ routes:
gateway: fe80::1
outLinkName: eth0
table: main
priority: 1024
scope: global
type: unicast
flags: ""