- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for getLabelSelector (0.21 sec)
-
pkg/kube/krt/filter.go
return false } } // Rest is expensive if f.selects != nil && !labels.Instance(getLabelSelector(object)).SubsetOf(f.selects) { if log.DebugEnabled() { log.Debugf("no match selects: %q vs %q", f.selects, getLabelSelector(object)) } return false } if f.selectsNonEmpty != nil && !labels.Instance(getLabelSelector(object)).Match(f.selectsNonEmpty) { if log.DebugEnabled() {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 4.8K bytes - Viewed (0) -
pkg/kube/krt/internal.go
if ok { return ac.Labels } panic(fmt.Sprintf("No Labels, got %T", a)) } // getLabelSelector returns the labels for an object, if possible. // Warning: this will panic if the labelSelectors is not available. func getLabelSelector(a any) map[string]string { ak, ok := a.(LabelSelectorer) if ok { return ak.GetLabelSelector() } val := reflect.ValueOf(a) if val.Kind() == reflect.Ptr { val = val.Elem()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 5.6K bytes - Viewed (0) -
pkg/kube/krt/bench_test.go
) type Workload struct { krt.Named ServiceNames []string IP string } // GetLabelSelector defaults to using Reflection which is slow. Provide a specialized implementation that does it more efficiently. type ServiceWrapper struct{ *v1.Service } func (s ServiceWrapper) GetLabelSelector() map[string]string { return s.Spec.Selector } var _ krt.LabelSelectorer = ServiceWrapper{}
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 09 19:55:53 UTC 2024 - 7K bytes - Viewed (0) -
pkg/kube/krt/core.go
} // LabelSelectorer is an optional interface that can be implemented by collection types. // If implemented, this will be used to determine an objects' LabelSelectors type LabelSelectorer interface { GetLabelSelector() map[string]string } // Labeler is an optional interface that can be implemented by collection types. // If implemented, this will be used to determine an objects' Labels type Labeler interface {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 6.9K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/ambient/workloads.go
wa := a.(model.WorkloadAuthorization) nsMatch := wa.Authorization.Namespace == meshCfg.RootNamespace || wa.Authorization.Namespace == workloadNamespace return nsMatch && wa.GetLabelSelector() != nil })) policies := slices.Sort(slices.Map(basePolicies, func(t model.WorkloadAuthorization) string { return t.ResourceName() }))
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 13 16:51:29 UTC 2024 - 20.9K bytes - Viewed (0) -
pilot/pkg/model/service.go
} type LabelSelector struct { Labels map[string]string } func NewSelector(l map[string]string) LabelSelector { return LabelSelector{l} } func (l LabelSelector) GetLabelSelector() map[string]string { return l.Labels } func ExtractWorkloadsFromAddresses(addrs []AddressInfo) []WorkloadInfo { return slices.MapFilter(addrs, func(a AddressInfo) *WorkloadInfo {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 29 02:03:58 UTC 2024 - 46.3K bytes - Viewed (0)