Point the moved Kustomizations at k8s-platform across namespaces

Moving them into the catalog namespace broke their source: sourceRef
resolves in the Kustomization's own namespace, so "k8s-platform" no longer
matched anything and both reported GitRepository not found.

Name the namespace explicitly rather than duplicating the source per
domain. Cross-namespace refs are allowed here — kustomize-controller runs
without --no-cross-namespace-refs — and the split is the point: the
templates belong to the platform in flux-system, the Kustomization that
consumes them belongs to the team in its own namespace.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Stéphane Tailland
2026-08-27 14:40:36 +02:00
parent 3c5025ee52
commit 27a9dfc037
2 changed files with 10 additions and 0 deletions
@@ -13,6 +13,11 @@ spec:
sourceRef:
kind: GitRepository
name: k8s-platform
# k8s-platform lives in flux-system: the templates are the platform's,
# this Kustomization is the team's. sourceRef resolves in the
# Kustomization's own namespace unless told otherwise, hence the
# explicit namespace rather than a copy of the source per domain.
namespace: flux-system
path: ./dataplane-template
prune: true
postBuild:
@@ -13,6 +13,11 @@ spec:
sourceRef:
kind: GitRepository
name: k8s-platform
# k8s-platform lives in flux-system: the templates are the platform's,
# this Kustomization is the team's. sourceRef resolves in the
# Kustomization's own namespace unless told otherwise, hence the
# explicit namespace rather than a copy of the source per domain.
namespace: flux-system
path: ./dataplane-globalpolicy-template
prune: true
postBuild: