You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clean the kube2iam annotations when the role is empty from the cronjob and job template.
This is a follow up on #3128 to clean up the annotations for kube2iam when not role is passed (or empty).
During the migration we noticed the spilo-logical-backup cronjob and the job template were still with the annotation, this creates confusion.
This PR only deletes the KubeIAmAnnotation to reduce the risk of deleting any other annotation created in another place/time. If preferred I can delete all annotations not present when generating the cronjob
The reason will be displayed to describe this comment to others. Learn more.
I think the code lines before are there to remove annotations. For the pod template here and for the job itself here. Do we really need an extra patch for the KubeIAmAnnotation?
Should we set KubeIAmAnnotation here similar to inside pod template generation?
@mikkeloscar was suggesting to just remove this specific annotation from the cronjob and job template, because it's not needed at all and it can just be simplified. This annotation is only needed inside the pod template when the kube_iam_role is not empty, but this was already addressed in the previous PR.
The logical backup generation reuses the generatePodTempate function from the stateful set. So it would always re-add the annotation for it to be removed by your code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clean the kube2iam annotations when the role is empty from the cronjob and job template.
This is a follow up on #3128 to clean up the annotations for kube2iam when not role is passed (or empty).
During the migration we noticed the
spilo-logical-backupcronjob and the job template were still with the annotation, this creates confusion.This PR only deletes the
KubeIAmAnnotationto reduce the risk of deleting any other annotation created in another place/time. If preferred I can delete all annotations not present when generating the cronjob