published by bot

(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is a2b65f03bf83013d1af05c99b7aa22049ca63de3
This commit is contained in:
Kubernetes Publisher 2017-01-31 15:19:42 +00:00
parent a88e2b8a0e
commit b766ef93a4
35 changed files with 295 additions and 803 deletions

86
Godeps/Godeps.json generated
View File

@ -324,151 +324,163 @@
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/openapi",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/rand",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "02fccf9462f0fb0287e82cb8a0f1d03b05f8d704"
"Rev": "e0f5fdb097647ab1d282af70228f0a742cf61c65"
}
]
}

View File

@ -51,20 +51,21 @@ func init() {
}
var fileDescriptorGenerated = []byte{
// 236 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x8f, 0xa1, 0x4e, 0x03, 0x41,
0x10, 0x86, 0x67, 0x0d, 0x29, 0x27, 0x1b, 0x42, 0x48, 0xc5, 0x5e, 0x53, 0x45, 0x48, 0xd8, 0x09,
0xa8, 0x06, 0xc9, 0x1b, 0x80, 0xc4, 0xdd, 0x95, 0x61, 0x99, 0x1c, 0xec, 0x6e, 0x76, 0x67, 0x05,
0xae, 0x12, 0x59, 0x89, 0xec, 0xbd, 0x4d, 0x65, 0x25, 0x02, 0xc1, 0x1d, 0x2f, 0x42, 0x72, 0xa5,
0x21, 0x21, 0xb8, 0xf9, 0xc4, 0x37, 0xf9, 0xfe, 0xe2, 0xb2, 0x99, 0x27, 0xc3, 0x1e, 0x9b, 0x5c,
0x53, 0x74, 0x24, 0x94, 0x30, 0x34, 0x16, 0xab, 0xc0, 0x18, 0x29, 0xf9, 0x1c, 0x17, 0x84, 0x96,
0x1c, 0xc5, 0x4a, 0xe8, 0xde, 0x84, 0xe8, 0xc5, 0x8f, 0x67, 0x3b, 0xc7, 0xfc, 0x3a, 0x26, 0x34,
0xd6, 0x54, 0x81, 0xcd, 0xde, 0x99, 0x9c, 0x5b, 0x96, 0xc7, 0x5c, 0x9b, 0x85, 0x7f, 0x46, 0xeb,
0xad, 0xc7, 0x41, 0xad, 0xf3, 0xc3, 0x40, 0x03, 0x0c, 0xd7, 0xee, 0xe5, 0xe4, 0xe2, 0xff, 0x8c,
0x2c, 0xfc, 0x84, 0xec, 0x24, 0x49, 0xfc, 0x5b, 0x31, 0x9b, 0x17, 0xa3, 0x9b, 0x5c, 0x39, 0x61,
0x79, 0x19, 0x1f, 0x17, 0x07, 0x49, 0x22, 0x3b, 0x7b, 0xa2, 0xa6, 0xea, 0xf4, 0xf0, 0xf6, 0x87,
0xae, 0x8e, 0xde, 0xd6, 0x25, 0xbc, 0xb6, 0x25, 0xac, 0xda, 0x12, 0xd6, 0x6d, 0x09, 0xcb, 0x8f,
0x29, 0x5c, 0x9f, 0x6d, 0x3a, 0x0d, 0xdb, 0x4e, 0xc3, 0x7b, 0xa7, 0x61, 0xd9, 0x6b, 0xb5, 0xe9,
0xb5, 0xda, 0xf6, 0x5a, 0x7d, 0xf6, 0x5a, 0xad, 0xbe, 0x34, 0xdc, 0x8d, 0xf6, 0x3b, 0xbe, 0x03,
0x00, 0x00, 0xff, 0xff, 0x90, 0x1c, 0x7f, 0xff, 0x20, 0x01, 0x00, 0x00,
// 245 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x5c, 0x8f, 0xb1, 0x4e, 0xc3, 0x30,
0x10, 0x86, 0xed, 0x05, 0x95, 0x8c, 0x15, 0x42, 0xa8, 0x83, 0x53, 0x75, 0x42, 0x48, 0xd8, 0x12,
0x2c, 0x15, 0x23, 0x6f, 0x00, 0x23, 0x9b, 0x13, 0x0e, 0xf7, 0x14, 0x6a, 0x5b, 0xf6, 0x79, 0xe8,
0xd6, 0x91, 0xb1, 0x23, 0x63, 0xf3, 0x36, 0x1d, 0x3b, 0x32, 0x30, 0x90, 0xf0, 0x22, 0x48, 0x6e,
0x23, 0xa4, 0x6e, 0xf7, 0x0d, 0xdf, 0xe9, 0xfb, 0x8b, 0xbb, 0x66, 0x1e, 0x25, 0x3a, 0xd5, 0xa4,
0x0a, 0x82, 0x05, 0x82, 0xa8, 0x7c, 0x63, 0x94, 0xf6, 0xa8, 0x02, 0x44, 0x97, 0x42, 0x0d, 0xca,
0x80, 0x85, 0xa0, 0x09, 0x5e, 0xa5, 0x0f, 0x8e, 0xdc, 0x78, 0x76, 0x70, 0xe4, 0xbf, 0x23, 0x7d,
0x63, 0xa4, 0xf6, 0x28, 0x07, 0x67, 0x72, 0x6b, 0x90, 0x16, 0xa9, 0x92, 0xb5, 0x5b, 0x2a, 0xe3,
0x8c, 0x53, 0x59, 0xad, 0xd2, 0x5b, 0xa6, 0x0c, 0xf9, 0x3a, 0xbc, 0x9c, 0xdc, 0x1f, 0x33, 0xb4,
0xc7, 0xa5, 0xae, 0x17, 0x68, 0x21, 0xac, 0x72, 0x48, 0x22, 0x7c, 0x57, 0x68, 0x29, 0x52, 0x38,
0xed, 0x98, 0xcd, 0x8b, 0xd1, 0x53, 0xd2, 0x96, 0x90, 0x56, 0xe3, 0xcb, 0xe2, 0x2c, 0x52, 0x40,
0x6b, 0xae, 0xf8, 0x94, 0x5f, 0x9f, 0x3f, 0x1f, 0xe9, 0xe1, 0xe2, 0x73, 0x5b, 0xb2, 0x8f, 0xb6,
0x64, 0x9b, 0xb6, 0x64, 0xdb, 0xb6, 0x64, 0xeb, 0xef, 0x29, 0x7b, 0xbc, 0xd9, 0x75, 0x82, 0xed,
0x3b, 0xc1, 0xbe, 0x3a, 0xc1, 0xd6, 0xbd, 0xe0, 0xbb, 0x5e, 0xf0, 0x7d, 0x2f, 0xf8, 0x4f, 0x2f,
0xf8, 0xe6, 0x57, 0xb0, 0x97, 0xd1, 0xb0, 0xe4, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x55, 0x28, 0xd5,
0x78, 0x22, 0x01, 0x00, 0x00,
}

