summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/apimachinery/pkg/labels/labels.go
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2020-08-27 08:22:37 +0000
committerDaniel J Walsh <dwalsh@redhat.com>2020-08-28 05:45:35 -0400
commit90a86cad3a6f007c6708406d8a78528fbb302a0a (patch)
tree4c6546079346d0ff39f7c9a4d076913457a6a417 /vendor/k8s.io/apimachinery/pkg/labels/labels.go
parentd6b13d8a0993aced5e227e7a516aadbf37e14dbc (diff)
downloadpodman-90a86cad3a6f007c6708406d8a78528fbb302a0a.tar.gz
podman-90a86cad3a6f007c6708406d8a78528fbb302a0a.tar.bz2
podman-90a86cad3a6f007c6708406d8a78528fbb302a0a.zip
Bump k8s.io/apimachinery from 0.18.8 to 0.19.0
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.18.8 to 0.19.0. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.18.8...v0.19.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/k8s.io/apimachinery/pkg/labels/labels.go')
-rw-r--r--vendor/k8s.io/apimachinery/pkg/labels/labels.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/vendor/k8s.io/apimachinery/pkg/labels/labels.go b/vendor/k8s.io/apimachinery/pkg/labels/labels.go
index abf3ace6f..d9eeb4f91 100644
--- a/vendor/k8s.io/apimachinery/pkg/labels/labels.go
+++ b/vendor/k8s.io/apimachinery/pkg/labels/labels.go
@@ -57,14 +57,22 @@ func (ls Set) Get(label string) string {
return ls[label]
}
-// AsSelector converts labels into a selectors.
+// AsSelector converts labels into a selectors. It does not
+// perform any validation, which means the server will reject
+// the request if the Set contains invalid values.
func (ls Set) AsSelector() Selector {
return SelectorFromSet(ls)
}
+// AsValidatedSelector converts labels into a selectors.
+// The Set is validated client-side, which allows to catch errors early.
+func (ls Set) AsValidatedSelector() (Selector, error) {
+ return ValidatedSelectorFromSet(ls)
+}
+
// AsSelectorPreValidated converts labels into a selector, but
-// assumes that labels are already validated and thus don't
-// preform any validation.
+// assumes that labels are already validated and thus doesn't
+// perform any validation.
// According to our measurements this is significantly faster
// in codepaths that matter at high scale.
func (ls Set) AsSelectorPreValidated() Selector {