Skip to content

docs: require k8s-bake v4.1.1+ in the bake example - #555

Merged
David Gamero (davidgamero) merged 1 commit into
Azure:mainfrom
bosesuneha:docs/bake-v4-compat
Aug 11, 2026
Merged

docs: require k8s-bake v4.1.1+ in the bake example#555
David Gamero (davidgamero) merged 1 commit into
Azure:mainfrom
bosesuneha:docs/bake-v4-compat

Conversation

@bosesuneha

@bosesuneha Suneha Bose (bosesuneha) commented Aug 7, 2026

Copy link
Copy Markdown
Member

Problem

The "Use bake action to get manifests" example pairs azure/k8s-bake@v3 with Azure/k8s-deploy@v7. That combination cannot work.

Since v7, assertPathWithinWorkspace (#528) rejects manifests: paths resolving outside GITHUB_WORKSPACE. k8s-bake before v4.1.1 wrote the baked manifest to RUNNER_TEMP, which is a sibling of the workspace on hosted runners:

/home/runner/work/
├── _temp/          <- k8s-bake <4.1.1 output
└── my-repo/
    └── my-repo/    <- GITHUB_WORKSPACE

So copying the documented example fails with:

manifest path /home/runner/work/_temp/baked-template-<ts>.yaml resolves to ...,
which is outside the workspace /home/runner/work/my-repo/my-repo

Fix

k8s-bake v4.1.1 writes to $GITHUB_WORKSPACE/.k8s-bake/ instead (Azure/k8s-bake#289), so the chain works again with no change needed on the k8s-deploy side — the workspace confinement is working as designed.

This PR only fixes the documentation:

  • bake example bumped @v3@v4
  • added a note stating the v4.1.1 minimum and why

The gap this closes: nothing in this repo currently tells users that a k8s-bake upgrade is the remedy. The v7.0.0 changelog entry describes the confinement but never mentions the bake version requirement, so anyone on k8s-bake@v3 or v4.1.0 has no signal pointing at the fix.

Fixes #553.

#553 had two halves. The runtime failure is already fixed upstream by
Azure/k8s-bake#289 (released in bake v4.1.1) — no code change is
needed here, since the workspace confinement is working as designed. The remaining half was
documentation: this repo still shipped the failing example and gave no indication that a k8s-bake
upgrade was the remedy. This PR closes that half, so #553 can close when it merges.

Test plan

  • prettier --check README.md passes
  • Confirmed assertPathWithinWorkspace is still present in src/utilities/fileUtils.ts on main (behavior intentionally unchanged)
  • Confirmed k8s-bake main writes to $GITHUB_WORKSPACE/.k8s-bake/ via getBakedManifestPath()

The bake example paired azure/k8s-bake@v3 with Azure/k8s-deploy@v7, which
cannot work. Since v7, assertPathWithinWorkspace rejects manifests that
resolve outside GITHUB_WORKSPACE, and k8s-bake before v4.1.1 wrote the
baked manifest to RUNNER_TEMP, a sibling of the workspace on hosted
runners. Copying the documented example produced:

  manifest path /home/runner/work/_temp/baked-template-<ts>.yaml resolves
  to ..., which is outside the workspace /home/runner/work/repo/repo

k8s-bake v4.1.1 writes into $GITHUB_WORKSPACE/.k8s-bake/ instead
(Azure/k8s-bake#289), so the chain works again with no change on the
k8s-deploy side. Bump the example to @v4 and state the minimum version,
since nothing in this repo currently tells users the bake upgrade is the
fix.

Refs Azure#553
@bosesuneha
Suneha Bose (bosesuneha) requested a review from a team as a code owner August 7, 2026 22:39
@davidgamero

Copy link
Copy Markdown
Collaborator

lgtm

@davidgamero
David Gamero (davidgamero) merged commit 75a6f52 into Azure:main Aug 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: v7 workspace containment rejects k8s-bake output in RUNNER_TEMP

2 participants