View File

@ -21,7 +21,7 @@ syntax = 'proto2';
package k8s.io.kubernetes.pkg.api.resource;
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "resource";

View File

@ -30,9 +30,9 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/third_party/forked/golang/netutil"
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/pkg/util/httpstream"
"k8s.io/client-go/third_party/forked/golang/netutil"
)
// SpdyRoundTripper knows how to upgrade an HTTP request to one that supports

View File

@ -1,79 +0,0 @@
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package util
// A simple trie implementation with Add an HasPrefix methods only.
type Trie struct {
children map[byte]*Trie
wordTail bool
word string
}
// CreateTrie creates a Trie and add all strings in the provided list to it.
func CreateTrie(list []string) Trie {
ret := Trie{
children: make(map[byte]*Trie),
wordTail: false,
}
for _, v := range list {
ret.Add(v)
}
return ret
}
// Add adds a word to this trie
func (t *Trie) Add(v string) {
root := t
for _, b := range []byte(v) {
child, exists := root.children[b]
if !exists {
child = &Trie{
children: make(map[byte]*Trie),
wordTail: false,
}
root.children[b] = child
}
root = child
}
root.wordTail = true
root.word = v
}
// HasPrefix returns true of v has any of the prefixes stored in this trie.
func (t *Trie) HasPrefix(v string) bool {
_, has := t.GetPrefix(v)
return has
}
// GetPrefix is like HasPrefix but return the prefix in case of match or empty string otherwise.
func (t *Trie) GetPrefix(v string) (string, bool) {
root := t
if root.wordTail {
return root.word, true
}
for _, b := range []byte(v) {
child, exists := root.children[b]
if !exists {
return "", false
}
if child.wordTail {
return child.word, true
}
root = child
}
return "", false
}

View File

