summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/apimachinery
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-01-08 14:52:57 +0100
committerValentin Rothberg <rothberg@redhat.com>2019-01-11 13:38:11 +0100
commitbd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87 (patch)
tree5f06e4e289f16d9164d692590a3fe6541b5384cf /vendor/k8s.io/apimachinery
parent545f24421247c9f6251a634764db3f8f8070a812 (diff)
downloadpodman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.tar.gz
podman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.tar.bz2
podman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.zip
vendor: update everything
* If possible, update each dependency to the latest available version. * Use releases over commit IDs and avoid vendoring branches. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/k8s.io/apimachinery')
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go2
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go58
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go2
-rw-r--r--vendor/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go2
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go24
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/scheme.go1
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go22
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go8
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/net/http.go3
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go6
-rw-r--r--vendor/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go2
11 files changed, 91 insertions, 39 deletions
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go
index 186d9007e..fc36d9811 100644
--- a/vendor/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go
@@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+// Code generated by deepcopy-gen. DO NOT EDIT.
package resource
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go
index 2aa209025..73308d86e 100644
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go
@@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+// Code generated by deepcopy-gen. DO NOT EDIT.
package v1
@@ -57,9 +57,8 @@ func (in *APIGroup) DeepCopy() *APIGroup {
func (in *APIGroup) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
@@ -90,9 +89,8 @@ func (in *APIGroupList) DeepCopy() *APIGroupList {
func (in *APIGroupList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
@@ -154,9 +152,8 @@ func (in *APIResourceList) DeepCopy() *APIResourceList {
func (in *APIResourceList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
@@ -190,9 +187,8 @@ func (in *APIVersions) DeepCopy() *APIVersions {
func (in *APIVersions) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
@@ -252,9 +248,8 @@ func (in *DeleteOptions) DeepCopy() *DeleteOptions {
func (in *DeleteOptions) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
@@ -294,9 +289,8 @@ func (in *ExportOptions) DeepCopy() *ExportOptions {
func (in *ExportOptions) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
@@ -320,9 +314,8 @@ func (in *GetOptions) DeepCopy() *GetOptions {
func (in *GetOptions) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
@@ -568,9 +561,8 @@ func (in *List) DeepCopy() *List {
func (in *List) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
@@ -619,9 +611,8 @@ func (in *ListOptions) DeepCopy() *ListOptions {
func (in *ListOptions) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MicroTime.
@@ -643,8 +634,7 @@ func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta) {
if *in == nil {
*out = nil
} else {
- *out = new(Time)
- (*in).DeepCopyInto(*out)
+ *out = (*in).DeepCopy()
}
}
if in.DeletionGracePeriodSeconds != nil {
@@ -847,9 +837,8 @@ func (in *Status) DeepCopy() *Status {
func (in *Status) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
@@ -916,6 +905,26 @@ func (in *Timestamp) DeepCopy() *Timestamp {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in Verbs) DeepCopyInto(out *Verbs) {
+ {
+ in := &in
+ *out = make(Verbs, len(*in))
+ copy(*out, *in)
+ return
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Verbs.
+func (in Verbs) DeepCopy() Verbs {
+ if in == nil {
+ return nil
+ }
+ out := new(Verbs)
+ in.DeepCopyInto(out)
+ return *out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WatchEvent) DeepCopyInto(out *WatchEvent) {
*out = *in
in.Object.DeepCopyInto(&out.Object)
@@ -936,7 +945,6 @@ func (in *WatchEvent) DeepCopy() *WatchEvent {
func (in *WatchEvent) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go
index 88d7af085..40d9ab00e 100644
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go
@@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-// This file was autogenerated by defaulter-gen. Do not edit it manually!
+// Code generated by defaulter-gen. DO NOT EDIT.
package v1
diff --git a/vendor/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go
index d22cddbff..a536f9ec9 100644
--- a/vendor/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go
+++ b/vendor/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go
@@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+// Code generated by deepcopy-gen. DO NOT EDIT.
package labels
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go
index 1a9bba106..da642fa73 100644
--- a/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go
@@ -36,6 +36,21 @@ func ParseResourceArg(arg string) (*GroupVersionResource, GroupResource) {
return gvr, ParseGroupResource(arg)
}
+// ParseKindArg takes the common style of string which may be either `Kind.group.com` or `Kind.version.group.com`
+// and parses it out into both possibilities. This code takes no responsibility for knowing which representation was intended
+// but with a knowledge of all GroupKinds, calling code can take a very good guess. If there are only two segments, then
+// `*GroupVersionResource` is nil.
+// `Kind.group.com` -> `group=com, version=group, kind=Kind` and `group=group.com, kind=Kind`
+func ParseKindArg(arg string) (*GroupVersionKind, GroupKind) {
+ var gvk *GroupVersionKind
+ if strings.Count(arg, ".") >= 2 {
+ s := strings.SplitN(arg, ".", 3)
+ gvk = &GroupVersionKind{Group: s[2], Version: s[1], Kind: s[0]}
+ }
+
+ return gvk, ParseGroupKind(arg)
+}
+
// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying
// concepts during lookup stages without having partially valid types
type GroupResource struct {
@@ -58,6 +73,15 @@ func (gr *GroupResource) String() string {
return gr.Resource + "." + gr.Group
}
+func ParseGroupKind(gk string) GroupKind {
+ i := strings.Index(gk, ".")
+ if i == -1 {
+ return GroupKind{Kind: gk}
+ }
+
+ return GroupKind{Group: gk[i+1:], Kind: gk[:i]}
+}
+
// ParseGroupResource turns "resource.group" string into a GroupResource struct. Empty strings are allowed
// for each field.
func ParseGroupResource(gr string) GroupResource {
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go
index 08b755381..3d94a3041 100644
--- a/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go
@@ -431,6 +431,7 @@ func (s *Scheme) Convert(in, out interface{}, context interface{}) error {
return err
}
unstructuredOut.SetUnstructuredContent(content)
+ unstructuredOut.GetObjectKind().SetGroupVersionKind(gvk)
return nil
}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go
index 2b795b5b8..111f056c8 100644
--- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go
@@ -98,6 +98,20 @@ func init() {
jsoniter.RegisterTypeDecoderFunc("interface {}", decodeNumberAsInt64IfPossible)
}
+// CaseSensitiveJsonIterator returns a jsoniterator API that's configured to be
+// case-sensitive when unmarshalling, and otherwise compatible with
+// the encoding/json standard library.
+func CaseSensitiveJsonIterator() jsoniter.API {
+ return jsoniter.Config{
+ EscapeHTML: true,
+ SortMapKeys: true,
+ ValidateJsonRawMessage: true,
+ CaseSensitive: true,
+ }.Froze()
+}
+
+var caseSensitiveJsonIterator = CaseSensitiveJsonIterator()
+
// gvkWithDefaults returns group kind and version defaulting from provided default
func gvkWithDefaults(actual, defaultGVK schema.GroupVersionKind) schema.GroupVersionKind {
if len(actual.Kind) == 0 {
@@ -162,7 +176,7 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i
types, _, err := s.typer.ObjectKinds(into)
switch {
case runtime.IsNotRegisteredError(err), isUnstructured:
- if err := jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal(data, into); err != nil {
+ if err := caseSensitiveJsonIterator.Unmarshal(data, into); err != nil {
return nil, actual, err
}
return into, actual, nil
@@ -186,7 +200,7 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i
return nil, actual, err
}
- if err := jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal(data, obj); err != nil {
+ if err := caseSensitiveJsonIterator.Unmarshal(data, obj); err != nil {
return nil, actual, err
}
return obj, actual, nil
@@ -195,7 +209,7 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i
// Encode serializes the provided object to the given writer.
func (s *Serializer) Encode(obj runtime.Object, w io.Writer) error {
if s.yaml {
- json, err := jsoniter.ConfigCompatibleWithStandardLibrary.Marshal(obj)
+ json, err := caseSensitiveJsonIterator.Marshal(obj)
if err != nil {
return err
}
@@ -208,7 +222,7 @@ func (s *Serializer) Encode(obj runtime.Object, w io.Writer) error {
}
if s.pretty {
- data, err := jsoniter.ConfigCompatibleWithStandardLibrary.MarshalIndent(obj, "", " ")
+ data, err := caseSensitiveJsonIterator.MarshalIndent(obj, "", " ")
if err != nil {
return err
}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go
index 82cf19ce1..ba89cd235 100644
--- a/vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go
@@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+// Code generated by deepcopy-gen. DO NOT EDIT.
package runtime
@@ -72,9 +72,8 @@ func (in *Unknown) DeepCopy() *Unknown {
func (in *Unknown) DeepCopyObject() Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
@@ -108,7 +107,6 @@ func (in *VersionedObjects) DeepCopy() *VersionedObjects {
func (in *VersionedObjects) DeepCopyObject() Object {
if c := in.DeepCopy(); c != nil {
return c
- } else {
- return nil
}
+ return nil
}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/http.go b/vendor/k8s.io/apimachinery/pkg/util/net/http.go
index bc2a531b9..76eb8b4fa 100644
--- a/vendor/k8s.io/apimachinery/pkg/util/net/http.go
+++ b/vendor/k8s.io/apimachinery/pkg/util/net/http.go
@@ -61,6 +61,9 @@ func JoinPreservingTrailingSlash(elem ...string) string {
// differentiate probable errors in connection behavior between normal "this is
// disconnected" should use the method.
func IsProbableEOF(err error) bool {
+ if err == nil {
+ return false
+ }
if uerr, ok := err.(*url.Error); ok {
err = uerr.Err
}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go
index d4cec0b88..1e7d3ce0b 100644
--- a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go
+++ b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go
@@ -63,7 +63,11 @@ func HandleCrash(additionalHandlers ...func(interface{})) {
// logPanic logs the caller tree when a panic occurs.
func logPanic(r interface{}) {
callers := getCallers(r)
- glog.Errorf("Observed a panic: %#v (%v)\n%v", r, r, callers)
+ if _, ok := r.(string); ok {
+ glog.Errorf("Observed a panic: %s\n%v", r, callers)
+ } else {
+ glog.Errorf("Observed a panic: %#v (%v)\n%v", r, r, callers)
+ }
}
func getCallers(r interface{}) string {
diff --git a/vendor/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go
index 738d0a29c..b1b19d118 100644
--- a/vendor/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go
+++ b/vendor/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go
@@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+// Code generated by deepcopy-gen. DO NOT EDIT.
package watch