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

Add deprecation policy #1856

Merged
merged 1 commit into from
Jan 3, 2017
Merged

Add deprecation policy #1856

merged 1 commit into from
Jan 3, 2017

Conversation

thockin
Copy link
Member

@thockin thockin commented Dec 5, 2016

This proposed a written policy for deprecation within Kubernetes.

@bgrant0607 @lavalamp @matchstick @erictune @smarterclayton for review

@devin-donnelly I have no idea where to actually put this or where to link it into the tree. Thoughts?

@sarahnovotny FYI


This change is Reviewable

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 5, 2016

Rule #3: Other than the “current” API version, older API versions must be
supported after their announced deprecation for a duration of no less than:
* GA: 1 year or 2 releases (whichever is longer)
Copy link
Member Author

Choose a reason for hiding this comment

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

From @lavalamp out-of-band: Given that we have many API groups, and they will be versioning at different rates, it's easy to imagine a situation where we're removing a major version from some group every release. If the purpose of this is to reduce the maintenance burden on users, what about a rule that's something like, "GA versions will only be removed during the latter half of the calendar year" or “GA versions will only be removed in odd-numbered releases”?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hrm. We may not have to solve this before we actually hit the problem. Could be vaguer.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't understand your comment, @smarterclayton

v2 APIs may choose a different representation for the field, as long as it can
be round-tripped.  For example a v1 field named “magnitude” which was
deprecated might be named “deprecatedMagnitude” in API v2.  When v1 is
eventually removed, the deprecated field can be removed from v2.
Copy link
Member Author

Choose a reason for hiding this comment

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

From @lavalamp out-of-band: Does it need to wait until v3? The text as written would work better in a world where we have fine-grained versions, I think...

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really to support all features or is this a side effect of the round tripping requirement?

Copy link
Member Author

Choose a reason for hiding this comment

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

We support the features until they are EOL.

Copy link
Contributor

Choose a reason for hiding this comment

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

When can features reach EOL?

### REST resources (aka API objects)