@ -1,501 +0,0 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package json is forked from the Go standard library to enable us to find the
// field of a struct that a given JSON key maps to.
package json
import (
"bytes"
"fmt"
"reflect"
"sort"
"strings"
"sync"
"unicode"
"unicode/utf8"
)
// Finds the patchStrategy and patchMergeKey struct tag fields on a given
// struct field given the struct type and the JSON name of the field.
// TODO: fix the returned errors to be introspectable.
func LookupPatchMetadata(t reflect.Type, jsonField string) (reflect.Type, string, string, error) {
if t.Kind() == reflect.Map {
return t.Elem(), "", "", nil
}
if t.Kind() != reflect.Struct {
return nil, "", "", fmt.Errorf("merging an object in json but data type is not map or struct, instead is: %s",
t.Kind().String())
}
jf := []byte(jsonField)
// Find the field that the JSON library would use.
var f *field
fields := cachedTypeFields(t)
for i := range fields {
ff := &fields[i]
if bytes.Equal(ff.nameBytes, jf) {
f = ff
break
}
// Do case-insensitive comparison.
if f == nil && ff.equalFold(ff.nameBytes, jf) {
f = ff
}
}
if f != nil {
// Find the reflect.Value of the most preferential struct field.
tjf := t.Field(f.index[0])
// we must navigate down all the anonymously included structs in the chain
for i := 1; i < len(f.index); i++ {
tjf = tjf.Type.Field(f.index[i])
}
patchStrategy := tjf.Tag.Get("patchStrategy")
patchMergeKey := tjf.Tag.Get("patchMergeKey")
return tjf.Type, patchStrategy, patchMergeKey, nil
}
return nil, "", "", fmt.Errorf("unable to find api field in struct %s for the json field %q", t.Name(), jsonField)
}
// A field represents a single field found in a struct.
type field struct {
name string
nameBytes []byte // []byte(name)
equalFold func(s, t []byte) bool // bytes.EqualFold or equivalent
tag bool
// index is the sequence of indexes from the containing type fields to this field.
// it is a slice because anonymous structs will need multiple navigation steps to correctly
// resolve the proper fields
index []int
typ reflect.Type
omitEmpty bool
quoted bool
}
func (f field) String() string {
return fmt.Sprintf("{name: %s, type: %v, tag: %v, index: %v, omitEmpty: %v, quoted: %v}", f.name, f.typ, f.tag, f.index, f.omitEmpty, f.quoted)
}
func fillField(f field) field {
f.nameBytes = []byte(f.name)
f.equalFold = foldFunc(f.nameBytes)
return f
}
// byName sorts field by name, breaking ties with depth,
// then breaking ties with "name came from json tag", then
// breaking ties with index sequence.
type byName []field
func (x byName) Len() int { return len(x) }
func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
func (x byName) Less(i, j int) bool {
if x[i].name != x[j].name {
return x[i].name < x[j].name
}
if len(x[i].index) != len(x[j].index) {
return len(x[i].index) < len(x[j].index)
}
if x[i].tag != x[j].tag {
return x[i].tag
}
return byIndex(x).Less(i, j)
}
// byIndex sorts field by index sequence.
type byIndex []field
func (x byIndex) Len() int { return len(x) }
func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
func (x byIndex) Less(i, j int) bool {
for k, xik := range x[i].index {
if k >= len(x[j].index) {
return false
}
if xik != x[j].index[k] {
return xik < x[j].index[k]
}
}
return len(x[i].index) < len(x[j].index)
}
// typeFields returns a list of fields that JSON should recognize for the given type.
// The algorithm is breadth-first search over the set of structs to include - the top struct
// and then any reachable anonymous structs.
func typeFields(t reflect.Type) []field {
// Anonymous fields to explore at the current level and the next.
current := []field{}
next := []field{{typ: t}}
// Count of queued names for current level and the next.
count := map[reflect.Type]int{}
nextCount := map[reflect.Type]int{}
// Types already visited at an earlier level.
visited := map[reflect.Type]bool{}
// Fields found.
var fields []field
for len(next) > 0 {
current, next = next, current[:0]
count, nextCount = nextCount, map[reflect.Type]int{}
for _, f := range current {
if visited[f.typ] {
continue
}
visited[f.typ] = true
// Scan f.typ for fields to include.
for i := 0; i < f.typ.NumField(); i++ {
sf := f.typ.Field(i)
if sf.PkgPath != "" { // unexported
continue
}
tag := sf.Tag.Get("json")
if tag == "-" {
continue
}
name, opts := parseTag(tag)
if !isValidTag(name) {
name = ""
}
index := make([]int, len(f.index)+1)
copy(index, f.index)
index[len(f.index)] = i
ft := sf.Type
if ft.Name() == "" && ft.Kind() == reflect.Ptr {
// Follow pointer.
ft = ft.Elem()
}
// Record found field and index sequence.
if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct {
tagged := name != ""
if name == "" {
name = sf.Name
}
fields = append(fields, fillField(field{
name: name,
tag: tagged,
index: index,
typ: ft,
omitEmpty: opts.Contains("omitempty"),
quoted: opts.Contains("string"),
}))
if count[f.typ] > 1 {
// If there were multiple instances, add a second,
// so that the annihilation code will see a duplicate.
// It only cares about the distinction between 1 or 2,
// so don't bother generating any more copies.
fields = append(fields, fields[len(fields)-1])
}
continue
}
// Record new anonymous struct to explore in next round.
nextCount[ft]++
if nextCount[ft] == 1 {
next = append(next, fillField(field{name: ft.Name(), index: index, typ: ft}))
}
}
}
}
sort.Sort(byName(fields))
// Delete all fields that are hidden by the Go rules for embedded fields,
// except that fields with JSON tags are promoted.
// The fields are sorted in primary order of name, secondary order
// of field index length. Loop over names; for each name, delete
// hidden fields by choosing the one dominant field that survives.
out := fields[:0]
for advance, i := 0, 0; i < len(fields); i += advance {
// One iteration per name.
// Find the sequence of fields with the name of this first field.
fi := fields[i]
name := fi.name
for advance = 1; i+advance < len(fields); advance++ {
fj := fields[i+advance]
if fj.name != name {
break
}
}
if advance == 1 { // Only one field with this name
out = append(out, fi)
continue
}
dominant, ok := dominantField(fields[i : i+advance])
if ok {
out = append(out, dominant)
}
}
fields = out
sort.Sort(byIndex(fields))
return fields
}
// dominantField looks through the fields, all of which are known to
// have the same name, to find the single field that dominates the
// others using Go's embedding rules, modified by the presence of
// JSON tags. If there are multiple top-level fields, the boolean
// will be false: This condition is an error in Go and we skip all
// the fields.
func dominantField(fields []field) (field, bool) {
// The fields are sorted in increasing index-length order. The winner
// must therefore be one with the shortest index length. Drop all
// longer entries, which is easy: just truncate the slice.
length := len(fields[0].index)
tagged := -1 // Index of first tagged field.
for i, f := range fields {
if len(f.index) > length {
fields = fields[:i]
break
}
if f.tag {
if tagged >= 0 {
// Multiple tagged fields at the same level: conflict.
// Return no field.
return field{}, false
}
tagged = i
}
}
if tagged >= 0 {
return fields[tagged], true
}
// All remaining fields have the same length. If there's more than one,
// we have a conflict (two fields named "X" at the same level) and we
// return no field.
if len(fields) > 1 {
return field{}, false
}
return fields[0], true
}
var fieldCache struct {
sync.RWMutex
m map[reflect.Type][]field
}
// cachedTypeFields is like typeFields but uses a cache to avoid repeated work.
func cachedTypeFields(t reflect.Type) []field {
fieldCache.RLock()
f := fieldCache.m[t]
fieldCache.RUnlock()
if f != nil {
return f
}
// Compute fields without lock.
// Might duplicate effort but won't hold other computations back.
f = typeFields(t)
if f == nil {
f = []field{}
}
fieldCache.Lock()
if fieldCache.m == nil {
fieldCache.m = map[reflect.Type][]field{}
}
fieldCache.m[t] = f
fieldCache.Unlock()
return f
}
func isValidTag(s string) bool {
if s == "" {
return false
}
for _, c := range s {
switch {
case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c):
// Backslash and quote chars are reserved, but
// otherwise any punctuation chars are allowed
// in a tag name.
default:
if !unicode.IsLetter(c) && !unicode.IsDigit(c) {
return false
}
}
}
return true
}
const (
caseMask = ^byte(0x20) // Mask to ignore case in ASCII.
kelvin = '\u212a'
smallLongEss = '\u017f'
)
// foldFunc returns one of four different case folding equivalence
// functions, from most general (and slow) to fastest:
//
// 1) bytes.EqualFold, if the key s contains any non-ASCII UTF-8
// 2) equalFoldRight, if s contains special folding ASCII ('k', 'K', 's', 'S')
// 3) asciiEqualFold, no special, but includes non-letters (including _)
// 4) simpleLetterEqualFold, no specials, no non-letters.
//
// The letters S and K are special because they map to 3 runes, not just 2:
// * S maps to s and to U+017F 'ſ' Latin small letter long s
// * k maps to K and to U+212A '' Kelvin sign
// See http://play.golang.org/p/tTxjOc0OGo
//
// The returned function is specialized for matching against s and
// should only be given s. It's not curried for performance reasons.
func foldFunc(s []byte) func(s, t []byte) bool {
nonLetter := false
special := false // special letter
for _, b := range s {
if b >= utf8.RuneSelf {
return bytes.EqualFold
}
upper := b & caseMask
if upper < 'A' || upper > 'Z' {
nonLetter = true
} else if upper == 'K' || upper == 'S' {
// See above for why these letters are special.
special = true
}
}
if special {
return equalFoldRight
}
if nonLetter {
return asciiEqualFold
}
return simpleLetterEqualFold
}
// equalFoldRight is a specialization of bytes.EqualFold when s is
// known to be all ASCII (including punctuation), but contains an 's',
// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t.
// See comments on foldFunc.
func equalFoldRight(s, t []byte) bool {
for _, sb := range s {
if len(t) == 0 {
return false
}
tb := t[0]
if tb < utf8.RuneSelf {
if sb != tb {
sbUpper := sb & caseMask
if 'A' <= sbUpper && sbUpper <= 'Z' {
if sbUpper != tb&caseMask {
return false
}
} else {
return false
}
}
t = t[1:]
continue
}
// sb is ASCII and t is not. t must be either kelvin
// sign or long s; sb must be s, S, k, or K.
tr, size := utf8.DecodeRune(t)
switch sb {
case 's', 'S':
if tr != smallLongEss {
return false
}
case 'k', 'K':
if tr != kelvin {
return false
}
default:
return false
}
t = t[size:]
}
if len(t) > 0 {
return false
}
return true
}
// asciiEqualFold is a specialization of bytes.EqualFold for use when
// s is all ASCII (but may contain non-letters) and contains no
// special-folding letters.
// See comments on foldFunc.
func asciiEqualFold(s, t []byte) bool {
if len(s) != len(t) {
return false
}
for i, sb := range s {
tb := t[i]
if sb == tb {
continue
}
if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') {
if sb&caseMask != tb&caseMask {
return false
}
} else {
return false
}
}
return true
}
// simpleLetterEqualFold is a specialization of bytes.EqualFold for
// use when s is all ASCII letters (no underscores, etc) and also
// doesn't contain 'k', 'K', 's', or 'S'.
// See comments on foldFunc.
func simpleLetterEqualFold(s, t []byte) bool {
if len(s) != len(t) {
return false
}
for i, b := range s {
if b&caseMask != t[i]&caseMask {
return false
}
}
return true
}
// tagOptions is the string following a comma in a struct field's "json"
// tag, or the empty string. It does not include the leading comma.
type tagOptions string
// parseTag splits a struct field's json tag into its name and
// comma-separated options.
func parseTag(tag string) (string, tagOptions) {
if idx := strings.Index(tag, ","); idx != -1 {
return tag[:idx], tagOptions(tag[idx+1:])
}
return tag, tagOptions("")
}
// Contains reports whether a comma-separated list of options
// contains a particular substr flag. substr must be surrounded by a
// string boundary or commas.
func (o tagOptions) Contains(optionName string) bool {
if len(o) == 0 {
return false
}
s := string(o)
for s != "" {
var next string
i := strings.Index(s, ",")
if i >= 0 {
s, next = s[:i], s[i+1:]
}
if s == optionName {
return true
}
s = next
}
return false
}

