chore: consolidate manifest overlays from 10 to 5 - #418
Conversation
Streamline the Kustomize overlay structure by removing redundant and unused overlays: - Merge kind-local into kind (Makefile handles LOCAL_IMAGES via set image) - Rename openshift-local → crc (clearer naming) - Rename hcmais → hcmai (align with project name) - Delete kind-local (merged into kind) - Delete hcmais-dev (nearly identical to hcmais, unused) - Delete openshift-dev (only disabled JWT; OpenShift should use OIDC) - Delete local-dev (legacy vteam- prefix model, unused) - Delete mpp-openshift (discontinued) Remaining overlays: kind, e2e, crc, production, hcmai All kustomize builds verified passing. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
jsell-rh
left a comment
There was a problem hiding this comment.
🤖 Amber Review
Good direction — reducing 10 overlays to 5 is the right call, and the kustomize build verification you've done gives confidence on the manifest side. Two issues need addressing before this is merge-ready.
🔴 Critical: Hardcoded image name list will silently miss new images
In Makefile, the LOCAL_IMAGES=true path now uses a hard-coded for img in ... loop:
for img in acp_api_server acp_ambient_ui acp_control_plane acp_claude_runner acp_runner_openshell acp_mcp acp_credential_github acp_credential_jira acp_credential_k8s acp_credential_google; do \
kubectl set image deployment -n $(NAMESPACE) --all --containers="*" \
"quay.io/ambient_code/$$img:latest=localhost/$$img:latest" 2>/dev/null || true; \
done; \The old kind-local overlay was declarative and exhaustive by construction; this loop has to be kept in sync manually every time a new image is added. The 2>/dev/null || true suppression also means a missed image silently fails. Two options:
- Drive the list from a Makefile variable already used elsewhere (e.g.
IMAGES), or - Query the cluster:
kubectl get deployments -n $(NAMESPACE) -o jsonpath='{.items[*].spec.template.spec.containers[*].image}'and filter forquay.io/ambient_code/.
Either approach avoids the silent-miss problem. I'd suggest option 1 if the variable already exists.
🔴 Critical: CLAUDE.md convention — never silently swallow partial failures
The || true on kubectl set image means a failed patch produces no error. Per CLAUDE.md: "Never silently swallow partial failures: Every error path must propagate or be collected, not discarded." At a minimum, log which images failed:
kubectl set image deployment -n $(NAMESPACE) --all --containers="*" \
"quay.io/ambient_code/$$img:latest=localhost/$$img:latest" || \
echo "Warning: failed to patch image $$img (may not exist — continuing)"; \Three items remain unchecked:
CI kustomize-check workflow validates overlaysmake kind-upworks with default (Quay) imagesmake kind-up LOCAL_IMAGES=trueworks with locally built images
The last two are the most important — they validate the exact Makefile path being changed. Don't mark ready until these are confirmed. The CI check should also catch any remaining kustomize issues.
Minor (no action needed):
hcmais-dev/ambient-api-server-env-patch.yamlhad a hardcoded CRC Keycloak URL inOIDC_ISSUER_URLthat pointed atapps-crc.testing— good that it's deleted.- The README.md is updated correctly to match the new 5-overlay structure.
- Rename from
hcmais→hcmaiis consistent with the one-linekustomization.yamlcomment fix.
Please address the two blocker items and confirm the kind-up paths work before removing Draft status.
— Amber
Summary
kind-localintokind— Makefile handlesLOCAL_IMAGES=trueviakubectl set imageinstead of a separate overlayopenshift-local→crc(clearer naming for CRC/OpenShift Local)hcmais→hcmai(align with project name)kind-local,hcmais-dev,openshift-dev,local-dev,mpp-openshiftBefore: 10 overlays (kind, kind-local, e2e, openshift-local, local-dev, openshift-dev, production, hcmais, hcmais-dev, mpp-openshift)
After: 5 overlays (kind, e2e, crc, production, hcmai)
All
kustomize buildverified passing for remaining overlays. Updated references across Makefile, CI workflows, docs, and skills.Test plan
kustomize buildpasses for all 5 remaining overlays (kind, e2e, crc, production, hcmai)make kind-upworks with default (Quay) imagesmake kind-up LOCAL_IMAGES=trueworks with locally built imagesmake crc-upworks on CRC🤖 Generated with Claude Code