cluster: migrate to using pkg/rings for Addresses [WIP]
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -71,14 +71,14 @@ func (p *Machine) WriteHosts() error {
|
||||
func (z *Zone) genHosts(out *hostsFile, p *Machine) {
|
||||
var names []string
|
||||
|
||||
ip, _ := RingOneAddress(p.zone.ID, p.ID)
|
||||
ip := p.RingOneAddress()
|
||||
names = append(names, p.Name)
|
||||
|
||||
if p.CephMonitor {
|
||||
names = append(names, fmt.Sprintf("%s-%s", p.zone.Name, "ceph"))
|
||||
names = append(names, fmt.Sprintf("%s-%s", p.zone.Name, "k3s"))
|
||||
|
||||
if z.ID == p.zone.ID {
|
||||
if z.Is(p.Region(), p.Zone()) {
|
||||
names = append(names, "ceph")
|
||||
names = append(names, "k3s")
|
||||
}
|
||||
@@ -94,7 +94,7 @@ func (z *Zone) genHosts(out *hostsFile, p *Machine) {
|
||||
if p.IsGateway() {
|
||||
var s string
|
||||
|
||||
ip, _ = RingZeroAddress(p.zone.ID, p.ID)
|
||||
ip, _ = p.RingZeroAddress()
|
||||
s = fmt.Sprintf("%s-%v", p.Name, 0)
|
||||
|
||||
entry = hostsEntry{
|
||||
|
||||
Reference in New Issue
Block a user