stefanprodan / timoni

Timoni is a package manager for Kubernetes, powered by CUE and inspired by Helm.
https://timoni.sh
Apache License 2.0
1.54k stars 68 forks source link

ArgoCD Integration #162

Open brizzbuzz opened 1 year ago

brizzbuzz commented 1 year ago

Hey, this project looks very promising! Seems like it's still early days, so this is just a feature request for getting this to work with ArgoCD (see you already have Flux support).

I will try to find some time to tinker around with it 🤞 but wanted to get this feature request down for tracking purposes.

Cheers, rooting for the day I don't have to look at helm templates anymore :)

stefanprodan commented 1 year ago

ArgoCD has the concept of plugins so I guess you could integrate Timoni this way. Another option would be for the Argo team to implement Timoni the same way they did with Helm, by running timoni template.

benbooth493 commented 11 months ago

Is it possible to write a custom plugin for ArgoCD and run:

timoni build api . --output yaml

Would that suffice do we think?

jmgilman commented 11 months ago

Would that suffice do we think?

I think the issue is this removes the multi-step apply ability baked into the timoni.cue file. Also, I'm not sure how the instance name would get filled in by the Argo.

jmgilman commented 10 months ago

I've started a Custom Management Plugin here: https://github.com/jmgilman/argo-cmp-timoni. You can configure an application to point to a directory that has a bundle.cue file in it and it will call timoni bundle build -f ./bundle.cue to generate the YAML for Argo CD to consume.

The only issue you'll face right now is if any of the OCI images are behind a private registry. We use AWS ECR, so I've provided a method using IRSA to enable pulling down private ECR images (see instructions in the README).

tuananh commented 10 months ago

but when we do this, we will ignore all the benefits of timoni right? argo-cd only template it and do the rest.

jmgilman commented 10 months ago

but when we do this, we will ignore all the benefits of timoni right? argo-cd only template it and do the rest.

Can you explain what you are expecting to see? Argo doesn't support another configuration tool handling deployments. With Helm, it just uses helm template to generate the resource manifests and then it (Argo) manages the lifecycle of them from that point forward.

If you're wanting something different, I don't think Argo CD is a good choice :)

mickdelaney commented 9 months ago

ArgoCD can be told how to check any CRD for status, so surely when the Timoni Controller is actually GA i.e. read the note here https://timoni.sh/gitops-flux/ We can configure ArgoCD to play nice with the Timoni CRDs & Controllers ?

jmgilman commented 9 months ago

ArgoCD can be told how to check any CRD for status, so surely when the Timoni Controller is actually GA i.e. read the note here https://timoni.sh/gitops-flux/ We can configure ArgoCD to play nice with the Timoni CRDs & Controllers ?

Not sure that I am following about the health checks. AFAIK those are just to set the UI status? Or are you talking about something different?

One thing that doesn't make sense for that note is why the runtime wouldn't work when templating. Doesn't it need to perform all of the runtime logic before it generates the manifests? I haven't tried it myself yet, but it seems like an odd limitation.

joaocc commented 3 weeks ago

Hi. Has there been any progress in this area with regards to integrating with ArgoCD? Thanks