fix: correctly handle partial configs in DNSUpstreamController
Prevent `DNSUpstreamController` from panicking by checking if the `machine` section in the config is `nil`. This is the case when a machine has partial configuration, e.g., when the machine has only a `SideroLinkConfig` in its config. Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
This commit is contained in:
parent
6deb10ae25
commit
493bb60f81
@ -90,7 +90,8 @@ func (ctrl *DNSUpstreamController) run(ctx context.Context, r controller.Runtime
|
||||
return err
|
||||
}
|
||||
|
||||
if !mc.Config().Machine().Features().LocalDNSEnabled() {
|
||||
machineConfig := mc.Config().Machine()
|
||||
if machineConfig == nil || !machineConfig.Features().LocalDNSEnabled() {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user