Track kubernetes pull policies based off of the container name
What does this MR do?
Track kubernetes pull policies based off of the container name
Previously, we tracked that based off the image name(s). This however does not allow for mutation of the images on admission.
Additionally, while checking on this issue, we discovered another issue where we didn't apply pull policies for services configured in the config.toml. This is now also fixed.
Why was this MR needed?
To allow mutating the image on admission.
What's the best way to test this MR?
- set a bogus
image
in the runner config, ie. one that fails to pull (because it does not exist) - set a
pull_policy
which triggers retries, e.g.pull_policy = ["if-not-present", "if-not-present", "if-not-present" ]
- set up a mutating admission controller, which swaps out image refs (e.g. something like this)
- kick off a build
- see, that the system retries, e.g. 3 times, because we have 3 pull policies configured
- previous to this change it would not have retried, because there were no (additional) pull_policies configured for the swapped out image
What are the relevant issue numbers?
- closes #38019 (closed)
- closes #38040 (closed)
Edited by Hannes Hörl