-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to limit applied policies in automation by specifying a selector #619
Add support to limit applied policies in automation by specifying a selector #619
Conversation
ac3f809
to
9f7ce4b
Compare
@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 #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 |
Hey @darkowlzz, I will do it tomorrow |
9f7ce4b
to
86e732c
Compare
@darkowlzz, it's done. Can you approve workflows please so tests can run? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the code.
Can you also update the PR description as per the current implementation?
In addition to the implementation, can you also update the spec docs for v1beta2 API and document this new field in https://github.com/fluxcd/image-automation-controller/blob/refactor/docs/spec/v1beta2/imageupdateautomations.md#writing-an-imageupdateautomation-spec ?
86e732c
to
b1c34d1
Compare
@darkowlzz, thanks for the detailed feedback! I've applied the changes you suggested |
I'll update the documentation shortly (update: done) |
b1c34d1
to
5f0d956
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes and tests look good to me. Thanks.
Left some minor suggestions. Once they are addressed, I think we are good to merge this.
…elector Signed-off-by: Maxim Samoilov <[email protected]>
5f0d956
to
595e5ae
Compare
@darkowlzz, fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did some manual testing and it just works.
LGTM!
Thanks.
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