admiraltyio / admiralty

A system of Kubernetes controllers that intelligently schedules workloads across clusters.
https://admiralty.io
Apache License 2.0
673 stars 87 forks source link

Enable customization of reinvocationPolicy for webhook #192

Closed kirillmakhonin-brt closed 1 year ago

kirillmakhonin-brt commented 1 year ago

Hello

In our setup we have a custom Pod Mutating webhook that has a logic to add Admirality Pod annotations based on specific conditions (e.g. number of resources requested).

We've tried to use this webhook directly with Admirality, but it looks like it is ignored because reinvocationPolicy is not set to IfNeeded (our webhook adds proper annotation but Admirality does not see it because Admirality's webhook has been invoked before).

Ref: https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#reinvocation-policy

Proposed solution is to add a value to the HELM chart to support customization of reinvocationPolicy