mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-07 02:07:58 +00:00
vendor: revendor
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
This commit is contained in:
parent
61a30408f6
commit
78eec11706
14 changed files with 136 additions and 67 deletions
17
vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go
generated
vendored
17
vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go
generated
vendored
|
|
@ -34,6 +34,7 @@ import (
|
|||
"k8s.io/apimachinery/pkg/labels"
|
||||
apitypes "k8s.io/apimachinery/pkg/types"
|
||||
apierrors "k8s.io/apimachinery/pkg/util/errors"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
fcboot "k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap"
|
||||
"k8s.io/apiserver/pkg/authentication/user"
|
||||
|
|
@ -244,14 +245,28 @@ func (cfgCtlr *configController) updateObservations() {
|
|||
}
|
||||
}
|
||||
|
||||
// used from the unit tests only.
|
||||
func (cfgCtlr *configController) getPriorityLevelState(plName string) *priorityLevelState {
|
||||
cfgCtlr.lock.Lock()
|
||||
defer cfgCtlr.lock.Unlock()
|
||||
return cfgCtlr.priorityLevelStates[plName]
|
||||
}
|
||||
|
||||
func (cfgCtlr *configController) Run(stopCh <-chan struct{}) error {
|
||||
defer utilruntime.HandleCrash()
|
||||
|
||||
// Let the config worker stop when we are done
|
||||
defer cfgCtlr.configQueue.ShutDown()
|
||||
|
||||
klog.Info("Starting API Priority and Fairness config controller")
|
||||
if ok := cache.WaitForCacheSync(stopCh, cfgCtlr.plInformerSynced, cfgCtlr.fsInformerSynced); !ok {
|
||||
return fmt.Errorf("Never achieved initial sync")
|
||||
}
|
||||
|
||||
klog.Info("Running API Priority and Fairness config worker")
|
||||
wait.Until(cfgCtlr.runWorker, time.Second, stopCh)
|
||||
go wait.Until(cfgCtlr.runWorker, time.Second, stopCh)
|
||||
|
||||
<-stopCh
|
||||
klog.Info("Shutting down API Priority and Fairness config worker")
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue