feat(wc-mcsg): print exact kubectl cp retrieval command from /sgsetup finish #10

Merged
crypt merged 1 commit from sgsetup-kubectl-hint into main 2026-10-03 20:09:54 +00:00
Owner

What

/sgsetup finish now prints the exact kubectl cp retrieval command instead of a <pod> placeholder:

kubectl -n wc-minecraft cp <pod>:/data/plugins/wc-mcsg/drafts/<map>-map.yml ./<map>-map.yml

The pod name comes from the controller-injected GAME_INSTANCE_NAME (game pods are named after their instance) and the namespace from WC_NAMESPACE, both already present on game pods. When either env var is absent (e.g. local/authoring runs), it falls back to the previous <pod> placeholder form.

Why

Removes the last manual step from map authoring: operators previously had to figure out the pod name and namespace themselves before copying the draft out of the pod.

Verification

  • spotlessApply + :wc-mcsg:test → BUILD SUCCESSFUL (431+ tests, including a new kubectlCopyCommand_isExact covering the exact-command construction).

Out of scope (deliberately deferred)

The ConfigMap/GitOps map-metadata overlay (map.yml via chart-generated ConfigMap + one-time prepare-world overlay) — to be revisited only if map.yml iteration becomes routine.

## What `/sgsetup finish` now prints the **exact** `kubectl cp` retrieval command instead of a `<pod>` placeholder: ``` kubectl -n wc-minecraft cp <pod>:/data/plugins/wc-mcsg/drafts/<map>-map.yml ./<map>-map.yml ``` The pod name comes from the controller-injected `GAME_INSTANCE_NAME` (game pods are named after their instance) and the namespace from `WC_NAMESPACE`, both already present on game pods. When either env var is absent (e.g. local/authoring runs), it falls back to the previous `<pod>` placeholder form. ## Why Removes the last manual step from map authoring: operators previously had to figure out the pod name and namespace themselves before copying the draft out of the pod. ## Verification - `spotlessApply` + `:wc-mcsg:test` → `BUILD SUCCESSFUL` (431+ tests, including a new `kubectlCopyCommand_isExact` covering the exact-command construction). ## Out of scope (deliberately deferred) The ConfigMap/GitOps map-metadata overlay (map.yml via chart-generated ConfigMap + one-time `prepare-world` overlay) — to be revisited only if `map.yml` iteration becomes routine.
feat(wc-mcsg): print exact kubectl cp retrieval command from /sgsetup finish
All checks were successful
/ commit-check (pull_request) Successful in 2s
/ detect (pull_request) Successful in 9s
/ controller (pull_request) Has been skipped
/ chart (pull_request) Has been skipped
/ plugin (pull_request) Successful in 2m28s
c23fd8a40d
crypt merged commit 38ae9f5968 into main 2026-10-03 20:09:54 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crypt/k8s-mcsg-uhc!10
No description provided.