Skip to content

merge env vars during pod update#269

Open
vavo wants to merge 1 commit intorunpod:mainfrom
vavo:notrius/issue-268-pod-update-env-merge
Open

merge env vars during pod update#269
vavo wants to merge 1 commit intorunpod:mainfrom
vavo:notrius/issue-268-pod-update-env-merge

Conversation

@vavo
Copy link
Copy Markdown

@vavo vavo commented Apr 10, 2026

E-268: merge env vars during pod update

  • resolves pod update --env replaces all env vars instead of merging #268 by merging runpodctl pod update --env values into the pod's existing env map instead of replacing the whole set.
  • maintains full legacy command compatibility (stderr warnings only, stdout unchanged).
  • keeps runpodctl as the primary binary; drop-in upgrade for existing users.
  • preserves existing env keys such as PUBLIC_KEY while allowing provided keys to be updated in place.
  • adds unit coverage for env parsing and merge behavior.

Test plan:

  • go test ./...
  • go test -tags e2e ./e2e
  • live pod create/update/get/delete verification

Copy link
Copy Markdown
Author

vavo commented Apr 10, 2026

live verification completed with a real Runpod API key.

verified flow:

  • build runpodctl
  • create gpu pod with:
    • --gpu-id 'NVIDIA GeForce RTX 4090'
    • --image ubuntu:22.04
    • --env '{"MY_VAR":"hello","OTHER_VAR":"world"}'
  • update the pod with --env '{"MY_VAR":"updated"}'
  • fetch the pod and verify:
    • MY_VAR=updated
    • OTHER_VAR=world is preserved
    • PUBLIC_KEY is preserved
  • delete pod immediately after verification

result: pass

pod id used for verification: ajwu26z75znda9
cleanup completed successfully.

@vavo vavo marked this pull request as ready for review April 10, 2026 15:38
@promptless
Copy link
Copy Markdown

promptless bot commented Apr 10, 2026

Promptless prepared a documentation update related to this change.

Triggered by runpod/runpodctl#269

Updated the --env flag documentation for runpodctl pod update to clarify that environment variables are now merged instead of replaced, preserving existing keys while updating specified values.

Review at https://app.gopromptless.ai/suggestions/f56234fa-1561-4c43-9451-cd7e5a4b78c9

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.

pod update --env replaces all env vars instead of merging

1 participant