fix(kubernetes): single-file GitOps delivery and Kustomize metadata.name exemption @osterman (#2874)
## whatkubernetes.gitops.provision.targets.<name>(kind: git) now supports asplittri-state:split: falsewritespathas a single merged multi-document YAML file instead of always treatingpathas a directory of auto-named files; unset infers the mode from whetherpath's last segment looks like a manifest filename (.yaml/.yml/.json).- Atmos's structural manifest validator no longer requires
metadata.nameon Kustomize's ownKustomization/Componentobjects (matched againstsigs.k8s.io/kustomize/api/types's own kind/version constants), since Kustomize's own schema and field-enforcement never require one. - A new
validate: falsecomponent-level flag opts a component out of both the apply/deploy structural auto-gate and the standaloneatmos kubernetes validatecommand. - Docs: new "Generating a Kustomize component for GitOps" walkthrough,
splitdocumented onkubernetes-deploy.mdx, and the Kustomize exemption /validate: falsedocumented onkubernetes-validate.mdx. - Changelog post and a new shipped roadmap milestone (with a corrected progress percentage) for the Extensibility initiative.
why
- A git provision target's
pathwas always treated as a directory, so configuringpath: ".../kustomization.yaml"created a directory by that name containing an auto-generated file inside it, instead of the exact file Kustomize's remote-include mechanism requires. - The validator required
metadata.nameunconditionally, forcing users to add a meaningless name to KustomizeComponent/Kustomizationobjects just to satisfy Atmos, even though Kustomize's own tooling never requires one. - Together these blocked a real GitOps pattern: rendering a Kustomize patch/component with Terraform-derived values (e.g. via
!terraform.state) and committing it to a deployment repo as a properkustomization.yamlfor Argo CD/Flux to consume.
references
- N/A
Summary by CodeRabbit
-
New Features
- Git delivery supports single-file or directory output via
split, with automatic mode selection based on the destination path. - Kustomize
KustomizationandComponentobjects no longer requiremetadata.name. - Added an optional Kubernetes
validatesetting to bypass offline structural validation. - Successful Kubernetes deliveries now display a confirmation message.
- Git delivery supports single-file or directory output via
-
Bug Fixes
- Validation-disabled deployments and validation commands now behave correctly; server validation remains available.
- Git operation errors now include provider details and actionable guidance.
-
Documentation
- Added configuration guidance and GitOps examples for single-file delivery and Kustomize workflows.
🚀 Enhancements
fix(ci): Docker build image mirrors and concurrent output race @osterman (#2884)
## what- Bump
cloudposse/github-action-docker-build-pushfrom v3.0.0 to v3.1.0 in the releasedockerjob (.github/workflows/build.yml). - Explicitly override the action's
binfmt-imageinput tomirror.gcr.io/tonistiigi/binfmt:qemu-v7.0.0. - Hold the shared output lock for an entire flush (not per line) in
LinePrefixWriter(pkg/io/line_prefix_writer.go), so concurrent Terraform node writers can't interleave a line mid-block.
why
- The release Docker build job was failing due to rate limiting when pulling its buildx builder (
moby/buildkit) and QEMU binfmt images frompublic.ecr.aws. - v3.1.0 of the action switches the buildx builder's default image to the Google mirror (
mirror.gcr.io/moby/buildkit), fixing that pull. The action'sbinfmt-imageinput still defaults topublic.ecr.aws/eks-distro-build-tooling/binfmt-misceven at v3.1.0 (no upstream fix yet), so it's overridden here directly to the equivalent Google-mirroredtonistiigi/binfmtimage, which publishes the sameqemu-v7.0.0tag. Verified live: bothmirror.gcr.io/tonistiigi/binfmt:qemu-v7.0.0anddocker.io/tonistiigi/binfmt:qemu-v7.0.0resolve to the same digest and pull successfully;mirror.gcr.ioalso falls through to Docker Hub origin on any cache miss, so it's never less reliable than a direct Docker Hub pull. - Separately, the macOS Acceptance Tests job was failing
TestExecuteTerraformConcurrentHooksUseNodeWriters(pkg/scheduler/adapters) with a real, reproducible race:LinePrefixWriter.writeLineacquired/released the shared output mutex per line, so a singleWrite()call that produced multiple lines (e.g. a hook's buffered\r-then-\nprogress update) could have a different node's writer interleave a line in between, corrupting concurrent Terraform output. Reproduced withgo test -race -count=200before the fix (intermittent failures) and confirmed 200/200 clean after. - Both fixes address CI reliability issues discovered while investigating unrelated failures on this branch; neither changes the shipped Atmos CLI's behavior for end users.
references
- Upstream fix: cloudposse/github-action-docker-build-push v3.1.0
- CI failure: Acceptance Tests (macos), job 92489708710