*: initial update to kube 1.8
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
2453222695
commit
d6e819133d
1237 changed files with 84117 additions and 564982 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