Consider a hypothetical REST resource named Widget, which was present in API v1
in the above timeline, and which we want to deprecate.  We [document](http://kubernetes.io/docs/deprecated/)
Copy link
Member Author

Choose a reason for hiding this comment

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

@devin-donnelly We need a place to host deprecation notices, and maybe a template for it. I can help with the template, if you can tell me where to put them and where to link them from.

Copy link
Member

Choose a reason for hiding this comment

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

So far we've been putting such notices in the release notes.

Copy link
Member Author

Choose a reason for hiding this comment

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

release notes seem like a good way to announce them, but I think we need a page that links to current deprecations, no?

Rule #1: API elements may only be removed by incrementing the version of the
API group.

Once an API element has been added to an API group at a particular version, it
Copy link
Contributor

@smarterclayton smarterclayton Dec 5, 2016

Choose a reason for hiding this comment

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

Would go further and describe "it must not change in behavior". Removal and change in behavior are equivalent.

Copy link
Member Author

Choose a reason for hiding this comment

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

will clarify. want this to be strong.

@bgrant0607
Copy link
Member

@thockin This is intended to be read by end users or contributors?

@sarahnovotny
Copy link
Contributor

@bgrant0607, this was for end users per a convo this morning with @thockin

For example, an object can be written as v1 and then read back as v2 and
converted to v1, and the resulting v1 resource will be identical to the
original.  The representation in v2 might be different from v1, but the system
knows how to convert between them in both directions.
Copy link
Contributor

Choose a reason for hiding this comment

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

So if I read this right it is impossible to remove a field that existed in v1 when you move to v2, unless you somehow couple that information somewhere else in the v2 object.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is covered below (search for "deprecatedMagnitude").

@bgrant0607
Copy link
Member

@thockin Nit: Please don't use underscores in doc file names. When we move this file to its proper location it should also be renamed.

original.  The representation in v2 might be different from v1, but the system
knows how to convert between them in both directions.

Rule #3: Other than the “current” API version, older API versions must be
Copy link
Member

Choose a reason for hiding this comment

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

I'd clarify "current". Maybe: latest API version at least as mature as the ones it replaces

Copy link
Member Author

Choose a reason for hiding this comment

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

wilco

As with whole REST resources and fields thereof, a constant value which was
supported in API v1 must exist and function until API v1 is removed.

### Future work
Copy link
Member

Choose a reason for hiding this comment

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

If we think these rules should apply identically to versioned configuration, we should add a subsection that explicitly states that. I think that's a reasonable starting point. I think the only config that's GA might be kubeconfig and the scheduler config.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it sufficient to say "REST resources and component configs" since they use the same mechanisms? Or to call out component configs and say "see REST resources" ?

Copy link
Member

Choose a reason for hiding this comment

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

@thockin I'd do the latter: Call out component configs and say that the same policies apply as those that apply to REST resources.

@lavalamp
Copy link
Member

lavalamp commented Dec 6, 2016 via email

* GA: 1 year or 2 releases (whichever is longer)
* Beta: 3 months or 1 release (whichever is longer)
* Alpha: 0 releases

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also require releasing additional tooling that will help translate old API objects to newer versions?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe, but that is covered elsewhere - this doc is about deprecation and nothing more.

v2 APIs may choose a different representation for the field, as long as it can
be round-tripped.  For example a v1 field named “magnitude” which was
deprecated might be named “deprecatedMagnitude” in API v2.  When v1 is
eventually removed, the deprecated field can be removed from v2.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really to support all features or is this a side effect of the round tripping requirement?

Sometimes, we need to remove flags or CLI commands (collectively “CLI
elements”) in these programs.  The individual programs naturally sort into two
main groups - user-facing and admin-facing programs, which vary slightly in
their deprecation policies.  Unless a flag is explicitly prefixed “alpha” or
Copy link
Contributor

Choose a reason for hiding this comment

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

How do we handle alpha features that are exposed as top level commands?

Copy link
Member Author

Choose a reason for hiding this comment

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

alpha CLI commands is interesting. They probably should be denoted "alpha" somehow, but I think these rules are sufficient to cover deprecation.

Rule #6: Deprecated behaviors must function for no less than 1 year after their
announced deprecation.

This does not imply that all changes to the system are governed by this policy.  This applies only to significant, user-visible behaviors which impact the correctness of applications running on Kubernetes or that impact the administration of Kubernetes clusters, and which are being removed entirely.
Copy link
Contributor

Choose a reason for hiding this comment

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

This subjective policy will lead to confusion. Would it make sense to define a process for deciding deprecation period for such features?

Copy link
Member Author

Choose a reason for hiding this comment

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

I could be convinced to add more words here, but I don;t want this to become a legal treatise on the meaning of "significant".

* REST resources (aka API objects)
* Fields of REST resources
* Enumerated or constant values
These rules are enforced between official releases, not between
Copy link
Contributor

Choose a reason for hiding this comment

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

Need a blank line before this so that it's a new paragraph.

Copy link
Member Author

Choose a reason for hiding this comment

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

ack

These rules are enforced between official releases, not between
arbitrary commits to master or release branches.

Rule #1: API elements may only be removed by incrementing the version of the
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you bold or ### each rule so that they stand out a bit more?

Copy link
Member Author

Choose a reason for hiding this comment

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

ack

Rule #1: API elements may only be removed by incrementing the version of the
API group.

Once an API element has been added to an API group at a particular version, it
Copy link
Contributor

Choose a reason for hiding this comment

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

I think none of these rules should apply to alpha apis. They should be able to change in arbitrary ways at any point in time to encourage fast development.

Copy link
Member Author

Choose a reason for hiding this comment

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

once we publish an alpha API, I think it's unreasonable to change it in incompatible ways. Revving APIs should be cheap (I know it's not but @lavalamp is on it :)


This is best illustrated by example.  Imagine a Kubernetes release, version X,
which supports a particular API group.  A new Kubernetes release is made every
3 months (4 per year).  The following table describes which API versions are
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: made approximately every 3 months.

Copy link
Member Author

Choose a reason for hiding this comment

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

roger roger

