https://platformengineering.org logo
#gitops
Title
# gitops
b

Benjamin Groves

01/31/2023, 4:42 PM
Hello everyone, I have a project I'm working on which is to create Preview Environments from Pull Requests. There is lots of content online about this, however non of the solutions I have read about are always suitable for micro-services. For example, if I have a
frontend
app and a
backend
app, when a PR is created on the
frontend
, a preview environment should be created in K8s with both the frontend and backend services, because they both depend on each other for any meaningful preview environment testing. I have an idea of using the
app-of-apps
approach from Argocd, but with an
ApplicationSet
and PR generator... I'm calling it
appset-of-apps
😅. Here I have created an example project to explain it further https://github.com/BennyG93/argocd-appsetofapps-example Just wondering if anyone has any thoughts, ideas or feedback about this? Thanks
r

Romaric Philogène

01/31/2023, 4:47 PM
Hi @Benjamin Groves - I know that you are looking to achieve this with ArgoCD - but if you want something that works our of the box with Kubernetes, then you might want to consider Qovery - you can check out this tutorial
p

Peter Hewitt

02/01/2023, 1:37 AM
We use a simple strategy where if you want multiple services to run in the same preview environment, use the same branch name. Otherwise we default to versions from prod.
v

venkata mutyala

02/03/2023, 7:19 PM
@Benjamin Groves any update to share? I'm actually working on a similar implementation myself.
b

Benjamin Groves

02/03/2023, 7:36 PM
Hey @venkata mutyala I've decided to continue building on the example I've shared here and it's working for me. Using an ApplicationSet to deploy child Applications, each of these child Applications would of course deploy the helm charts of each service I need deployed in the Preview Environment. Another approach I was advised on was to simply create a single helm chart that would deploy all of the related services. You could then use the ApplicationSet with this umbrella helm chart.
32 Views