View File

@ -1,27 +0,0 @@
package netutil
import (
"net/url"
"strings"
)
// FROM: http://golang.org/src/net/http/client.go
// Given a string of the form "host", "host:port", or "[ipv6::address]:port",
// return true if the string includes a port.
func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") }
// FROM: http://golang.org/src/net/http/transport.go
var portMap = map[string]string{
"http": "80",
"https": "443",
}
// FROM: http://golang.org/src/net/http/transport.go
// canonicalAddr returns url.Host but always with a ":port" suffix
func CanonicalAddr(url *url.URL) string {
addr := url.Host
if !hasPort(addr) {
return addr + ":" + portMap[url.Scheme]
}
return addr
}

View File

@ -28,9 +28,9 @@ import (
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
k8sruntime "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/strategicpatch"
_ "k8s.io/client-go/pkg/api/install" // To register api.Pod used in tests below
"k8s.io/client-go/pkg/api/v1"
"k8s.io/client-go/pkg/util/strategicpatch"
restclient "k8s.io/client-go/rest"
"k8s.io/client-go/util/clock"
)

View File

@ -27,8 +27,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/client-go/pkg/api/v1"
"k8s.io/client-go/pkg/util/strategicpatch"
"k8s.io/client-go/util/clock"
)

View File

@ -23,7 +23,7 @@ import (
"reflect"
"strings"
"k8s.io/client-go/pkg/third_party/forked/golang/template"
"k8s.io/client-go/third_party/forked/golang/template"
)
type JSONPath struct {

View File

@ -21,7 +21,7 @@ import (
"testing"
"time"
"k8s.io/client-go/pkg/util/workqueue"
"k8s.io/client-go/util/workqueue"
)
func TestBasic(t *testing.T) {

View File

@ -375,6 +375,21 @@ func (m *APIResource) MarshalTo(data []byte) (int, error) {
}
i += n2
}
if len(m.ShortNames) > 0 {
for _, s := range m.ShortNames {
data[i] = 0x2a
i++
l = len(s)
for l >= 1<<7 {
data[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
data[i] = uint8(l)
i++
i += copy(data[i:], s)
}
}
return i, nil
}
@ -1470,6 +1485,12 @@ func (m *APIResource) Size() (n int) {
l = m.Verbs.Size()
n += 1 + l + sovGenerated(uint64(l))
}
if len(m.ShortNames) > 0 {
for _, s := range m.ShortNames {
l = len(s)
n += 1 + l + sovGenerated(uint64(l))
}
}
return n
}
@ -1912,6 +1933,7 @@ func (this *APIResource) String() string {
`Namespaced:` + fmt.Sprintf("%v", this.Namespaced) + `,`,
`Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
`Verbs:` + strings.Replace(fmt.Sprintf("%v", this.Verbs), "Verbs", "Verbs", 1) + `,`,
`ShortNames:` + fmt.Sprintf("%v", this.ShortNames) + `,`,
`}`,
}, "")
return s
@ -2602,6 +2624,35 @@ func (m *APIResource) Unmarshal(data []byte) error {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ShortNames", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ShortNames = append(m.ShortNames, string(data[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(data[iNdEx:])
@ -6649,136 +6700,137 @@ var (
)
var fileDescriptorGenerated = []byte{
// 2089 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x19, 0x4d, 0x6f, 0x23, 0x49,
0x35, 0xed, 0xc4, 0x1e, 0xfb, 0x39, 0xce, 0x47, 0x91, 0x01, 0x6f, 0x24, 0xec, 0x6c, 0xef, 0x0a,
0xcd, 0xc2, 0xac, 0x4d, 0x02, 0xac, 0x86, 0x01, 0x06, 0xe2, 0x38, 0x13, 0x45, 0x3b, 0x99, 0x44,
0x95, 0x9d, 0x41, 0x2c, 0x23, 0x44, 0xc7, 0x5d, 0x71, 0x9a, 0xb4, 0xbb, 0x9b, 0xaa, 0xb2, 0x27,
0x61, 0x0f, 0xac, 0x04, 0x08, 0x0e, 0x08, 0xcd, 0x91, 0x03, 0x42, 0x3b, 0x82, 0x1b, 0x37, 0xfe,
0x04, 0x73, 0x5c, 0x69, 0x2f, 0x1c, 0x90, 0xc5, 0x84, 0x03, 0x47, 0xee, 0x11, 0x07, 0x54, 0xd5,
0x55, 0xfd, 0x61, 0xc7, 0x9b, 0x36, 0xbb, 0x87, 0x3d, 0xc5, 0xf5, 0xbe, 0xbf, 0xea, 0xbd, 0x57,
0x1d, 0xd8, 0x3b, 0xbd, 0xc3, 0x1a, 0x8e, 0xdf, 0x3c, 0xed, 0x1f, 0x11, 0xea, 0x11, 0x4e, 0x58,
0x73, 0x40, 0x3c, 0xdb, 0xa7, 0x4d, 0x85, 0xb0, 0x02, 0xa7, 0x67, 0x75, 0x4e, 0x1c, 0x8f, 0xd0,
0xf3, 0x66, 0x70, 0xda, 0x15, 0x00, 0xd6, 0xec, 0x11, 0x6e, 0x35, 0x07, 0xeb, 0xcd, 0x2e, 0xf1,
0x08, 0xb5, 0x38, 0xb1, 0x1b, 0x01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1, 0xef, 0xcd, 0x89, 0x55,
0xa3, 0xfe, 0x69, 0xd3, 0xc0, 0xd6, 0xd3, 0xed, 0x33, 0x4e, 0x3c, 0x61, 0x63, 0x5c, 0x31, 0xe1,
0x8e, 0x82, 0x95, 0xb0, 0xd6, 0xeb, 0x2f, 0x5e, 0xd6, 0x66, 0x3e, 0x7c, 0x59, 0x9b, 0xf9, 0xfb,
0xcb, 0xda, 0xcc, 0xfb, 0x17, 0x35, 0xe3, 0xc5, 0x45, 0xcd, 0xf8, 0xf0, 0xa2, 0x66, 0xfc, 0xf3,
0xa2, 0x66, 0x3c, 0xfb, 0x57, 0x6d, 0xe6, 0xdd, 0xdc, 0x60, 0xfd, 0x7f, 0x01, 0x00, 0x00, 0xff,
0xff, 0x0c, 0x01, 0x08, 0xec, 0xf6, 0x1a, 0x00, 0x00,
// 2109 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x19, 0x4b, 0x6f, 0x23, 0x49,
0x39, 0x6d, 0xc7, 0x1e, 0xfb, 0x73, 0x9c, 0x47, 0x31, 0x03, 0xde, 0x48, 0xd8, 0xd9, 0xde, 0x15,
0x9a, 0x85, 0x59, 0x9b, 0x04, 0x58, 0x0d, 0x03, 0x0c, 0xc4, 0x71, 0x66, 0x14, 0xed, 0x64, 0x12,
0x55, 0x76, 0x06, 0xb1, 0x8c, 0x10, 0x1d, 0x77, 0xc5, 0x69, 0xd2, 0xee, 0x6e, 0xaa, 0xca, 0x9e,
0x84, 0x3d, 0xb0, 0xd2, 0x82, 0xe0, 0x80, 0xd0, 0x1c, 0x39, 0x20, 0xb4, 0x23, 0xb8, 0x71, 0xe3,
0x4f, 0x30, 0xc7, 0x95, 0xb8, 0x70, 0x40, 0x16, 0x13, 0x0e, 0x1c, 0xb9, 0x47, 0x1c, 0x50, 0x55,
0x57, 0xf5, 0xc3, 0x8e, 0x37, 0x6d, 0x76, 0x0f,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6, 0x9e, 0x3d, 0x6f,
0xcc, 0x7d, 0xf8, 0x5c, 0x2d, 0x93, 0x3f, 0x84, 0x72, 0x3c, 0x46, 0x7c, 0xca, 0x2a, 0xcd, 0x1f,
0x43, 0x49, 0x44, 0x92, 0x1e, 0x7f, 0xaf, 0x28, 0xfa, 0xe9, 0x72, 0x9c, 0xcb, 0x52, 0x8e, 0xcd,
0x0d, 0x08, 0xbf, 0xeb, 0x8a, 0x4a, 0xe8, 0x70, 0xd2, 0x4f, 0x55, 0xc2, 0x1d, 0x01, 0xc0, 0x21,
0x3c, 0xb1, 0x3f, 0xff, 0xd2, 0x00, 0x90, 0x7b, 0xc2, 0xf6, 0x50, 0xec, 0x76, 0x6b, 0x30, 0x2f,
0x4a, 0xec, 0xb8, 0x61, 0x32, 0x05, 0x24, 0x06, 0x3d, 0x82, 0xa2, 0x2f, 0xc7, 0x0b, 0xf5, 0xf1,
0xef, 0xcd, 0xa9, 0x51, 0xa3, 0xfe, 0xc9, 0xd3, 0xc4, 0xd6, 0xd3, 0xed, 0x53, 0x4e, 0x3c, 0x61,
0x63, 0x1c, 0x31, 0xe1, 0x8c, 0x82, 0x95, 0xb0, 0xf6, 0xeb, 0x2f, 0x5e, 0xd6, 0xe7, 0x3e, 0x7a,
0x59, 0x9f, 0xfb, 0xfb, 0xcb, 0xfa, 0xdc, 0xfb, 0xe7, 0x75, 0xe3, 0xc5, 0x79, 0xdd, 0xf8, 0xe8,
0xbc, 0x6e, 0xfc, 0xf3, 0xbc, 0x6e, 0x3c, 0xfb, 0x57, 0x7d, 0xee, 0xdd, 0xdc, 0x70, 0xfd, 0x7f,
0x01, 0x00, 0x00, 0xff, 0xff, 0xc3, 0xe1, 0xb9, 0xfd, 0x26, 0x1b, 0x00, 0x00,
}

View File

@ -74,6 +74,9 @@ message APIResource {
// verbs is a list of supported kube verbs (this includes get, list, watch, create,
// update, patch, delete, deletecollection, and proxy)
optional Verbs verbs = 4;
// shortNames is a list of suggested short names of the resource.
repeated string shortNames = 5;
}
// APIResourceList is a list of APIResource, it is used to expose the name of the

View File

@ -42,6 +42,7 @@ func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion)
schema.GroupVersion{Group: groupVersion.Group, Version: runtime.APIVersionInternal}.WithKind(WatchEventKind),
&InternalEvent{},
)
// Supports legacy code paths, most callers should use metav1.ParameterCodec for now
scheme.AddKnownTypes(groupVersion,
&ListOptions{},
&ExportOptions{},
@ -65,5 +66,8 @@ var ParameterCodec = runtime.NewParameterCodec(scheme)
func init() {
scheme.AddUnversionedTypes(SchemeGroupVersion,
&ListOptions{},
&ExportOptions{},
&GetOptions{},
&DeleteOptions{},
)
}

View File

@ -648,6 +648,8 @@ type APIResource struct {
// verbs is a list of supported kube verbs (this includes get, list, watch, create,
// update, patch, delete, deletecollection, and proxy)
Verbs Verbs `json:"verbs" protobuf:"bytes,4,opt,name=verbs"`
// shortNames is a list of suggested short names of the resource.
ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,5,rep,name=shortNames"`
}
// Verbs masks the value so protobuf can generate

