This repository has been archived by the owner on May 3, 2022. It is now read-only.
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.
shipperctl: introduce
shipperctl chart render
#374shipperctl: introduce
shipperctl chart render
#374Changes from all commits
8f6903a
fe8f0ff
f1c2f71
7cc40ee
23ff16d
5ceac1b
304abe4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 am not sure, but I wonder if there is a better way to not have these variables global?
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 can see it's consistent with the rest of the commands, but I was a bit confused by this line
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.
The initial command was getting an appName, pulled it from the cluster and used the chart from it.
I wanted it to be possible to git a yaml of an application that does not exist in the cluster yet.
So with this command you can either give an app name or an application manifest (yaml file name)
The meaning of the variables is in their description in lines 40-41.
Other Go command line code is specifying the flags in a different location so there is no need for global variables. I opted for consistency, but I tend to agree that these global variables are not the best choice. I can start with these commands and have another PR to refactor the rest of shipperctl commands. WDYT?
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.
Thanks for the explanation, I think it makes sense to keep it like that for now. Would you consider this as a potential refactoring for the future?
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.
Of course! I wanted to do it by now but didn't have the time.
Go's way of doing CLIs is not so gracious, but I have seen some examples of nice ones when I was looking into this (
shipperctl decommission
shenanigans)