1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-14 06:00:53 +00:00

Set node-ip and addresses annotations

This commit is contained in:
galal-hussein
2018-03-27 00:53:28 +02:00
parent fcdeca19f0
commit 5b848a2b45
3 changed files with 37 additions and 2 deletions

View File

@@ -281,6 +281,9 @@ func (c *Cluster) SyncLabelsAndTaints(ctx context.Context) error {
return fmt.Errorf("Failed to initialize new kubernetes client: %v", err)
}
for _, host := range hosts.GetUniqueHostList(c.EtcdHosts, c.ControlPlaneHosts, c.WorkerHosts) {
if err := k8s.SetAddressesAnnotations(k8sClient, host.HostnameOverride, host.InternalAddress, host.Address); err != nil {
return err
}
if err := k8s.SyncLabels(k8sClient, host.HostnameOverride, host.ToAddLabels, host.ToDelLabels); err != nil {
return err
}