Skip to content

Commit

Permalink
fix(k3d): fix HA mode pre-check error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason-ZW authored and JacieChao committed May 6, 2024
1 parent b2a620b commit be77ce8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cluster/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,11 +692,11 @@ func (p *ProviderBase) CheckCreateArgs(checkClusterExist func() (bool, []string,
return fmt.Errorf("[%s] calling preflight error: `--master` number must >= 1",
p.Provider)
}
if masterNum > 1 && !p.Cluster && p.DataStore == "" {
if p.Provider != "k3d" && masterNum > 1 && !p.Cluster && p.DataStore == "" {
return fmt.Errorf("[%s] calling preflight error: need to set `--cluster` or `--datastore` when `--master` number > 1",
p.Provider)
}
if strings.Contains(p.MasterExtraArgs, "--datastore-endpoint") && p.DataStore != "" {
if p.Provider != "k3d" && strings.Contains(p.MasterExtraArgs, "--datastore-endpoint") && p.DataStore != "" {
return fmt.Errorf("[%s] calling preflight error: `--masterExtraArgs='--datastore-endpoint'` is duplicated with `--datastore`",
p.Provider)
}
Expand Down

0 comments on commit be77ce8

Please # to comment.