|
|
|
@ -187,7 +187,7 @@ func (h *handler) updateService(svc *core.Service) (runtime.Object, error) {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
logrus.Debugf("Setting service loadbalancer %s/%s to IPs %v", svc.Namespace, svc.Name, expectedIPs) |
|
|
|
|
return h.services.Services(svc.Namespace).UpdateStatus(svc) |
|
|
|
|
return h.services.Services(svc.Namespace).UpdateStatus(context.TODO(), svc, meta.UpdateOptions{}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func serviceIPs(svc *core.Service) []string { |
|
|
|
@ -391,7 +391,7 @@ func (h *handler) newDaemonSet(svc *core.Service) (*apps.DaemonSet, error) {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (h *handler) updateDaemonSets() error { |
|
|
|
|
daemonsets, err := h.daemonsets.DaemonSets("").List(meta.ListOptions{ |
|
|
|
|
daemonsets, err := h.daemonsets.DaemonSets("").List(context.TODO(), meta.ListOptions{ |
|
|
|
|
LabelSelector: nodeSelectorLabel + "=false", |
|
|
|
|
}) |
|
|
|
|
if err != nil { |
|
|
|
@ -403,7 +403,7 @@ func (h *handler) updateDaemonSets() error {
|
|
|
|
|
daemonsetNodeLabel: "true", |
|
|
|
|
} |
|
|
|
|
ds.Labels[nodeSelectorLabel] = "true" |
|
|
|
|
if _, err := h.daemonsets.DaemonSets(ds.Namespace).Update(&ds); err != nil { |
|
|
|
|
if _, err := h.daemonsets.DaemonSets(ds.Namespace).Update(context.TODO(), &ds, meta.UpdateOptions{}); err != nil { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -420,5 +420,5 @@ func (h *handler) deleteOldDeployments(svc *core.Service) error {
|
|
|
|
|
} |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
return h.deployments.Deployments(svc.Namespace).Delete(name, &meta.DeleteOptions{}) |
|
|
|
|
return h.deployments.Deployments(svc.Namespace).Delete(context.TODO(), name, meta.DeleteOptions{}) |
|
|
|
|
} |
|
|
|
|