kubedirector
kubedirector copied to clipboard
more aggressive reconciliation of object properties
In UpdateHeadlessService, UpdatePodService, and UpdateStatefulSetNonReplicas we could check to see if an object property has been changed out-of-band in a way that affects us. And then try to set it back to what it should be? or just complain/report.
Reconciliation of bad replicas counts in members sync is more complicated. We would need significant member repair operations similar to what we do in roles sync for missing statefulsets. For checkMemberCount in particular: if the role spec replicas has somehow dropped below the number of ready or creating members in the role, it may have destroyed some already-configured members. In that case we'd need to postpone whatever we are currently doing in the role, and re-create those. Might also need to introduce more invocations of checkMemberCount for various member state handlers.