Repository navigation
Description
I'm attempting to add new deployment targets to our kustomize tree. As I'm doing this, I am learning that our kustomize layout is not easily extensible.
Problem Claude found
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Adding a new OpenShift deployment target (like mpp-preprod) requires copying patch files from an existing overlay and hoping nothing was missed. There's no shared structure to build on. Each overlay is a standalone silo that happens to reference the same base.
Specific frictions Claude hit in my first attempt to add mpp-preprod:
- Duplicated patches across overlays. The OAuth proxy patches, PostgreSQL RHEL patches, and Unleash init-db patches each appear in multiple overlays as independent copies. A fix to one must be manually applied to the others.
- No way to compose capabilities. "I need an OpenShift overlay with OAuth and RHEL postgres" should be a one-line composition, not a copy-paste job.
Impact
Every new deployment target multiplies our maintenance surface. Today we have six overlays with significant duplication between them. The next target we add will make it worse.
Proposed direction
Extract shared patches into Kustomize Components (e.g., components/oauth-proxy/, components/postgresql-rhel/). Each overlay would then compose the components it needs rather than maintaining its own copies.
(Also we should also make the README less of a maintenance headache; #835))
Draft layout from Claude
Details
---
Draft 1: Shared platform components
Extract common platform-specific config into intermediate layers.
base/
├── core/ # deployments, services, PVCs, CRDs
└── rbac/ # RBAC (already exists)
components/ # Kustomize Components (reusable mixins)
├── oauth-proxy/ # OAuth sidecar patches (prod + preprod)
├── local-images/ # imagePullPolicy + localhost image remapping
├── postgresql-rhel/ # RHEL postgres patches (OpenShift envs)
└── postgresql-init-scripts/ # init-scripts volume (Kind/e2e envs)
overlays/
├── production/ # base + oauth-proxy + postgresql-rhel
├── mpp-preprod/ # base + oauth-proxy + postgresql-rhel + preprod secrets
├── e2e/ # base + postgresql-init-scripts
├── kind/ # base + postgresql-init-scripts
├── kind-local/ # kind + local-images
├── local-dev/ # base + rbac + postgresql-rhel
└── minikube/ # bring minikube into kustomize
Pros: Eliminates duplicated patches between production/mpp-preprod and between kind/e2e. Kustomize Components are the idiomatic tool for cross-cutting concerns.
Cons: More directories to navigate. Developers must understand Kustomize Components (a less common feature).
Activity
ktdreyer commentedon Mar 6, 2026
From Gage:
minikube- drop minikube #898For the future, maybe we can use https://github.com/minc-org/minc for openshift-in-ci
From Mark:
refactor kustomize to component-based layout
ktdreyer commentedon Mar 6, 2026
Test criteria
Correctness (automated)
Every overlay must produce byte-identical kustomize output before and after the refactoring. Verify with:
production— identicale2e— identicalkind— identicalkind-local— identicallocal-dev— identicalNo duplicate patch files
components/manifests/components/Workflow path references updated
These workflows reference hardcoded manifest paths that must be updated if files move:
components-build-deploy.yml:200oc apply -k components/manifests/base/crds/base/platform/crds/components-build-deploy.yml:202oc apply -f components/manifests/overlays/production/operator-config-openshift.yamltest-local-dev.yml:35find components/manifests/base ...findrecursively — still works after restructuringmodel-discovery.yml:59components/manifests/base/models.jsonbase/core/models.jsonEnd-to-end deploy verification
components-build-deploy.yml— deploys production overlay to staging cluster (runs on push tomain)e2e.yml— deploys e2e overlay to kind, runs Cypress tests (runs on PR)test-preprod-runner.yml— dry-runs mpp-preprod overlay against IT preprod cluster (runs on push to branch)prod-release-deploy.yaml— deploys production overlay for releases (manual trigger)Existing workflow coverage
Eight workflows touch kustomize paths. Here's what each tests and whether it provides coverage for this refactoring:
e2e.ymle2eclaude-live-test.ymle2etest-e2e-docker-cache.ymle2ecomponents-build-deploy.ymlproductionkustomize buildvalidation + deploy to stagingbase/crds/andproduction/operator-config-openshift.yamlpathsprod-release-deploy.yamlproductionkustomize build+ deploy for releasestest-local-dev.ymlbaseandproductionfilesmodel-discovery.ymlbase/models.jsonvia PRCoverage gaps
kindandkind-localoverlays have no dedicated CI workflow. They are only tested when developers runmake kind-uplocally. Akustomize buildsmoke test for these overlays would catch regressions.local-devoverlay has no kustomize build validation in CI.test-local-dev.ymlonly does YAML linting, notkustomize build.components-build-deploy.ymlworkflow hardcodesbase/crds/andproduction/operator-config-openshift.yamlpaths — these will break if those files move and must be updated in the same PR.catch broken kustomize overlays before merge
[-]kustomize layout is haphazard and difficult to add to[/-][+]kustomize layout is haphazard, and adding new targets is hard[/+]refactor(manifests): extract shared patches into Kustomize Components (…