Skip to content

Commit

Permalink
installer: do not create default disk with witness node
Browse files Browse the repository at this point in the history
Signed-off-by: Vicente Cheng <[email protected]>
  • Loading branch information
Vicente-Cheng committed Jan 10, 2024
1 parent d70e88a commit e882134
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/console/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ func doInstall(g *gocui.Gui, hvstConfig *config.HarvesterConfig, webhooks Render
hvstConfig.Labels = make(map[string]string)
}
hvstConfig.Labels[util.HarvesterWitnessNodeLabelKey] = "true"
hvstConfig.Labels[util.LonghornCreateDefaultDisk] = "false"
}

env, elementalConfig, err := generateEnvAndConfig(g, hvstConfig)
Expand Down Expand Up @@ -782,6 +783,7 @@ func configureInstalledNode(g *gocui.Gui, hvstConfig *config.HarvesterConfig, we
hvstConfig.Labels = make(map[string]string)
}
hvstConfig.Labels[util.HarvesterWitnessNodeLabelKey] = "true"
hvstConfig.Labels[util.LonghornCreateDefaultDisk] = "false"
}

// skip rancherd and network config in the cos config
Expand Down
3 changes: 3 additions & 0 deletions pkg/util/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ var (
HarvesterNodeRoleLabelPrefix = "node-role.harvesterhci.io/"
HarvesterWitnessNodeLabelKey = HarvesterNodeRoleLabelPrefix + "witness"

LonghornNodeLabelPrefix = "node.longhorn.io/"
LonghornCreateDefaultDisk = LonghornNodeLabelPrefix + "create-default-disk"

sizeRegexp = regexp.MustCompile(`^(\d+)(Mi|Gi)$`)
)

Expand Down

0 comments on commit e882134

Please sign in to comment.