Update dependencies to K8s 1.8
This commit is contained in:
parent
ba6c89672d
commit
6a59f4c9a2
1114 changed files with 160955 additions and 262845 deletions
15
vendor/k8s.io/apimachinery/pkg/runtime/conversion.go
generated
vendored
15
vendor/k8s.io/apimachinery/pkg/runtime/conversion.go
generated
vendored
|
|
@ -19,6 +19,7 @@ limitations under the License.
|
|||
package runtime
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
|
@ -26,6 +27,20 @@ import (
|
|||
"k8s.io/apimachinery/pkg/conversion"
|
||||
)
|
||||
|
||||
// DefaultFieldSelectorConversion auto-accepts metav1 values for name and namespace.
|
||||
// A cluster scoped resource specifying namespace empty works fine and specifying a particular
|
||||
// namespace will return no results, as expected.
|
||||
func DefaultMetaV1FieldSelectorConversion(label, value string) (string, string, error) {
|
||||
switch label {
|
||||
case "metadata.name":
|
||||
return label, value, nil
|
||||
case "metadata.namespace":
|
||||
return label, value, nil
|
||||
default:
|
||||
return "", "", fmt.Errorf("%q is not a known field selector: only %q, %q", label, "metadata.name", "metadata.namespace")
|
||||
}
|
||||
}
|
||||
|
||||
// JSONKeyMapper uses the struct tags on a conversion to determine the key value for
|
||||
// the other side. Use when mapping from a map[string]* to a struct or vice versa.
|
||||
func JSONKeyMapper(key string, sourceTag, destTag reflect.StructTag) (string, string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue