mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
Add service-feature-gates argument to node_e2e
This separates the "service-feature-gates" argument from the "feature-gates" to set feature gates of API service independently.
This commit is contained in:
parent
921dfed168
commit
cdf501f77b
@ -69,6 +69,9 @@ var (
|
|||||||
e2es *services.E2EServices
|
e2es *services.E2EServices
|
||||||
// featureGates is a map of feature names to bools that enable or disable alpha/experimental features.
|
// featureGates is a map of feature names to bools that enable or disable alpha/experimental features.
|
||||||
featureGates map[string]bool
|
featureGates map[string]bool
|
||||||
|
// serviceFeatureGates is a map of feature names to bools that enable or
|
||||||
|
// disable alpha/experimental features for API service.
|
||||||
|
serviceFeatureGates map[string]bool
|
||||||
|
|
||||||
// TODO(random-liu): Change the following modes to sub-command.
|
// TODO(random-liu): Change the following modes to sub-command.
|
||||||
runServicesMode = flag.Bool("run-services-mode", false, "If true, only run services (etcd, apiserver) in current process, and not run test.")
|
runServicesMode = flag.Bool("run-services-mode", false, "If true, only run services (etcd, apiserver) in current process, and not run test.")
|
||||||
@ -100,6 +103,7 @@ func registerNodeFlags(flags *flag.FlagSet) {
|
|||||||
flag.Var(cliflag.NewMapStringString(&framework.TestContext.RuntimeConfig), "runtime-config", "The runtime configuration used on node e2e tests.")
|
flag.Var(cliflag.NewMapStringString(&framework.TestContext.RuntimeConfig), "runtime-config", "The runtime configuration used on node e2e tests.")
|
||||||
flags.BoolVar(&framework.TestContext.RequireDevices, "require-devices", false, "If true, require device plugins to be installed in the running environment.")
|
flags.BoolVar(&framework.TestContext.RequireDevices, "require-devices", false, "If true, require device plugins to be installed in the running environment.")
|
||||||
flags.Var(cliflag.NewMapStringBool(&featureGates), "feature-gates", "A set of key=value pairs that describe feature gates for alpha/experimental features.")
|
flags.Var(cliflag.NewMapStringBool(&featureGates), "feature-gates", "A set of key=value pairs that describe feature gates for alpha/experimental features.")
|
||||||
|
flags.Var(cliflag.NewMapStringBool(&serviceFeatureGates), "service-feature-gates", "A set of key=value pairs that describe feature gates for alpha/experimental features for API service.")
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -131,8 +135,8 @@ func TestMain(m *testing.M) {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := services.SetFeatureGatesForInProcessComponents(featureGates); err != nil {
|
if err := services.SetFeatureGatesForInProcessComponents(serviceFeatureGates); err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "ERROR: initialize process feature gates: %v", err)
|
fmt.Fprintf(os.Stderr, "ERROR: initialize process feature gates for API service: %v", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user