mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
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:
committed by
mergify[bot]
parent
e9e33fb851
commit
9c8de9471e
10
vendor/k8s.io/component-base/featuregate/feature_gate.go
generated
vendored
10
vendor/k8s.io/component-base/featuregate/feature_gate.go
generated
vendored
@ -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 {
|
||||
|
Reference in New Issue
Block a user