From aa9f66c1c88a1bb35aefe24ea0a5c3a6e7aa966d Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Mon, 23 Jan 2023 16:45:40 +0400 Subject: [PATCH] fix: mark DigitalOcean anchor IP as scope link This excludes it out of the `NodeAddress`. Needs extra testing to confirm that it actually still works as anchor IP. Fixes #6760 Signed-off-by: Andrey Smirnov --- .../pkg/runtime/v1alpha1/platform/digitalocean/digitalocean.go | 2 +- .../v1alpha1/platform/digitalocean/testdata/expected.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/app/machined/pkg/runtime/v1alpha1/platform/digitalocean/digitalocean.go b/internal/app/machined/pkg/runtime/v1alpha1/platform/digitalocean/digitalocean.go index 58ff783e8..dbd5a3c84 100644 --- a/internal/app/machined/pkg/runtime/v1alpha1/platform/digitalocean/digitalocean.go +++ b/internal/app/machined/pkg/runtime/v1alpha1/platform/digitalocean/digitalocean.go @@ -182,7 +182,7 @@ func (d *DigitalOcean) ParseMetadata(metadata *MetadataConfig) (*runtime.Platfor ConfigLayer: network.ConfigPlatform, LinkName: "eth0", Address: ifAddr, - Scope: nethelpers.ScopeGlobal, + Scope: nethelpers.ScopeLink, Flags: nethelpers.AddressFlags(nethelpers.AddressPermanent), Family: nethelpers.FamilyInet4, }, diff --git a/internal/app/machined/pkg/runtime/v1alpha1/platform/digitalocean/testdata/expected.yaml b/internal/app/machined/pkg/runtime/v1alpha1/platform/digitalocean/testdata/expected.yaml index 1d18f8ae8..3a0dde1b4 100644 --- a/internal/app/machined/pkg/runtime/v1alpha1/platform/digitalocean/testdata/expected.yaml +++ b/internal/app/machined/pkg/runtime/v1alpha1/platform/digitalocean/testdata/expected.yaml @@ -14,7 +14,7 @@ addresses: - address: 10.18.0.5/16 linkName: eth0 family: inet4 - scope: global + scope: link flags: permanent layer: platform - address: 10.133.0.2/16