| X+2 | v1, v2alpha2 | * v2alpha1 is removed, “action required” relnote |
| X+3 | v1, v2beta1 | * v2alpha2 is removed, “action required” relnote |
| X+4 | v1, v2beta1, v2beta2 | * v2beta1 is deprecated, “action required” relnote |
| X+5 | v1, v2, v2beta2 | * v2beta1 is removed, “action required” relnote<br> * v2beta2 is deprecated, “action required” relnote<br> * v1 is deprecated, “action required” relnote |
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see it explicitly called out that you can't deprecate v1 until v2 is available (e.g. it shouldn't be possible to deprecate v1 at X+3 because we almost have a v2 ready, just to speed up the time at which we can remove v1).

Copy link
Member Author

Choose a reason for hiding this comment

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

ooh, good one. Added.

For example, an object can be written as v1 and then read back as v2 and
converted to v1, and the resulting v1 resource will be identical to the
original.  The representation in v2 might be different from v1, but the system
knows how to convert between them in both directions.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is covered below (search for "deprecatedMagnitude").

@thockin thockin force-pushed the deprecation branch 2 times, most recently from b7f196a to 8843cf0 Compare December 6, 2016 06:22
@thockin
Copy link
Member Author

thockin commented Dec 6, 2016

New push is up with much feedback addressed. File was renamed, so github may lose comments.

@thockin thockin force-pushed the deprecation branch 2 times, most recently from 91bc79c to b321881 Compare December 6, 2016 06:27
Sometimes, we need to remove flags or CLI commands (collectively “CLI
elements”) in these programs.  The individual programs naturally sort into two
main groups - user-facing and admin-facing programs, which vary slightly in
their deprecation policies.  Unless a flag is explicitly prefixed “alpha” or
Copy link
Member

Choose a reason for hiding this comment

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

Do we have flags that control the behavior of alpha/beta features today? If so what you describe here would require some bulk flag renaming.

their deprecation policies.  Unless a flag is explicitly prefixed “alpha” or
“beta”, it is considered GA.

CLI elements are effectively part of the API to the system, but since they are
Copy link
Member

Choose a reason for hiding this comment

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

I couldn't quite figure out what a "CLI element" is. For kubectl, do you mean a subcommand (like get, drain, proxy, etc.)? What does it mean for kubelet?

@thockin
Copy link
Member Author

thockin commented Dec 6, 2016 via email

@thockin
Copy link
Member Author

thockin commented Dec 6, 2016 via email

@thockin
Copy link
Member Author

thockin commented Dec 6, 2016 via email

@bgrant0607
Copy link
Member

@thockin

LGTM. I'm favor of merging whenever you feel like you've addressed enough of the comments and iterating more in subsequent PRs.

Any idea why netlify failed?

@thockin
Copy link
Member Author

thockin commented Dec 6, 2016 via email

@davidopp
Copy link
Member

davidopp commented Dec 6, 2016

I defined it in the previous paragraph

I think part of my confusion is whether "e.g. kubectl" is modifying "user-facing components" or "CLI elements" (and likewise whether "e.g. kubelet" is modifying "admin-facing components" or "CLI elements."

TBH I stll don't know what a CLI element is even after re-reading. You say "CLI elements are effectively part of the API" but that doesn't tell me what they are.

@thockin
Copy link
Member Author

thockin commented Dec 7, 2016 via email

As with whole REST resources, an individual field which was present in API v1
must exist and function until API v1 is removed.  Unlike whole resources, the
v2 APIs may choose a different representation for the field, as long as it can
be round-tripped.  For example a v1 field named “magnitude” which was
Copy link
Contributor

Choose a reason for hiding this comment

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

I think a different example would be better, eg. v1 has magnitude, which transforms into magnitude1 and magnitude1 in v2. The round-trip knows how to deal with that, obviously. That's what will usually happen, imho. Adding deprecatedField in v2 to be then removed when v1 is gone, is confusing.

group name) and “extensions”.  We will incrementally move resources from these
legacy API groups into more domain-specific API groups.

**Rule #2: API objects must be able to round-trip between API versions in a given
Copy link
Member

Choose a reason for hiding this comment

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

@kubernetes/sig-autoscaling -- this was the point I was trying to find in our meeting today. @DirectXMan12 my reading of this is that HPA v2 would need to convert to HPA v1 when handling scaling on metrics other than cpu.

