vmware-archive / kubernetes-image-mapper

[Prototype] Apply relocation mappings on the fly to kubernetes resources
Apache License 2.0
0 stars 2 forks source link

Consider delaying controller pod status from becoming ready until resync is complete #5

Open glyn opened 4 years ago

glyn commented 4 years ago

The benefit would be that someone could check the controller pod status and know that if it was ready, then any existing image maps would have been processed.

Whether this is (easily) implementable is another matter.

@scothis wondered if a custom readiness probe could somehow determine when the depth of the reconciler queue reaches zero.

Also asked around on k8s slack: here.

glyn commented 4 years ago

Perhaps a solution to determining when resync is complete is to make the controller create a new resource on startup and then notice when that resource is reconciled and then mark the controller pod as ready (e.g. in a custom readiness probe). The resource could be labelled with a UUID for good measure or some other technique could be used to ensure the resource uniquely identifies this "generation" of the controller pod.

glyn commented 4 years ago

These PR comments are relevant to this issue.