-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Howdy!
I am an engineer working on the Digitalocean (DO) Kubernetes product. Today our team got pinged about a huge number of duplicate DO LoadBalancer updates coming from two different customers' clusters; these updates were being sent by our open source Cloud Controller Manager. We're working on our backend to reduce the impact of these spurious requests, but in the meantime I thought it would be a good idea to report our findings here as to what we have identified as the source of these duplicate updates.
Specifically, both clusters in question have a arangodb-operator deployments running that appear to be repeatedly stripping critical annotations from the Service objects managed by our CCM component -- specifically, kubernetes.digitalocean.com/load-balancer-id, which our CCM component uses to maintain the relationship between the Service object and the underlying DO LoadBalancer; the removal of this annotation results in CCM detecting a change on the Service that results in two behaviors:
- we add the annotation back almost immediately because as I mentioned earlier it is necessary to maintain the identity of the
Serviceas corresponding to the DO LoadBalancer - because the
Serviceobject is changed we push its current state through the DO API to update the LoadBalancer (even though the only thing that has changed is the annotation, our CCM isn't sophisticated enough to diff the current state of the backend LoadBalancer with what would be asserted based on theServiceobject, nor is it obvious that we should put that kind of effort into making it do this kind of check)
At this point we have been able to reproduce the problem with the following workflow:
$ doctl k8s cluster create reproduce-arangodb-race --version 1.18 --region sfo2
$ doctl k8s cluster kubeconfig save reproduce-arangodb-race
$ export URLPREFIX=https://raw.githubusercontent.com/arangodb/kube-arangodb/1.0.3/manifests
$ kubectl apply -f $URLPREFIX/arango-crd.yaml
$ kubectl apply -f $URLPREFIX/arango-deployment.yaml
$ export URLPREFIX=https://raw.githubusercontent.com/arangodb/kube-arangodb/1.0.3/examples
$ kubectl apply -f $URLPREFIX/simple-cluster.yaml(doctl is a command line tool for interacting with DO's product APIs)
Anyway, It seems like an antipattern to arbitrarily strip annotations from Service objects so I'm curious if it's really necessary to begin with; and if it is, would y'all be open to us opening a PR to add our annotation namespace to your list of secured namespaces? Thanks for your consideration!