- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ConvertSelectorToLabelsMap (0.29 sec)
-
staging/src/k8s.io/apimachinery/pkg/labels/labels.go
value, ok := labels2[k] if !ok { return false } if value != v { return false } } return true } // ConvertSelectorToLabelsMap converts selector string to labels map // and validates keys and values func ConvertSelectorToLabelsMap(selector string, opts ...field.PathOption) (Set, error) { labelsMap := Set{} if len(selector) == 0 { return labelsMap, nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 14 16:39:04 UTC 2022 - 4.5K bytes - Viewed (0) -
plugin/pkg/admission/podnodeselector/admission.go
return errors.NewForbidden(resource, pod.Name, fmt.Errorf("pod node label selector conflicts with its namespace node label selector")) } // whitelist verification whitelist, err := labels.ConvertSelectorToLabelsMap(p.clusterNodeSelectors[a.GetNamespace()]) if err != nil { return err } if !isSubset(pod.Spec.NodeSelector, whitelist) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 26 17:14:05 UTC 2022 - 8.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/labels/labels_test.go
valid: false, }, { selector: "x y", labels: map[string]string{}, valid: false, }, } for _, test := range tests { labels, err := ConvertSelectorToLabelsMap(test.selector) if test.valid && err != nil { t.Errorf("selector: %s, expected no error but got: %s", test.selector, err) } else if !test.valid && err == nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 11 14:09:48 UTC 2017 - 5.4K bytes - Viewed (0)