-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
adding warning about --full #2950
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,21 @@ var ( | |
kops get cluster k8s-cluster.example.com`)) | ||
|
||
get_cluster_short = i18n.T(`Get one or many clusters.`) | ||
|
||
// Warning for --full. Since we are not using the template from kubectl | ||
// we have to have zero white space before the comment characters otherwise | ||
// output to stdout is going to be off. | ||
get_cluster_full_warning = i18n.T(` | ||
// | ||
// WARNING: Do not use a '--full' cluster specification to define a Kubernetes installation. | ||
// You may experience unexpected behavior and other bugs. Use only the required elements | ||
// and any modifications that you require. | ||
// | ||
// Use the following command to retrieve only the required elements: | ||
// $ kop get cluster -o yaml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo |
||
// | ||
|
||
`) | ||
) | ||
|
||
type GetClusterOptions struct { | ||
|
@@ -121,6 +136,8 @@ func RunGetClusters(context Factory, out io.Writer, options *GetClusterOptions) | |
if err != nil { | ||
return err | ||
} | ||
|
||
fmt.Fprint(out, get_cluster_full_warning) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We also suggested adding an annotation, and blocking use of the yaml until the annotation was removed. Thoughts on this approach vs the annotation approach? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can but that seems a little funky, we need a warning, regardless. We cannot just add an annotation without a warning and instructions on how to remove |
||
} | ||
|
||
switch options.output { | ||
|
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.
Is
//
a yaml comment? Is this supposed to be a comment?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.
It is NOT a yaml comment or a JSON comment - deliberately . You want to output text without //?
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.
Can you add a comment to get_cluster_full_warning explaining the thought process. It sounds like it is right, but I think you have to explain it.
One problem is that we're no longer outputing valid yaml or json