Skip to content

Commit

Permalink
fix: set default route priority for hcloud platform
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
smira committed Sep 15, 2023
1 parent 87c1b3d commit a7edd05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
})
Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ routes:
gateway: fe80::1
outLinkName: eth0
table: main
priority: 1024
scope: global
type: unicast
flags: ""
Expand Down

0 comments on commit a7edd05

Please sign in to comment.