azure-workload-identity icon indicating copy to clipboard operation
azure-workload-identity copied to clipboard

fix: check the value of the annotation to actually create the sidecar

Open dnitsch opened this issue 1 year ago • 2 comments

Reason for Change:

#1210

Ensures annotation values are respected

Requirements

  • [ ] squashed commits
  • [ ] included documentation
  • [ ] added unit tests and e2e tests (if applicable).

Issue Fixed:

Please answer the following questions with yes/no:

Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?

  • [ ] yes
  • [x] no

Notes for Reviewers:

dnitsch avatar Dec 18 '23 09:12 dnitsch

This is a breaking change since the existing behavior only requires that the annotation be set at all, not the specific value it has. At most, we can update the documentation to describe the behavior.

enj avatar Dec 18 '23 13:12 enj

hi @enj, thanks for coming back on this.

Sure that makes sense and a doc update would be good (happy to PR that, if you could send me the link to the source repo)

Though, the object validation would fail if there is no (string) value for a given key on apply, right?

Possibly, adding an empty "" to the positiveAnnotationVal slice to cover this scenario.

Again I totally see where you are coming from about the breaking change - it's just that I can't see many people setting that value to false and actually expect a sidecar to be injected 😄.

dnitsch avatar Dec 18 '23 17:12 dnitsch