-
Notifications
You must be signed in to change notification settings - Fork 131
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
FluxCD integration idea: allow TestTriggers to execute tests on CustomResource Conditions #3712
Comments
Thank you @cedricmckinnie Definitely, good idea! |
Just had an other interesting idea but I'm not sure how feasible it would be. Do you think it would be a good idea to capture details about the objects that were created/modified/deleted and provide them as input data to the test execution runtime? This would make the test execution aware of what object triggered it to run. At the very least the |
It might be interesting.knowing context details can be useful in some cases |
Other use-cases where CRD support for triggers would be useful beyond the original Fluxcd use-case:
I'd even say that ability to trigger tests on CRs is likely more useful than triggering on the current As a workaround, I'll next try to trigger on side effects of CR controllers, such as events generated by flux, see some list at fluxcd/flux2#3628 |
@vsukhin is possible to assign the ticket. More than happy to contribute here. Can give a brief about general design, as we have started working on this issue for our use case. Maybe its worth to consider the use case like trigger on general CRDs as well (One suggested by @cedricmckinnie @gberche-orange). |
Sure, feel free to contribute! It would be great |
Follow up on #3712 (comment)
Unfortunately, the event trigger is scoped on the associated resource (e.g Deployment) and thus can not yet be specified for the flux Kustomization ( |
Looks like dynamic informers are on the way which I believe should make it easy to watch any kind of custom resources the same way watcher.go is currently handling native resources. It might even reduce the need to use each individual informer type. Seems like there are a few blockers like this: |
good news, indeed @cedricmckinnie |
Any chance a regular |
We might, but I can't give you any ETA |
@vsukhin Submitted some changes for using dynamic informers to watch CR status conditions. I've tested it with HelmReleases to some extent in my cluster and it seems to work quite well. |
Describe the enhancement you'd like to see
To summarize, I would love to see the ability of
TestTriggers
to executeTests
based onName
,Selectors
andConditions
ofCustomResource
objects. This would allowTestTriggers
to runTests
for advanced operator configuration rollouts i.e. when usingFluxCD
.I also want to resurface my previous comment on this as a new thread as I see this as more of an enhancement to
TestTriggers
rather than a new feature-request. I think this will provide a relatively quick and simple path to betterFluxCD
integration (and likely other advanced operators) without having to re-architect much if at all.Additional context
FluxCD
controllers wait for resources that are being synced to complete reconciliation whether that attempt succeeds or fails. The controllers then write to the Status Conditions of the respectiveHelmRelease
orKustomization
object once the whole set of resources that is managed by that HR or KS has attempted to deploy rather than just aPod
,Deployment
,DaemonSet
etc. within it. This would be powerful because:FluxCD
Example usage would not require any change to the CRD or CLI inputs other than expanding the list of accepted resource values to include CustomResources i.e.
Many thanks for the consideration!
The text was updated successfully, but these errors were encountered: