Closed flavio closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 72.36%. Comparing base (
a27076e
) to head (92f2a54
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Prior to this commit, our
CreateOrPatch
function overwrote the Deployment annotations and labels.This is a problem, because Kubernetes internally uses an annotation to keep track of the Deployment revision.
Because of our behaviour, the controller ended up removing the annotation
deployment.kubernetes.io/revision
. But after a while the Kubernetes reconcilers added it back. Leading to a back and forth between our controller and the Kubernetes ones.This also manifested itself inside of our e2e tests, which sometimes failed with this message:
The
0
revision is a special value which is assigned by kubectl when the annotation field is NOT found.This commit prevents annotations and labels to be overwritten. Labels are not strictly related with the issue we found inside of the e2e tests, but there are indeed some labels that are added by helm that we should not be messing with.