mirror of
https://github.com/rancher/rke.git
synced 2025-05-10 09:24:32 +00:00
Fix rolling update of nginx-proxy for worker and etcd
This commit is contained in:
parent
ad1fbd54fb
commit
fb37cc90a9
@ -107,15 +107,6 @@ func reconcileControl(ctx context.Context, currentCluster, kubeCluster *Cluster,
|
||||
if err := rebuildLocalAdminConfig(ctx, kubeCluster); err != nil {
|
||||
return err
|
||||
}
|
||||
// Rolling update on change for nginx Proxy
|
||||
cpChanged := hosts.IsHostListChanged(currentCluster.ControlPlaneHosts, kubeCluster.ControlPlaneHosts)
|
||||
if cpChanged {
|
||||
log.Infof(ctx, "[reconcile] Rolling update nginx hosts with new list of control plane hosts")
|
||||
err := services.RollingUpdateNginxProxy(ctx, kubeCluster.ControlPlaneHosts, kubeCluster.WorkerHosts, currentCluster.SystemImages.NginxProxy, kubeCluster.PrivateRegistriesMap)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to rolling update Nginx hosts with new control plane hosts")
|
||||
}
|
||||
}
|
||||
// attempt to remove unschedulable taint
|
||||
toAddHosts := hosts.GetToAddHosts(currentCluster.ControlPlaneHosts, kubeCluster.ControlPlaneHosts)
|
||||
for _, host := range toAddHosts {
|
||||
|
@ -293,7 +293,9 @@ func IsContainerUpgradable(ctx context.Context, dClient *client.Client, imageCfg
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if containerInspect.Config.Image != imageCfg.Image || !reflect.DeepEqual(containerInspect.Config.Cmd, imageCfg.Cmd) {
|
||||
if containerInspect.Config.Image != imageCfg.Image ||
|
||||
!reflect.DeepEqual(containerInspect.Config.Cmd, imageCfg.Cmd) ||
|
||||
!reflect.DeepEqual(containerInspect.Config.Env, imageCfg.Env) {
|
||||
logrus.Debugf("[%s] Container [%s] is eligible for updgrade on host [%s]", plane, containerName, hostname)
|
||||
return true, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user