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

Support turning on alpha features using feature gates #896

Closed
yujuhong opened this issue Dec 7, 2016 · 14 comments
Closed

Support turning on alpha features using feature gates #896

yujuhong opened this issue Dec 7, 2016 · 14 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@yujuhong
Copy link

yujuhong commented Dec 7, 2016

minikube already supports all alpha api resources to encourage people to try them out. It should also support turning on alpha features in the feature gate.
https://github.com/kubernetes/kubernetes/blob/v1.5.0-beta.2/pkg/genericapiserver/options/server_run_options.go#L531
https://github.com/kubernetes/kubernetes/blob/v1.5.0-beta.2/pkg/util/config/feature_gate.go

@r2d4 r2d4 added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 7, 2016
@yujuhong
Copy link
Author

yujuhong commented Dec 7, 2016

/cc @kubernetes/sig-node @timstclair , we can't turn on CRI in minikube without it supporting the feature gates.

@feiskyer
Copy link
Member

feiskyer commented Dec 8, 2016

+1

@timstclair
Copy link

/cc @jlowdermilk

@r2d4
Copy link
Contributor

r2d4 commented Dec 8, 2016

We can already enable this with the --extra-config flag but I'm open to making it easier to enable though a different way

@yujuhong
Copy link
Author

yujuhong commented Dec 8, 2016

@r2d4 I was not able to enable feature gate using --extra-config at all. I skimmed the code and it seems to me that feature gates were directly set through flags, and not included in ServerRunOptions. Could you provide an example of how this could be done?

@dlorenc
Copy link
Contributor

dlorenc commented Dec 8, 2016

Yeah, we might need to add some code to make featuregate's work. I'll look through the code now.

@r2d4
Copy link
Contributor

r2d4 commented Dec 9, 2016

Sorry, it looks like you can't enable them through the config. How can I validate that these are actually enabled? Would something like this work?

diff --git a/pkg/localkube/servers.go b/pkg/localkube/servers.go
index 251c8ff..b812bb7 100644
--- a/pkg/localkube/servers.go
+++ b/pkg/localkube/servers.go
@@ -18,6 +18,7 @@ package localkube
 
 import (
        "fmt"
+       "k8s.io/kubernetes/pkg/util/config"
 )
 
 // Servers allows operations to be performed on many servers at once.
@@ -36,6 +37,7 @@ func (servers Servers) Get(name string) (Server, error) {
 
 // StartAll starts all services, starting from 0th item and ascending.
 func (servers Servers) StartAll() {
+       config.DefaultFeatureGate.Set("AllAlpha=true")
        for _, server := range servers {
                fmt.Printf("Starting %s...\n", server.Name())
                server.Start()
$ minikube logs | grep feature
I1208 23:29:29.585829    3084 feature_gate.go:161] feature gates: map[AllAlpha:true DynamicKubeletConfig:true DynamicVolumeProvisioning:true AllowExtTrafficLocalEndpoints:true]

@j3ffml
Copy link

j3ffml commented Dec 9, 2016

@r2d4 I'm not super familiar with minikube, but if you want to always enable alpha features the above snippet will work. You would need similar line in every kube system binary (kublet, apiserver, controller manager, scheduler etc). featuregates are set via a flag (with same value) on every system component if you are deploying k8s normally.

@yujuhong
Copy link
Author

yujuhong commented Dec 9, 2016

@r2d4 this should work since localkube is a single binary and all components are started in one process.

@r2d4
Copy link
Contributor

r2d4 commented Dec 9, 2016

Any thoughts on the UI to configure this through minikube?
minikube start --feature-gates?

I don't think it makes much sense to do it as a special case of the extra config, but that wouldn't require an extra flag
minikube start --extra-config=global.feature-gates=

@r2d4 r2d4 self-assigned this Dec 9, 2016
@dlorenc
Copy link
Contributor

dlorenc commented Dec 9, 2016

Is there any downside to enabling them all, all the time?

@yujuhong
Copy link
Author

yujuhong commented Dec 9, 2016

Is there any downside to enabling them all, all the time?

One downside could be that the alpha features don't work well together. There is one jenkins build that enabling all of them (https://k8s-testgrid.appspot.com/google-gce#gce-alpha-features), but it runs very few tests.

@yujuhong
Copy link
Author

yujuhong commented Dec 9, 2016

minikube start --feature-gates?

This sounds good to me.

r2d4 added a commit to r2d4/minikube that referenced this issue Jan 9, 2017
This sets the feature gates on every kube-system component (apiserver,
kubelet, etc.)

Fixes kubernetes#896
r2d4 added a commit to r2d4/minikube that referenced this issue Jan 9, 2017
This sets the feature gates on every kube-system component (apiserver,
kubelet, etc.)

Fixes kubernetes#896
@r2d4 r2d4 closed this as completed in #977 Jan 10, 2017
@yujuhong
Copy link
Author

@r2d4 thanks for adding the feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

6 participants