-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add apply command for creds and params #1715
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: "porter credentials apply" | ||
slug: porter_credentials_apply | ||
url: /cli/porter_credentials_apply/ | ||
--- | ||
## porter credentials apply | ||
|
||
Apply changes to a credential set | ||
|
||
### Synopsis | ||
|
||
Apply changes from the specified file to a credential set. If the credential set doesn't already exist, it is created. | ||
|
||
Supported file extensions: json and yaml. | ||
|
||
You can use the generate and show commands to create the initial file: | ||
porter credentials generate mycreds --reference SOME_BUNDLE | ||
porter credentials show mycreds --output yaml > mycreds.yaml | ||
|
||
|
||
``` | ||
porter credentials apply FILE [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
porter credentials apply --file mycreds.yaml | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for apply | ||
-n, --namespace string Namespace in which the credential set is defined. The namespace in the file, if set, takes precedence. | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--debug Enable debug logging | ||
--debug-plugins Enable plugin debug logging | ||
--experimental strings Comma separated list of experimental features to enable. See https://porter.sh/configuration/#experimental-feature-flags for available feature flags. | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [porter credentials](/cli/porter_credentials/) - Credentials commands | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: "porter parameters apply" | ||
slug: porter_parameters_apply | ||
url: /cli/porter_parameters_apply/ | ||
--- | ||
## porter parameters apply | ||
|
||
Apply changes to a parameter set | ||
|
||
### Synopsis | ||
|
||
Apply changes from the specified file to a parameter set. If the parameter set doesn't already exist, it is created. | ||
|
||
Supported file extensions: json and yaml. | ||
|
||
You can use the generate and show commands to create the initial file: | ||
porter parameters generate myparams --reference SOME_BUNDLE | ||
porter parameters show myparams --output yaml > myparams.yaml | ||
|
||
|
||
``` | ||
porter parameters apply FILE [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
porter parameters apply --file myparams.yaml | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for apply | ||
-n, --namespace string Namespace in which the parameter set is defined. The namespace in the file, if set, takes precedence. | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--debug Enable debug logging | ||
--debug-plugins Enable plugin debug logging | ||
--experimental strings Comma separated list of experimental features to enable. See https://porter.sh/configuration/#experimental-feature-flags for available feature flags. | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [porter parameters](/cli/porter_parameters/) - Parameter set commands | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be
porter parameters apply myparams.yaml
, right? If so, same update needed for creds.This is a good time to mention: thoughts on using a
-f/--file
flag to pass in filename vs positional arg? I'm sure you'd thought of it. Endorsement for the former is that it'd be natural for users ofkubectl
-- but that doesn't nec. mean it's the right way to go for Porter. No strong opinion here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had strongly considered the -f flag (as you can see since I forgot to fix that example). I like to use a positional argument when the argument is required, is always specified, and is the object of the (command) sentence.
The file parameter fits all those characteristics and that is how the other commands in porter act as well (such as install). Having file be a positional argument is more consistent with porter itself, which I feel is more important that being consistent with kubectl.
Also there aren't a lot of other arguments that would make someone likely to be unsure what the positional argument should be. At most you are specifying
porter installation apply FILE --namespace
and to me namespace falls into the same category as say debug, or output. It's a general modifier for a bunch of commands, but it isn't the focus of the command, and therefore is unlikely to be accidentally specified as the positional argument.If we think that people will instinctively type -f FILE from muscle memory, we can do what we do for the help text (which is supported through --help and a help subcommand). We could add a hidden file flag and bind it, so that either way works, but we document the way that matches the rest of porter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think that I should add that hidden flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your call! I'd say we proceed w/o but if it's trivially easy to add... maybe so :)