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

Alert users when using a beta feature (OSFUSE-661) #983

Closed
nicolaferraro opened this issue Jan 11, 2018 · 1 comment
Closed

Alert users when using a beta feature (OSFUSE-661) #983

nicolaferraro opened this issue Jan 11, 2018 · 1 comment
Milestone

Comments

@nicolaferraro
Copy link
Member

Resources in Kubernetes move from beta to GA in different releases. Kubernetes usually maintains old resource endpoints for few releases before removing them.

If a user wants to use e.g. a StatefulSet now, this client library will use the v1beta1 endpoint that works with Kubernetes from 1.6 to 1.9. But in 1.9 StatefulSets are upgraded to v1. Endpoint v1beta1 still works (I guess), but it will be removed in later versions.

When a resource is alpha/beta, model and behavior may also change between releases (StatefulSet are a lot different from their ancestors PetSet).

That said, I think we should alert users when they are using a beta resource, because such resources will certainly change in future releases of Kubernetes (so users may need to upgrade this library in the best case if they upgrade Kubernetes).

I was thinking to two ways to alert them:

  1. Deprecate beta features in the DSL methods, explaining in the deprecation message that they may be removed. This may seem counter-intuitive, since deprecation is usually used for old stuff, but helps the user to understand the risks of using them...
  2. Another option is to display a warning log the first time a user try to access a resource with a alpha or beta version (it should be easier to maintain than 1)

Currently the set of beta features supported contains StatefulSet, ThirdPartyResource, CustomResourceDefinitions, DaemonSet and others...

I would like to know your opinion before going for one of the two..

@oscerd, @iocanel

@oscerd
Copy link
Member

oscerd commented Jan 11, 2018

Personally I would go with the second option, lets wait for other points of view by the way.

@hrishin hrishin added this to the Sprint 144 H milestone Jan 24, 2018
nicolaferraro added a commit to nicolaferraro/kubernetes-client that referenced this issue Feb 15, 2018
nicolaferraro added a commit to nicolaferraro/kubernetes-client that referenced this issue Feb 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants