Skip to content

Commit ac73072

Browse files
authored
Fix nil panic when config has no spec.k0s (#291)
Signed-off-by: Kimmo Lehto <[email protected]>
1 parent 995dc83 commit ac73072

File tree

1 file changed

+1
-0
lines changed
  • pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster

1 file changed

+1
-0
lines changed

pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/spec.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ type Spec struct {
1919
func (s *Spec) UnmarshalYAML(unmarshal func(interface{}) error) error {
2020
type spec Spec
2121
ys := (*spec)(s)
22+
ys.K0s = &K0s{}
2223

2324
if err := unmarshal(ys); err != nil {
2425
return err

0 commit comments

Comments
 (0)