Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

[Improvement] Multiple Templates Sources #17

Open
guidiego opened this issue Aug 5, 2019 · 2 comments
Open

[Improvement] Multiple Templates Sources #17

guidiego opened this issue Aug 5, 2019 · 2 comments

Comments

@guidiego
Copy link

guidiego commented Aug 5, 2019

Resume

Problem: What happens if I want to use multiple templates sources?
Reply: I can't
Solution: Make -u and -t be the same command as --template-source and add multiple of them behavior an alias or priority declaration (we regex it for identify if it's a git path or local path

Development Cases

  • Alias approach
    • I could use -t or --template-source multiple times passing alias source_path something like: -t kube-templates ssh:github....
  • Priority declaration
    • The last templates that I declare override the previous -t ssh:// or t /users/....

Combo x2

with #15

  • Alias approach
    • Default dir will always be loaded into default. alias
  • Priority declaration
    • We could always load default dir and override using next declarations

with #16

Alias approach could improve user experience if he wants to use multiple templates like:
-p default.deployment local.service something.hpa

@andrewsmedina
Copy link
Contributor

The linux, mac and windows accepts spaces in directory and file names. Is not common to see it, but it can happen. So, to use spaces to identify more than one parameter when the value of the parameter can be a directory or file name is not a good pattern. Some CLI tools like curl accepts multiple invocations of the named parameter, for multiple values for the same parameter:

-t dir -t dir2 -t dir3.

So @guidiego what do you think in to go in this way and use the curl style?

I'm +1 in to accept multiple values for -t and -u. But I'm -1 for to merge these two commands in one command because it will break the kube-render cli interface.

@guidiego
Copy link
Author

guidiego commented Aug 8, 2019

@andrewsmedina, in this case, I won't use spaces to multiple cases, that's a sample for alias approach something like: -t git ssh://git... -t local /user/src/templates, maybe the issue could be confused, but I propose 2 approaches, but +1 in both uses curl style

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants