Skip to content

Conversation

@pantafive
Copy link
Contributor

Summary

  • When --templateId is specified, disk/volume settings from template are now used instead of being overwritten by CLI flag defaults

Problem

CLI flags have non-zero defaults (--containerDiskSize=20, --volumeSize=1, --volumePath=/runpod) that were always sent to the API, overriding template settings even when user didn't explicitly set them.

Solution

  • Added omitempty to containerDiskInGb, volumeInGb, volumeMountPath JSON tags
  • Added TemplateFieldFlags struct and ClearUnchangedTemplateFields method to clear these fields when templateId is set and flags were not explicitly changed
  • Zero values are now omitted from JSON, allowing API to use template values

Fixes #163

  When --templateId is specified, CLI flag defaults (containerDiskSize=20,
  volumeSize=1, volumePath=/runpod) were overriding template settings.

  Now these fields are cleared when templateId is set and flags were not
  explicitly changed by the user, allowing template values to be used.

  Fixes runpod#163
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.

Specifying --templateId does not apply disk and volume size/path settings

1 participant