Skip to content
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

Merged
merged 1 commit into from
Aug 4, 2017

Conversation

chrislovecnm
Copy link
Contributor

This starts work on #2290. Adds a warning to deter users from using YAML generated by --full.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 15, 2017
@chrislovecnm
Copy link
Contributor Author

/assign @geojaz

@chrislovecnm
Copy link
Contributor Author

/assign @andrewsykim

// and any modifications that you require.
//
// Use the following command to retrieve only the required elements:
// $ kop get cluster -o yaml
Copy link
Member

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.
Copy link
Member

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?

Copy link
Contributor Author

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 //?

Copy link
Member

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)
Copy link
Member

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?

Copy link
Contributor Author

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

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 26, 2017
@justinsb
Copy link
Member

justinsb commented Aug 4, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 4, 2017
@k8s-github-robot
Copy link

[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:
  • OWNERS [chrislovecnm,justinsb]

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 2941586 into kubernetes:master Aug 4, 2017
@chrislovecnm chrislovecnm deleted the full-spec-warning branch December 30, 2017 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants