- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,117 for AsSelector (0.15 sec)
-
pkg/client/tests/listwatch_test.go
restclient "k8s.io/client-go/rest" . "k8s.io/client-go/tools/cache" utiltesting "k8s.io/client-go/util/testing" ) func parseSelectorOrDie(s string) fields.Selector { selector, err := fields.ParseSelector(s) if err != nil { panic(err) } return selector } // buildQueryValues is a convenience function for knowing if a namespace should be in a query param or not func buildQueryValues(query url.Values) url.Values {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 02 17:08:23 UTC 2022 - 5.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/fields/fields.go
// Conveniently, exactly the format that ParseSelector takes. func (ls Set) String() string { selector := make([]string, 0, len(ls)) for key, value := range ls { selector = append(selector, key+"="+value) } // Sort for determinism. sort.StringSlice(selector).Sort() return strings.Join(selector, ",") } // Has returns whether the provided field exists in the map. func (ls Set) Has(field string) bool {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jan 19 14:50:16 UTC 2017 - 1.7K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/helper/spread.go
labelSet = labels.Merge(labelSet, rc.Spec.Selector) selector = labelSet.AsSelector() } case rsKind: if rs, err := rsl.ReplicaSets(pod.Namespace).Get(owner.Name); err == nil { if other, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector); err == nil { if r, ok := other.Requirements(); ok { selector = selector.Add(r...) } } } case ssKind:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 25 20:04:48 UTC 2021 - 3.4K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/labels/labels.go
// Conveniently, exactly the format that ParseSelector takes. func (ls Set) String() string { selector := make([]string, 0, len(ls)) for key, value := range ls { selector = append(selector, key+"="+value) } // Sort for determinism. sort.StringSlice(selector).Sort() return strings.Join(selector, ",") } // Has returns whether the provided label exists in the map. func (ls Set) Has(label string) bool {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 14 16:39:04 UTC 2022 - 4.5K bytes - Viewed (0) -
pilot/pkg/status/distribution/state.go
informers.WithNamespace(namespace), informers.WithTweakListOptions(func(listOptions *metav1.ListOptions) { listOptions.LabelSelector = labels.Set(map[string]string{labelKey: "true"}).AsSelector().String() })). Core().V1().ConfigMaps() c.cmInformer = i.Informer() c.cmHandle, _ = c.cmInformer.AddEventHandler(&DistroReportHandler{dc: c}) return c }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 7.7K bytes - Viewed (0) -
pkg/registry/core/node/strategy_test.go
{"metadata.name": "foo"}, }, false: { {"foo": "bar"}, }, } for expectedResult, fieldSet := range testFieldMap { for _, field := range fieldSet { m := MatchNode(labels.Everything(), field.AsSelector()) _, matchesSingle := m.MatchesSingle() if e, a := expectedResult, matchesSingle; e != a { t.Errorf("%+v: expected %v, got %v", fieldSet, e, a) } } } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:48:03 UTC 2023 - 9.7K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/resource/selector.go
"k8s.io/apimachinery/pkg/watch" ) // Selector is a Visitor for resources that match a label selector. type Selector struct { Client RESTClient Mapping *meta.RESTMapping Namespace string LabelSelector string FieldSelector string LimitChunks int64 } // NewSelector creates a resource selector which hides details of getting items by their label selector.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 12 15:08:01 UTC 2021 - 2.8K bytes - Viewed (0) -
pkg/config/analysis/analyzers/telemetry/selector.go
// Using an index for selectoes is problematic because selector != label // We can match a label to a selector, but we can't generate a selector from a label. c.ForEach(gvk.Telemetry, func(rs *resource.Instance) bool { s := rs.Message.(*v1alpha1.Telemetry) // For this analysis, ignore Telemetries with no selectors specified at all. if s.Selector == nil || len(s.GetSelector().MatchLabels) == 0 { return true }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun May 05 03:44:57 UTC 2024 - 3.4K bytes - Viewed (0) -
pkg/config/analysis/analyzers/sidecar/selector.go
"istio.io/istio/pkg/config/analysis/msg" "istio.io/istio/pkg/config/resource" "istio.io/istio/pkg/config/schema/gvk" ) // SelectorAnalyzer validates, per namespace, that: // * sidecar resources that define a workload selector match at least one pod // * there aren't multiple sidecar resources that select overlapping pods type SelectorAnalyzer struct{} var _ analysis.Analyzer = &SelectorAnalyzer{} // Metadata implements Analyzer
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun May 05 03:44:57 UTC 2024 - 5K bytes - Viewed (0) -
pilot/pkg/serviceregistry/util/workloadinstances/selector.go
) // ByServiceSelector returns a predicate that matches workload instances // of a given service. func ByServiceSelector(namespace string, selector labels.Instance) func(*model.WorkloadInstance) bool { return func(wi *model.WorkloadInstance) bool { return wi.Namespace == namespace && selector.Match(wi.Endpoint.Labels) } } // FindAllInIndex returns a list of workload instances in the index // that match given predicate. //
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Apr 07 04:26:56 UTC 2023 - 1.4K bytes - Viewed (0)