- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for PutSelector (0.12 sec)
-
pkg/controller/util/selectors/bimultimap_test.go
t.Errorf("%v %v", tc.name, err) } } }) } } } func TestEfficientAssociation(t *testing.T) { useOnceSelector := useOnce(selector("a", "1")) m := NewBiMultimap() m.PutSelector(key("hpa-1"), useOnceSelector) m.Put(key("pod-1"), labels("a", "1")) // Selector is used only during full scan. Second Put will use // cached association or explode. m.Put(key("pod-2"), labels("a", "1"))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Dec 13 01:56:36 UTC 2022 - 16.9K bytes - Viewed (0) -
pkg/controller/util/selectors/bimultimap.go
m.mux.RLock() defer m.mux.RUnlock() _, exists := m.labeledObjects[key] return exists } // PutSelector inserts or updates an object with a selector. Associations // are created or updated based on the selector. func (m *BiMultimap) PutSelector(key Key, selector pkglabels.Selector) { m.mux.Lock() defer m.mux.Unlock() selectorKey := selectorKey{ key: selector.String(),
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Oct 27 21:41:32 UTC 2023 - 9.6K bytes - Viewed (0) -
pkg/controller/podautoscaler/horizontal.go
// when it's available during the autoscaler reconciliation. a.hpaSelectorsMux.Lock() defer a.hpaSelectorsMux.Unlock() if hpaKey := selectors.Parse(key); !a.hpaSelectors.SelectorExists(hpaKey) { a.hpaSelectors.PutSelector(hpaKey, labels.Nothing()) } } func (a *HorizontalController) deleteHPA(obj interface{}) { key, err := controller.KeyFunc(obj) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 63.6K bytes - Viewed (0) -
pkg/controller/podautoscaler/horizontal_test.go
return true, obj, nil }) tc.runTest(t) } func TestConditionNoAmbiguousSelectorWhenNoSelectorOverlapBetweenHPAs(t *testing.T) { hpaSelectors := selectors.NewBiMultimap() hpaSelectors.PutSelector(selectors.Key{Name: "test-hpa-2", Namespace: testNamespace}, labels.SelectorFromSet(labels.Set{"cheddar": "cheese"})) tc := testCase{ minReplicas: 2, maxReplicas: 6,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 14:24:16 UTC 2024 - 199.3K bytes - Viewed (0)