fix: update service failed when reconcile
Signed-off-by: zhao.laihe <zhao.laihe@neolink.com>
This commit is contained in:
parent
f04c17f727
commit
0be1a66b39
|
@ -107,6 +107,8 @@ func CreateOrUpdateService(client clientset.Interface, service *corev1.Service)
|
|||
}
|
||||
|
||||
service.ResourceVersion = older.ResourceVersion
|
||||
service.Spec.ClusterIP = older.Spec.ClusterIP
|
||||
service.Spec.ClusterIPs = older.Spec.ClusterIPs
|
||||
if _, err := client.CoreV1().Services(service.GetNamespace()).Update(context.TODO(), service, metav1.UpdateOptions{}); err != nil {
|
||||
return fmt.Errorf("unable to update Service: %v", err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue