Upgrade k8s package verison (#5358)
* upgrade k8s package version Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io> * Script upgrade and code formatting. Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io> Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>
This commit is contained in:
16
vendor/k8s.io/component-base/featuregate/OWNERS
generated
vendored
Normal file
16
vendor/k8s.io/component-base/featuregate/OWNERS
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# See the OWNERS docs at https://go.k8s.io/owners
|
||||
|
||||
# Currently assigned to api-approvers since feature gates are the API
|
||||
# for enabling/disabling other APIs.
|
||||
|
||||
# Disable inheritance as this is an api owners file
|
||||
options:
|
||||
no_parent_owners: true
|
||||
approvers:
|
||||
- api-approvers
|
||||
reviewers:
|
||||
- api-reviewers
|
||||
labels:
|
||||
- kind/api-change
|
||||
- sig/api-machinery
|
||||
- sig/cluster-lifecycle
|
||||
11
vendor/k8s.io/component-base/featuregate/feature_gate.go
generated
vendored
11
vendor/k8s.io/component-base/featuregate/feature_gate.go
generated
vendored
@@ -109,6 +109,8 @@ type MutableFeatureGate interface {
|
||||
SetFromMap(m map[string]bool) error
|
||||
// Add adds features to the featureGate.
|
||||
Add(features map[Feature]FeatureSpec) error
|
||||
// GetAll returns a copy of the map of known feature names to feature specs.
|
||||
GetAll() map[Feature]FeatureSpec
|
||||
}
|
||||
|
||||
// featureGate implements FeatureGate as well as pflag.Value for flag parsing.
|
||||
@@ -290,6 +292,15 @@ func (f *featureGate) Add(features map[Feature]FeatureSpec) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetAll returns a copy of the map of known feature names to feature specs.
|
||||
func (f *featureGate) GetAll() map[Feature]FeatureSpec {
|
||||
retval := map[Feature]FeatureSpec{}
|
||||
for k, v := range f.known.Load().(map[Feature]FeatureSpec) {
|
||||
retval[k] = v
|
||||
}
|
||||
return retval
|
||||
}
|
||||
|
||||
// Enabled returns true if the key is enabled. If the key is not known, this call will panic.
|
||||
func (f *featureGate) Enabled(key Feature) bool {
|
||||
if v, ok := f.enabled.Load().(map[Feature]bool)[key]; ok {
|
||||
|
||||
Reference in New Issue
Block a user