mirror of
https://github.com/siderolabs/talos.git
synced 2025-12-11 12:31:44 +01:00
fix: address nil pointer panic
If the config does not have the kubelet field, we should return a default struct. Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
This commit is contained in:
parent
4c47fa259c
commit
73d4bf1f6e
@ -124,6 +124,10 @@ func (m *MachineConfig) Time() config.Time {
|
|||||||
|
|
||||||
// Kubelet implements the config.Provider interface.
|
// Kubelet implements the config.Provider interface.
|
||||||
func (m *MachineConfig) Kubelet() config.Kubelet {
|
func (m *MachineConfig) Kubelet() config.Kubelet {
|
||||||
|
if m.MachineKubelet == nil {
|
||||||
|
return &KubeletConfig{}
|
||||||
|
}
|
||||||
|
|
||||||
return m.MachineKubelet
|
return m.MachineKubelet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user