Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Deprecate storage-type flag #2266

Merged
merged 1 commit into from
Sep 28, 2018
Merged

Deprecate storage-type flag #2266

merged 1 commit into from
Sep 28, 2018

Conversation

jimmidyson
Copy link
Contributor

This uses the same conventions as Kubernetes, not marking flag as deprecated via pflag.FlagSet because this hides the flag from help, but rather marking the usage message as DEPRECATED.

As discussed in #2201, this keeps the flag and chart values to not break existing deployments, but completely unwires it so it can be removed in a (near-)future release.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 6, 2018
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 6, 2018
@jimmidyson
Copy link
Contributor Author

/assign @carolynvs

@MHBauer
Copy link
Contributor

MHBauer commented Aug 6, 2018

why do we want to show the flag in help? to act as notification that it is deprecated?

@jimmidyson
Copy link
Contributor Author

Correct. This is as following Kubernetes conventions - see https://github.com/kubernetes/kubernetes/blob/86b9a53226b1c9f9dce3ffb0133482f14709418b/cmd/controller-manager/app/options/insecure_serving.go#L69-L71 for an example.

@jimmidyson
Copy link
Contributor Author

I've refactored this following spf13/pflag#163 to use the "proper" MarkDeprecated function but also ensuring that it's visible in usage - this makes it more visible that it will be unused and removed in the next few releases.

@jimmidyson jimmidyson mentioned this pull request Aug 7, 2018
)

const (
// Store generated SSL certificates in a place that won't collide with the
// k8s core API server.
certDirectory = "/var/run/kubernetes-service-catalog"

storageTypeFlagName = "storageType"
storageTypeFlagName = "storage-type"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't change the flag, as far as I can tell. We just weren't using it before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@MHBauer MHBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

big cleanup.

@jimmidyson
Copy link
Contributor Author

@carolynvs Any chance of a review of this?

Copy link
Contributor

@carolynvs carolynvs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

"The type of backing storage this API server should use",
)
flags.MarkDeprecated(storageTypeFlagName, "The value of this flag is now unused and will be removed in the near future")
flags.Lookup(storageTypeFlagName).Hidden = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: carolynvs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 12, 2018
@jimmidyson
Copy link
Contributor Author

@carolynvs Thanks for the review! Is there anyone else that can review so we could get this merged? Thanks!

@carolynvs
Copy link
Contributor

/assign @jboyd01

Jay, I'm hoping you have time to give this a lgtm? 😀

@jboyd01
Copy link
Contributor

jboyd01 commented Sep 28, 2018

sorry this has taken so long to get merged @jimmidyson, we appreciate the contribution!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 28, 2018
@k8s-ci-robot k8s-ci-robot merged commit f9bd009 into kubernetes-retired:master Sep 28, 2018
jboyd01 pushed a commit to jboyd01/service-catalog that referenced this pull request Oct 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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 Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants