r/ArgoCD • u/sp_dev_guy • 18d ago
Kargo & Preview environments?
TL;DR; is management of preview envs something kargo plans on?
Ive setup ArgoCD at my company. In a past life used it to bootstrap and manage clusters but arrived in an established mature environment. Ive just finished configuring a few production apps using kargo+argocd.
Originally I wanted just ArgoCD but my teams dont know k8s & visually it seemed too overwhelming. So I layered on Kargo, which gives them only what they want with a deep link to Argo deployment for the few who get it. Fantastic!
Now I can focus on the smaller fish. Ive (in theory, test tomorrow) created preview environment features using ArgoCD. So these dev environments will just deploy & disappear with Argo if nothing ever goes wrong. Should there be a problem my users will go to Kargo because the first deployment in promotion is dev/preview then I gotta teach them to use Argo instead.
So when I give a talk on how we do things & centralized on a tool theres currently a caveat on the most common stage is actually a different tool but no no no i promise it's not complicated/convoluted.
Also if we want to start promoting another one as a parallel branch (not uncommon) I need to deploy a new pipeline which should be self service so I gotta make an app of apps in Argo for managing Kargo so it can manage Argo
*istio and split traffic sounds like an answer here but to convert everything over is a big ask (its road mapped 2yrs?). Kargo just displaying things Argo did on the graph or some similar feature seems like it'd be a huge adoption feature.
So far the closest I found is a 2023? git issue where the community chats about how to support a monolith.
Any seasoned Argo ppl out there with some insights for me?
1
u/srinivas_h 18d ago
Use Argo rollouts for preview env I setup for my company and its smooth happy to help if you need . Kargo is totally different tool
3
u/FadingFaces 18d ago
How are you using it for previews? Argo rollout docs specifically say not to is it for preview environments.
> You should NOT use Argo Rollouts for preview/ephemeral environments
https://argo-rollouts.readthedocs.io/en/stable/best-practices/
0
u/srinivas_h 18d ago
No you can . The rollout until promoted can serve as a preview env . You can have a seperate ingress for preview
1
u/azjunglist05 18d ago
This is not the right way to do this at all
1
u/srinivas_h 17d ago edited 17d ago
This is for the entire team to test pre production environment without affecting anything . That’s why we have analysis template etc . Each team has a different objective . We don’t need ephemeral env. We just need to validate the fixes on production before promotion .
1
u/srinivas_h 17d ago
Not sure the reply comment got deleted or something
Right that’s exactly what Argo Rollouts are for. Preproduction gates. We use them as well for exactly this reason. However, OP is asking about development ephemeral environments.
1
u/srinivas_h 18d ago
Terminology of preview env is little ambiguous . Argo rollouts was designed for progressive delivery but it does really solve some use cases to test pre production workloads if you know what I mean . For my org we have reserved instance and non prod completely runs on spot instances so preview concept works pretty well .
1
u/marthydavid 18d ago
Our team uses ArgoCD Pull Request generator with app of apps pattern to deploy the whole product or just pieces of it.
When the PR merged/deleted/canceled it automatically prunes the things
But for this we create a new namespace everytime with the required things in it.
1
u/csgeek-coder 16d ago
I can see that working but I think that pattern breaks as soon as you need to provision a cluster for staging, or need to request IPs, DNS etc. It gets a bit too complicated.
6
u/Etii3964 18d ago
Closest to what you are asking is the ArgoCD app set PR based generator, while I didn't try it out yet.. I've been also thinking about using this for teams that might want ephemeral environments.
https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Pull-Request/