File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,12 @@ import (
44 "context"
55
66 "github.com/spf13/cobra"
7+ "k8s.io/apimachinery/pkg/util/runtime"
8+ genericfeatures "k8s.io/apiserver/pkg/features"
79 utilfeature "k8s.io/apiserver/pkg/util/feature"
810 cliflag "k8s.io/component-base/cli/flag"
911 "k8s.io/component-base/cli/globalflag"
12+ "k8s.io/component-base/featuregate"
1013 "k8s.io/component-base/term"
1114
1215 "github.com/clusterpedia-io/clusterpedia/cmd/apiserver/app/options"
@@ -60,3 +63,16 @@ func NewClusterPediaServerCommand(ctx context.Context) *cobra.Command {
6063 cliflag .SetUsageAndHelpFunc (cmd , namedFlagSets , cols )
6164 return cmd
6265}
66+
67+ func init () {
68+ // The feature gate `RemainingItemCount` should default to false
69+ // https://github.com/clusterpedia-io/clusterpedia/issues/196
70+ gates := utilfeature .DefaultMutableFeatureGate .GetAll ()
71+ gate := gates [genericfeatures .RemainingItemCount ]
72+ gate .Default = false
73+ gates [genericfeatures .RemainingItemCount ] = gate
74+
75+ utilfeature .DefaultMutableFeatureGate = featuregate .NewFeatureGate ()
76+ runtime .Must (utilfeature .DefaultMutableFeatureGate .Add (gates ))
77+ utilfeature .DefaultFeatureGate = utilfeature .DefaultMutableFeatureGate
78+ }
You can’t perform that action at this time.
0 commit comments