Skip to content

Add support for CSVs in template --api-versions arg - #11490

Merged
mattfarina merged 1 commit into
helm:mainfrom
learnitall:pr/learnitall/allow-csv-api-versions
Jan 9, 2023
Merged

mattfarina merged 1 commit into
helm:mainfrom
learnitall:pr/learnitall/allow-csv-api-versions

Conversation

@learnitall

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

This commit changes the template sub-command argument --api-versions from StringArrayVarP to StringSliceVarP, to allow support for comma separated variables. This will allow users to use a syntax such as --api-versions one,two,three over --api-versions one --api-versions two --api-versions three.

Closes #11485

Signed-off-by: Ryan Drew [email protected]

Special notes for your reviewer:

Please see #11485 for more details.

This commit changes the template sub-command argument
`--api-versions` from `StringArrayVarP` to `StringSliceVarP`,
to allow support for comma separated variables. This will allow
users to use a syntax such as `--api-versions one,two,three` over
`--api-versions one --api-versions two --api-versions three`.

Fixes: helm#11485

Signed-off-by: Ryan Drew <[email protected]>
@pull-request-size pull-request-size Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 31, 2022
@joejulian joejulian added this to the 3.11.0 milestone Oct 31, 2022

@yxxhero yxxhero left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@learnitall

Copy link
Copy Markdown
Contributor Author

Hey! Just checking in. Is there anything left to do for this before it can be merged?

@mattfarina

Copy link
Copy Markdown
Collaborator

This is backwards compatible. From the flag handling docs...

// For example:
//   --ss="v1,v2" --ss="v3"
// will result in
//   []string{"v1", "v2", "v3"}

And, a comma is not an allowed character in a group/version that would impact the input.

@mattfarina

Copy link
Copy Markdown
Collaborator

XS PR which can be merged on one maintainer approval. So, merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

helm template --api-versions does not support comma-separated values

5 participants