vendor latest c/common main

Includes several rootless-netns fixes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2024-04-02 18:45:45 +02:00
parent 976640474b
commit ce04fbc16a
47 changed files with 661 additions and 267 deletions

View File

@@ -2,6 +2,7 @@ package config
import (
"fmt"
"strings"
)
// PullPolicy determines how and which images are being pulled from a container
@@ -73,14 +74,14 @@ func (p PullPolicy) Validate() error {
// * "newer" <-> PullPolicyNewer (also "ifnewer")
// * "never" <-> PullPolicyNever
func ParsePullPolicy(s string) (PullPolicy, error) {
switch s {
case "always", "Always":
switch strings.ToLower(s) {
case "always":
return PullPolicyAlways, nil
case "missing", "Missing", "ifnotpresent", "IfNotPresent", "":
case "missing", "ifmissing", "ifnotpresent", "":
return PullPolicyMissing, nil
case "newer", "Newer", "ifnewer", "IfNewer":
case "newer", "ifnewer":
return PullPolicyNewer, nil
case "never", "Never":
case "never":
return PullPolicyNever, nil
default:
return PullPolicyUnsupported, fmt.Errorf("unsupported pull policy %q", s)