rebase: update kubernetes to 1.26.1

update kubernetes and its dependencies
to v1.26.1

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2023-02-01 18:06:36 +01:00
committed by mergify[bot]
parent e9e33fb851
commit 9c8de9471e
937 changed files with 75539 additions and 33050 deletions

View File

@ -17,6 +17,7 @@ limitations under the License.
package featuregate
import (
"context"
"fmt"
"sort"
"strconv"
@ -27,6 +28,7 @@ import (
"github.com/spf13/pflag"
"k8s.io/apimachinery/pkg/util/naming"
featuremetrics "k8s.io/component-base/metrics/prometheus/feature"
"k8s.io/klog/v2"
)
@ -111,6 +113,8 @@ type MutableFeatureGate interface {
Add(features map[Feature]FeatureSpec) error
// GetAll returns a copy of the map of known feature names to feature specs.
GetAll() map[Feature]FeatureSpec
// AddMetrics adds feature enablement metrics
AddMetrics()
}
// featureGate implements FeatureGate as well as pflag.Value for flag parsing.
@ -329,6 +333,12 @@ func (f *featureGate) AddFlag(fs *pflag.FlagSet) {
"Options are:\n"+strings.Join(known, "\n"))
}
func (f *featureGate) AddMetrics() {
for feature, featureSpec := range f.GetAll() {
featuremetrics.RecordFeatureInfo(context.Background(), string(feature), string(featureSpec.PreRelease), f.Enabled(feature))
}
}
// KnownFeatures returns a slice of strings describing the FeatureGate's known features.
// Deprecated and GA features are hidden from the list.
func (f *featureGate) KnownFeatures() []string {