Skip to content

Commit

Permalink
Use cluster.StorageType() for ValidateEtcdMembers phase (#823)
Browse files Browse the repository at this point in the history
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
  • Loading branch information
kke authored Jan 20, 2025
1 parent fa0f5ab commit 929602e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions phase/validate_etcd_members.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,10 @@ func (p *ValidateEtcdMembers) ShouldRun() bool {
return false
}

if len(p.Config.Spec.K0s.Config) > 0 {
storageType := p.Config.Spec.K0s.Config.DigString("spec", "storage", "type")
if storageType != "" && storageType != "etcd" {
log.Debugf("%s: storage type is %q, not k0s managed etcd", p.Config.Spec.K0sLeader(), storageType)
return false
}
if s := p.Config.StorageType(); s != "etcd" {
log.Debugf("%s: storage type is %q, not k0s managed etcd", p.Config.Spec.K0sLeader(), s)
}

return len(p.hosts) > 0
}

Expand Down

0 comments on commit 929602e

Please sign in to comment.