LastAppliedReplicas annotation is added by the "cleanup" code in speccheck. It should be added for objects that are to be created too. Otherwise specification re-check that compares spec vs what k8s has returned after create fails. This produces the kind of error in logs that is typical an indication of a bug in the system - this update result vs spec check was introduced to catch such bugs. And it is a bug indeed. See the second commit where a hack that is no longer needed is removed because of this fix.
Logic that belongs together is spread around several places. Deployment and ServiceInstance pre-processing is now each in a single file, not across packages.
This PR fixed the following issues:
LastAppliedReplicas
annotation is added by the "cleanup" code in speccheck. It should be added for objects that are to be created too. Otherwise specification re-check that compares spec vs what k8s has returned after create fails. This produces the kind of error in logs that is typical an indication of a bug in the system - this update result vs spec check was introduced to catch such bugs. And it is a bug indeed. See the second commit where a hack that is no longer needed is removed because of this fix.Deployment
andServiceInstance
pre-processing is now each in a single file, not across packages.