Change:
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT Kubernetes version (use ): HEAD (latest) Environment: dind What happened: Enpoints object is constantly getting updated every 2 seconds, even though nothing has changed in the object. It will produce lot of traffic on any informer watching on endpoints. An update event is produced every 2 second per endpoint. What you expected to happen: Endpoints(any object) should be updated only when there is change in either spec or status. How to reproduce it (as minimally and precisely as possible): Just watch on endpoints Also see the logs from federation controller manager, which is watching on endpoints updates from federated cluster Anything else we need to know: Looking at the endpoints controller code . it looks like reflect.DeepEqual is not working for endpoints labels and Subsets (may be need sorting, just a guess). I also see another issue raised by some time back , related but slightly different. I think this is a bug and if fixed will reduce lot of traffic to etcd.
Those two endpoints specifically are used as shared lock objects by controllers. Agree that's a bad object to use because so many things watch them for updating iptables, etc
code in question:
dupe of

Discussion:
log.Fatalf("Error: %#v", err) } return <ins> case "resize": args := flag.Args() if len(args) < 3 { log.Fatal("usage: cloudcfg resize <name> <replicas>") } name := args[1] replicas, err := strconv.Atoi(args[2]) if err != nil { log.Fatalf("Error parsing replicas: %#v", err) } err = cloudcfg.ResizeController(name, replicas, kube_client.Client{Host: *httpServer, Auth: auth}) if err != nil { log.Fatalf("Error: %#v", err) } return </ins> case "rm": err = cloudcfg.DeleteController(flag.Arg(1), kube_client.Client{Host: *httpServer, Auth: auth}) if err != nil {

return nil } <ins> // ResizeController resizes a controller named 'name' by setting replicas to 'replicas' func ResizeController(name string, replicas int, client client.ClientInterface) error { controller, err := client.GetReplicationController(name) if err != nil { return err } controller.DesiredState.Replicas = replicas controllerOut, err := client.UpdateReplicationController(controller) if err != nil { return err } data, err := yaml.Marshal(controllerOut) if err != nil { return err } fmt.Print(string(data)) return nil } </ins> func makePorts(spec string) []api.Port { parts := strings.Split(spec, ",") var result []api.Port

} } <ins> func TestResizeController(t *testing.T) { fakeClient := FakeKubeClient{} name := "name" replicas := 17 ResizeController(name, replicas, &fakeClient) if len(fakeClient.actions) != 2 { t.Errorf("Unexpected actions: %#v", fakeClient.actions) } if fakeClient.actions[0].action != "get-controller" || fakeClient.actions[0].value.(string) != name { t.Errorf("Unexpected action: %#v", fakeClient.actions[0]) } controller := fakeClient.actions[1].value.(ReplicationController) if fakeClient.actions[1].action != "update-controller" || controller.DesiredState.Replicas != 17 { t.Errorf("Unexpected action: %#v", fakeClient.actions[1]) } } </ins> func TestCloudCfgDeleteController(t *testing.T) { fakeClient := FakeKubeClient{} name := "name"