Copy link
Contributor

Choose a reason for hiding this comment

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

If that's the case, this should probably provide an explicit "if it adds new features, you have to have corresponding annotations on v1" or something like that.

Copy link
Contributor

Choose a reason for hiding this comment

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

(as in, an official policy for what to do when v1 is insufficiently expressive)

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@thockin What's the policy for adding completely new features in a new API version? Example we have in mind is adding support for custom metrics in v2 HPA API.

@thockin
Copy link
Member Author

thockin commented Dec 9, 2016 via email

@thockin
Copy link
Member Author

thockin commented Dec 9, 2016 via email

@thockin
Copy link
Member Author

thockin commented Dec 9, 2016 via email

@soltysh
Copy link
Contributor

soltysh commented Dec 12, 2016

@soltysh, but that's what I am trying to illustrate - how do you get rid of a field?

Right, nvmd, I misread it. Sorry. This LGTM.

@thockin
Copy link
Member Author

thockin commented Dec 13, 2016

Now that 1.5 is out, maybe @devin-donnelly can pour some brain power into the finer points of where this should live and whether humans can read it. :)


# Kubernetes Deprecation Policy

Kubernetes is a large system with many components and many contributors.  As
Copy link
Contributor

Choose a reason for hiding this comment

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

Try to avoid "we" constructs.

"Kubernetes is a large system with many components and contributors. As with any such software, the feature set evolves over time, and sometimes a feature may need to be removed. This could include an API, a flag, or even an entire feature. To avoid making breaking changes for existing users, Kubernetes is instituting a deprecation policy for aspects of the system that are slated to be removed."

committed to not breaking users, so we can’t just make breaking changes.  This
is when deprecation is triggered.

This document details the policies we hold on deprecation for various facets of
Copy link
Contributor

Choose a reason for hiding this comment

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

"This document details the policies for deprecating the different facets of the Kubernetes system should they be removed in future releases."


## Deprecating parts of the API

Since Kubernetes is an API-driven system, it’s not surprising that the API
Copy link
Contributor

Choose a reason for hiding this comment

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

"We/our" construct.

"Since Kubernetes is an API-driven system, the API has evolved over time to reflect an evolving understanding of the problem space. The Kubernetes API consists of several "API groups", and each API group is independently versioned."

number of versions of each.

The following rules govern the deprecation of elements of the API.  This
includes:
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs a blank line underneath to make the bullet list render correctly.


## Deprecating a flag or CLI

The Kubernetes system is comprised of several different programs cooperating.
Copy link
Contributor

Choose a reason for hiding this comment

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

"we" construct.

"Sometimes, a Kubernetes release might remove flags or CLI commands"

@devin-donnelly
Copy link
Contributor

@thockin A few wording nits. Otherwise, no problems.

@thockin
Copy link
Member Author

thockin commented Dec 22, 2016 via email

@devin-donnelly
Copy link
Contributor

@thockin Yes, this file is fine in the root directory, and I'm fine with the location for Deprecation notices. Anybody else need to sign off on this before I can merge it?

@thockin
Copy link
Member Author

thockin commented Dec 23, 2016 via email

@thockin
Copy link
Member Author

thockin commented Dec 27, 2016

rebased and repushed. I do not have access to the netlify, but it said it failed before.

@thockin
Copy link
Member Author

thockin commented Jan 3, 2017

rebased and pushed again. Gonna self-merge

@thockin thockin merged commit 6ebd943 into kubernetes:master Jan 3, 2017
geojaz pushed a commit to geojaz/kubernetes.github.io that referenced this pull request Jan 4, 2017
Okabe-Junya pushed a commit to Okabe-Junya/website that referenced this pull request Dec 4, 2023
…cument (kubernetes#1856)

* kubernetes#1775 Issue: Localized the content/en/software-as-a-service.md document to Spanish
* Fix the spelling and translated the English part of the file
* Fixes the spell check failure and update the content/es/software-as-a-service.md

Signed-off-by: Naymul Islam <[email protected]>
Signed-off-by: Naymul Islam <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.