Repository navigation
Replies: 2 comments
|
Coming from Flux, the main mental shift is: Flux is "define what to deploy inline with kustomizations" while ArgoCD is "point Applications at paths/charts." You don't need the nested ApplicationSet-spawning-ApplicationSet pattern — that's the source of your UI mess. Here's a cleaner layout that gets you the same per-cluster overlay capability: The single ApplicationSet uses a matrix generator — cluster selector × git directory: apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: platform-services
namespace: argocd
spec:
goTemplate: true
generators:
- matrix:
generators:
- clusters:
selector:
matchLabels:
workload: "platform"
- git:
repoURL: https://gitlab.something.com/something/platform_services.git
revision: develop
directories:
- path: apps/*
template:
metadata:
name: "{{.name}}-{{.path.basename}}"
spec:
project: platform-services
source:
repoURL: https://gitlab.something.com/something/platform_services.git
targetRevision: develop
path: "apps/{{.path.basename}}/overlays/{{.name}}"
destination:
server: "{{.server}}"
namespace: "{{.path.basename}}"
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=trueFor Helm charts with kustomize overlays, use the # apps/cert-manager/base/kustomization.yaml
helmCharts:
- name: cert-manager
repo: https://charts.jetstack.io
version: 1.20.0
releaseName: cert-manager
namespace: cert-manager
valuesFile: values.yaml
resources:
- cluster-issuers.yaml# apps/cert-manager/overlays/narmer-demo-alpha/kustomization.yaml
resources:
- ../../base
- extra-issuer.yaml
patches:
- path: values-patch.yaml # if you need cluster-specific helm valuesThis gives you:
For the "multiple sources" thing you mentioned — it's fine to use multi-source, it's just not needed here since kustomize can render Helm charts natively now. |
|
I only run a single cluster, so I can't speak to the per-cluster overlay part. For the "install the chart, then create the resources that depend on it" part, what works for me with plain Applications (no ApplicationSets, no sync waves) is one Application per piece: The same applies to cert-manager: its issuers live in their own directory and have their own Application. Each Application has its own sync policy, which turned out to be the useful part. For the config Application I started with The chart is Helm-rendered by Argo CD, and the config is a directory. That avoids having to bridge Helm and Kustomize in the same Application. If you need a different set of issuers per cluster, the config Application would be the one to vary (a separate path or a Kustomize overlay per cluster), while the chart Application stays identical. I haven't done the multi-cluster part, so take that as a design suggestion rather than something I've run. |
Uh oh!
There was an error while loading. Please reload this page.
I have alot of experience managing Flux cluster, but we have a new environment where ArgoCD was the request.
Im having a ton of trouble finding.. clear guidance on a
normalrepo structure. This is currently once cluster, but will grow into more. A Cluster may beqa and prodor just one or the other. This repo is strictly forinfrastructureresources on these clusters, end-user deployments would come form a different repo.The main issue im having is around, how to handle dissimilar parts of an
ApplicationIn Flux, I would define kustomize that would
If I needed to make one cluster have 2 more Cluster issuers than another, its just adding a overlay for that cluster and moving on. Im having issues wrapping my head around the expected ArgoCD way of doing this.
I currently have this
Layout
Which picks up an app set
Which loops through application sets
This looks incredibly messy in the UI. With apps that deploys apps that deploys Applications. I also read you should not have multiple sources defined.. So can anyone please offer some guidance to get back on track?
im much more used to just definine kustomizations, and being able to reference raw manifests and helm charts without this additional abstraction so I know im definitely doing something wrong.
All reactions