Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Take ignore policy into account when working with automated resources #1749

Merged
merged 2 commits into from
Feb 19, 2019

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Feb 19, 2019

Fixes #1748

Before this change having a HelmRelease annotated with both 'automated' and 'ignore' put automated releases to a halt for all resources known to Flux.

The reason for this was the image check failing while comparing with a non-existent controller, resulting in an early error return; which short circuited image updates for everything else.

daemon/images.go Outdated Show resolved Hide resolved
daemon/images.go Outdated Show resolved Hide resolved
@squaremo
Copy link
Member

Arguably, we should not bother updating resources when they have the ignore annotation either in the file, or in the cluster resource, since the latter still gives surprising results -- the resource looks like it should have been updated, and visibly isn't. To do that, we'll also need to skip ignored resources when calculating the commit to make.

@squaremo
Copy link
Member

Arguably, ...

Having put forward that argument, I think this PR unambiguously improves things as it is.

Before this change having a HelmRelease annotated with both 'automated'
and 'ignore' put automated releases to a halt for all resources known
to Flux.

The reason for this was the image check failing while comparing with a
non-existent controller, resulting in an early error return; which
short circuited image updates for everything else.
@hiddeco hiddeco force-pushed the 1748-automated-ignore-clash branch from 0100805 to de33ad2 Compare February 19, 2019 11:44
@hiddeco
Copy link
Member Author

hiddeco commented Feb 19, 2019

I think this PR unambiguously improves things as it is.

I like cherries on my cake (or icing on the cake, as you English people would say) so I added a filter.

@hiddeco hiddeco changed the title Take ignore policy into account while fetching automated resources Take ignore policy into account when working with automated resources Feb 19, 2019
@hiddeco hiddeco force-pushed the 1748-automated-ignore-clash branch from ace307e to 84f37a4 Compare February 19, 2019 15:54
Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yar, looks good. Thanks!

@hiddeco hiddeco merged commit c9efad8 into master Feb 19, 2019
@hiddeco hiddeco deleted the 1748-automated-ignore-clash branch February 19, 2019 16:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants