Skip to content

feat: add registry auth and port labels to templates - #290

Closed
kodxana wants to merge 1 commit into
runpod:mainfrom
kodxana:template-registry-auth-port-labels
Closed

feat: add registry auth and port labels to templates#290
kodxana wants to merge 1 commit into
runpod:mainfrom
kodxana:template-registry-auth-port-labels

Conversation

@kodxana

@kodxana kodxana commented Jun 24, 2026

Copy link
Copy Markdown

summary

  • add --registry-auth-id to template create and template update
  • allow template update --registry-auth-id "" to detach registry credentials
  • add --port-labels to template create/update, with shorthand (22=ssh,8888=jupyter lab) and JSON forms
  • expose containerRegistryAuthId and portsConfig in template output

implementation

registry auth is sent through the existing REST template create/update paths.

port labels use the GraphQL portsConfig field through a narrow supplemental saveTemplate mutation. before that mutation, the CLI loads and preserves the complete existing template state. values changed by the immediately preceding REST request are overlaid so a briefly stale GraphQL read cannot undo the update.

create validates labels against --ports and removes the newly created template if the label mutation fails. update supports clearing labels with --port-labels "" and reports when REST fields succeeded but the label mutation failed.

examples

runpodctl template create \
  --name private-gpu \
  --image registry.example.com/team/image:tag \
  --registry-auth-id <registry-auth-id> \
  --ports "22/tcp,8888/http" \
  --port-labels "22=ssh,8888=jupyter lab"

runpodctl template update <template-id> \
  --registry-auth-id <registry-auth-id> \
  --port-labels '{"22":"ssh","8888":"jupyter lab"}'

validation

  • added unit coverage for REST registry-auth serialization, including clearing
  • added parser and validation coverage for pair and JSON port-label syntax
  • added GraphQL request coverage proving existing template state is preserved and fresh REST values are overlaid
  • targeted build/test/vet harnesses pass locally
  • live e2e was not run because no RUNPOD_API_KEY is available in this environment

@promptless

promptless Bot commented Jun 24, 2026

Copy link
Copy Markdown

Promptless prepared a documentation update related to this change.

Triggered by runpodctl PR #290

Documents the new --registry-auth-id and --port-labels flags on runpodctl template create and template update, including the port-label shorthand/JSON syntax and the empty-value clear/detach behavior on update.

Review: Document runpodctl template registry auth and port label flags

@kodxana kodxana closed this Jun 24, 2026
@github-actions
github-actions Bot deleted the template-registry-auth-port-labels branch June 25, 2026 08:18
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.

1 participant