mirror of
https://github.com/rancher/rke.git
synced 2025-09-14 14:09:49 +00:00
error out if service options are not found
it's unexpected to see empty service options, but node plan shouldn't be generated in those scenarios
This commit is contained in:
@@ -223,7 +223,11 @@ func addEtcdMembers(ctx context.Context, currentCluster, kubeCluster *Cluster, k
|
||||
|
||||
etcdNodePlanMap := make(map[string]v3.RKEConfigNodePlan)
|
||||
for _, etcdReadyHost := range kubeCluster.EtcdReadyHosts {
|
||||
etcdNodePlanMap[etcdReadyHost.Address] = BuildRKEConfigNodePlan(ctx, kubeCluster, etcdReadyHost, etcdReadyHost.DockerInfo, svcOptionData)
|
||||
svcOptions, err := kubeCluster.GetKubernetesServicesOptions(etcdReadyHost.DockerInfo.OSType, svcOptionData)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
etcdNodePlanMap[etcdReadyHost.Address] = BuildRKEConfigNodePlan(ctx, kubeCluster, etcdReadyHost, etcdReadyHost.DockerInfo, svcOptions)
|
||||
}
|
||||
// this will start the newly added etcd node and make sure it started correctly before restarting other node
|
||||
// https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/runtime-configuration.md#add-a-new-member
|
||||
|
Reference in New Issue
Block a user