-
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
adding warning about --full #2950
Conversation
/assign @geojaz |
/assign @andrewsykim |
// 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 comment
The reason will be displayed to describe this comment to others. Learn more.
typo
// 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. |
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
@@ -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 comment
The 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 comment
The 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
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrislovecnm, justinsb The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
This starts work on #2290. Adds a warning to deter users from using YAML generated by --full.