Downgrade Kubernetes vendor version

Multus community decide that multus support the Kubernetes that
Kubernetes community supports, so changed vendor code to the
oldest version of currently supported.
This commit is contained in:
Tomofumi Hayashi
2021-09-16 23:23:45 +09:00
parent e1b0698eb2
commit ae4a28b689
1309 changed files with 8181 additions and 115498 deletions

View File

@@ -30,12 +30,10 @@ import (
)
var (
showHiddenOnce sync.Once
disabledMetricsLock sync.RWMutex
showHidden atomic.Value
registries []*kubeRegistry // stores all registries created by NewKubeRegistry()
registriesLock sync.RWMutex
disabledMetrics = map[string]struct{}{}
showHiddenOnce sync.Once
showHidden atomic.Value
registries []*kubeRegistry // stores all registries created by NewKubeRegistry()
registriesLock sync.RWMutex
)
// shouldHide be used to check if a specific metric with deprecated version should be hidden
@@ -63,12 +61,6 @@ func ValidateShowHiddenMetricsVersion(v string) []error {
return nil
}
func SetDisabledMetric(name string) {
disabledMetricsLock.Lock()
defer disabledMetricsLock.Unlock()
disabledMetrics[name] = struct{}{}
}
// SetShowHidden will enable showing hidden metrics. This will no-opt
// after the initial call
func SetShowHidden() {