Closed Nitive closed 3 months ago
@stefanprodan, if you have the time, I would ask you to review this PR.
We discussed this proposal at the Flux dev meeting, we decided to include this in the upcoming Flux minor release scheduled for end of April. @darkowlzz will ask you at some point to rebase this on a diffrent branch. Thanks for your patience.
@stefanprodan thanks!
Hey @Nitive , as mentioned above, the refactored image-automation-controller code is at https://github.com/fluxcd/image-automation-controller/pull/647 . It's not fully ready yet but the code where you can add the policy selector and tests associated with it are pretty much ready as of today. You should be able to modify the getPolicies()
function to accept the selector and use it in the list call. And there's Test_getPolicies()
which you can modify and add tests for it. Once done, you can create a PR against the refactor
branch.
In case you're busy at the moment, please let me know. I can adapt the code in this PR to the new branch myself.
We are hoping to release this in April. So please let us know if you'd be able to work on it before then.
Hey @darkowlzz, I will do it tomorrow
@darkowlzz, it's done. Can you approve workflows please so tests can run?
@darkowlzz, thanks for the detailed feedback! I've applied the changes you suggested
I'll update the documentation shortly (update: done)
@darkowlzz, fixed
Add support for policy selector in
ImageUpdateAutomation
responseSelector can be specified the same way as Deployment.spec.selector (See
kubectl explain Deployment.spec.selector
for details)Example:
This allowes to have more flexible image updates, for example, we can batch updates of different components to separate branches. This was previously discussed in #499 and fluxcd/flux2#107