fluxcd / flux

Successor: https://github.com/fluxcd/flux2
https://fluxcd.io
Apache License 2.0
6.9k stars 1.08k forks source link

Support arbitrary resources for "fluxcd.io/automated" annotation #2518

Closed heprotecbuthealsoattac closed 3 years ago

heprotecbuthealsoattac commented 5 years ago

Describe the feature

It looks like fluxcd can't automatically update image for knative's service resource. I'd like fluxcd to be able to do that. For reference:

ts=2019-10-15T16:44:21.722165052Z caller=kubernetes.go:147 warning="automation of this resource kind is not supported" resource=app:service/frontend
squaremo commented 5 years ago

It's not a huge leap to fluxd being able to update arbitrary resources -- there's already a scheme for pointing at the field to update, used for HelmRelease, which could be generalised.

Today, however, I think you would have to use Kustomize via .flux.yaml; but beware, there are problems with this approach (e.g., #2428).

squaremo commented 5 years ago

If you don't mind, I'm going to make this issue a little more general, since it's something we'd like to address for other kinds of custom resource.

stefanprodan commented 5 years ago

Duplicate of: #1794

Morriz commented 4 years ago

We would love to see this enhancement, which could modify and redeploy any resource matching the annotations.

robinbraemer commented 4 years ago

We also need this to work with CRDs! We are using Agones for instance and we need the image to auto update for the GameServer in a Fleet.

Kustomize can already replace the image in CRs when generating yamls, so Flux should simply consider all resources with the fluxcd.io/automated: "true" annotation to trigger a release!

robinbraemer commented 4 years ago

Or the suggestion https://github.com/fluxcd/flux/issues/1794#issuecomment-628279100 would be easy to implement!

kingdonb commented 3 years ago

Flux v2 does support automation for arbitrary resources including custom resources now:

https://fluxcd.io/docs/guides/image-update/#configure-image-update-for-custom-resources

Flux v1 is formally superseded since the GitOps Toolkit APIs have been declared stable:

https://fluxcd.io/docs/migration/timetable/

The repo will remain in maintenance for some time, but no new features can be accepted. Bugs can be addressed if they are critical and there is a PR to resolve it, but soon only CVEs can be addressed in Flux v1, and new users are all recommended to use Flux v2 for some time now.

Thanks for using Flux!