diff --git a/pkg/config/constants.go b/pkg/config/constants.go index c2e2664da..5e6d35141 100644 --- a/pkg/config/constants.go +++ b/pkg/config/constants.go @@ -7,7 +7,7 @@ const ( ModeInstall = "install" RoleDefault = "default" - RoleEtcd = "etcd" + RoleWitness = "witness" NetworkMethodDHCP = "dhcp" NetworkMethodStatic = "static" diff --git a/pkg/console/install_panels.go b/pkg/console/install_panels.go index 77f4bd155..030b2f357 100644 --- a/pkg/console/install_panels.go +++ b/pkg/console/install_panels.go @@ -770,8 +770,8 @@ func addAskRolePanel(c *Console) error { Value: config.RoleDefault, Text: "Default Role (Master or Worker)", }, { - Value: config.RoleEtcd, - Text: "Worker (Etcd only)", + Value: config.RoleWitness, + Text: "Witness Role", }, }, nil } diff --git a/pkg/console/util.go b/pkg/console/util.go index dec1d019f..a633678b3 100644 --- a/pkg/console/util.go +++ b/pkg/console/util.go @@ -457,11 +457,11 @@ func doInstall(g *gocui.Gui, hvstConfig *config.HarvesterConfig, webhooks Render } // specific the node label for the specific node role - if hvstConfig.Role == config.RoleEtcd { + if hvstConfig.Role == config.RoleWitness { if hvstConfig.Labels == nil { hvstConfig.Labels = make(map[string]string) } - hvstConfig.Labels[util.HarvesterEtcdNodeLabelKey] = "true" + hvstConfig.Labels[util.HarvesterWitnessNodeLabelKey] = "true" } env, elementalConfig, err := generateEnvAndConfig(g, hvstConfig) @@ -777,11 +777,11 @@ func configureInstalledNode(g *gocui.Gui, hvstConfig *config.HarvesterConfig, we webhooks.Handle(EventInstallStarted) // specific the node label for the specific node role - if hvstConfig.Role == config.RoleEtcd { + if hvstConfig.Role == config.RoleWitness { if hvstConfig.Labels == nil { hvstConfig.Labels = make(map[string]string) } - hvstConfig.Labels[util.HarvesterEtcdNodeLabelKey] = "true" + hvstConfig.Labels[util.HarvesterWitnessNodeLabelKey] = "true" } // skip rancherd and network config in the cos config diff --git a/pkg/util/common.go b/pkg/util/common.go index 47d132e5a..8a56dd14f 100644 --- a/pkg/util/common.go +++ b/pkg/util/common.go @@ -6,7 +6,7 @@ import ( var ( HarvesterNodeRoleLabelPrefix = "node-role.harvesterhci.io/" - HarvesterEtcdNodeLabelKey = HarvesterNodeRoleLabelPrefix + "etcd" + HarvesterWitnessNodeLabelKey = HarvesterNodeRoleLabelPrefix + "witness" sizeRegexp = regexp.MustCompile(`^(\d+)(Mi|Gi)$`) )