Goutham K

TIL: flux dependsOn can order HelmReleases and Kustomizations across namespaces

I assumed Flux dependency ordering was same-namespace only โ€” put everything in flux-system or give up on dependsOn. Nope. Both Kustomization and HelmRelease let you point spec.dependsOn at a peer in another namespace.

Add namespace on the dependency reference. The controller waits until that object is Ready before reconciling yours โ€” even when it lives somewhere else.

apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: webapp
  namespace: team-a
spec:
  dependsOn:
    - name: infrastructure
      namespace: flux-system
  interval: 10m
  path: ./apps/webapp
  prune: true
  sourceRef:
    kind: GitRepository
    name: fleet-infra
    namespace: flux-system

Same shape on a HelmRelease: dependsOn with name + namespace gates one release on another across namespaces. Handy when infra lives in a shared NS and apps are tenant-scoped.

So when apps and infra aren’t co-located: you don’t have to collapse namespaces just to get ordering. Set dependsOn[].namespace and let Flux wait across the boundary.