View File

@ -54,6 +54,7 @@ var map_APIResource = map[string]string{
"namespaced": "namespaced indicates if a resource is namespaced or not.",
"kind": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')",
"verbs": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)",
"shortNames": "shortNames is a list of suggested short names of the resource.",
}
func (APIResource) SwaggerDoc() map[string]string {

View File

@ -115,6 +115,11 @@ func DeepCopy_v1_APIResource(in interface{}, out interface{}, c *conversion.Clon
*out = make(Verbs, len(*in))
copy(*out, *in)
}
if in.ShortNames != nil {
in, out := &in.ShortNames, &out.ShortNames
*out = make([]string, len(*in))
copy(*out, *in)
}
return nil
}
}

View File

@ -23,7 +23,7 @@ import (
"strings"
"k8s.io/apimachinery/pkg/util/json"
forkedjson "k8s.io/client-go/third_party/forked/golang/json"
forkedjson "k8s.io/apimachinery/third_party/forked/golang/json"
"github.com/davecgh/go-spew/spew"
"github.com/ghodss/yaml"

View File

@ -69,11 +69,10 @@ func (d *YAMLToJSONDecoder) Decode(into interface{}) error {
}
if len(bytes) != 0 {
data, err := yaml.YAMLToJSON(bytes)
err := yaml.Unmarshal(bytes, into)
if err != nil {
return err
return YAMLSyntaxError{err}
}
return json.Unmarshal(data, into)
}
return err
}
@ -184,6 +183,23 @@ type YAMLOrJSONDecoder struct {
rawData []byte
}
type JSONSyntaxError struct {
Line int
Err error
}
func (e JSONSyntaxError) Error() string {
return fmt.Sprintf("json: line %d: %s", e.Line, e.Err.Error())
}
type YAMLSyntaxError struct {
err error
}
func (e YAMLSyntaxError) Error() string {
return e.err.Error()
}
// NewYAMLOrJSONDecoder returns a decoder that will process YAML documents
// or JSON documents from the given reader as a stream. bufferSize determines
// how far into the stream the decoder will look to figure out whether this
@ -226,7 +242,10 @@ func (d *YAMLOrJSONDecoder) Decode(into interface{}) error {
start := strings.LastIndex(js[:syntax.Offset], "\n") + 1
line := strings.Count(js[:start], "\n")
return fmt.Errorf("json: line %d: %s", line, syntax.Error())
return JSONSyntaxError{
Line: line,
Err: fmt.Errorf(syntax.Error()),
}
}
}
return err