mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
vendor updates
This commit is contained in:
6
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD
generated
vendored
6
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD
generated
vendored
@ -18,8 +18,7 @@ go_test(
|
||||
"time_test.go",
|
||||
"types_test.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
library = ":go_default_library",
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//vendor/github.com/ghodss/yaml:go_default_library",
|
||||
"//vendor/github.com/json-iterator/go:go_default_library",
|
||||
@ -53,7 +52,6 @@ go_library(
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
deps = [
|
||||
"//vendor/github.com/go-openapi/spec:go_default_library",
|
||||
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
|
||||
"//vendor/github.com/gogo/protobuf/sortkeys:go_default_library",
|
||||
"//vendor/github.com/google/gofuzz:go_default_library",
|
||||
@ -67,7 +65,6 @@ go_library(
|
||||
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||
"//vendor/k8s.io/kube-openapi/pkg/common:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
@ -97,7 +94,6 @@ filegroup(
|
||||
go_test(
|
||||
name = "go_default_xtest",
|
||||
srcs = ["conversion_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/apis/meta/v1_test",
|
||||
deps = [
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
|
1
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS
generated
vendored
1
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS
generated
vendored
@ -16,7 +16,6 @@ reviewers:
|
||||
- janetkuo
|
||||
- justinsb
|
||||
- ncdc
|
||||
- timothysc
|
||||
- soltysh
|
||||
- dims
|
||||
- madhusudancs
|
||||
|
18
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go
generated
vendored
18
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go
generated
vendored
@ -65,6 +65,9 @@ func AddConversionFuncs(scheme *runtime.Scheme) error {
|
||||
Convert_Pointer_int32_To_int32,
|
||||
Convert_int32_To_Pointer_int32,
|
||||
|
||||
Convert_Pointer_int64_To_int64,
|
||||
Convert_int64_To_Pointer_int64,
|
||||
|
||||
Convert_Pointer_float64_To_float64,
|
||||
Convert_float64_To_Pointer_float64,
|
||||
|
||||
@ -105,6 +108,21 @@ func Convert_int32_To_Pointer_int32(in *int32, out **int32, s conversion.Scope)
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_Pointer_int64_To_int64(in **int64, out *int64, s conversion.Scope) error {
|
||||
if *in == nil {
|
||||
*out = 0
|
||||
return nil
|
||||
}
|
||||
*out = int64(**in)
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_int64_To_Pointer_int64(in *int64, out **int64, s conversion.Scope) error {
|
||||
temp := int64(*in)
|
||||
*out = &temp
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_Pointer_int64_To_int(in **int64, out *int, s conversion.Scope) error {
|
||||
if *in == nil {
|
||||
*out = 0
|
||||
|
1
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto
generated
vendored
1
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto
generated
vendored
@ -375,6 +375,7 @@ message ListOptions {
|
||||
optional string resourceVersion = 4;
|
||||
|
||||
// Timeout for the list/watch call.
|
||||
// This limits the duration of the call, regardless of any activity or inactivity.
|
||||
// +optional
|
||||
optional int64 timeoutSeconds = 5;
|
||||
|
||||
|
2
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go
generated
vendored
@ -47,7 +47,7 @@ func TestGroupVersionUnmarshalJSON(t *testing.T) {
|
||||
t.Errorf("JSON codec failed to unmarshal input '%s': expected %+v, got %+v", c.input, c.expect, result.GV)
|
||||
}
|
||||
// test the json-iterator codec
|
||||
if err := jsoniter.ConfigFastest.Unmarshal(c.input, &result); err != nil {
|
||||
if err := jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal(c.input, &result); err != nil {
|
||||
t.Errorf("json-iterator codec failed to unmarshal input '%v': %v", c.input, err)
|
||||
}
|
||||
if !reflect.DeepEqual(result.GV, c.expect) {
|
||||
|
28
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go
generated
vendored
28
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go
generated
vendored
@ -25,34 +25,14 @@ func CloneSelectorAndAddLabel(selector *LabelSelector, labelKey, labelValue stri
|
||||
}
|
||||
|
||||
// Clone.
|
||||
newSelector := new(LabelSelector)
|
||||
newSelector := selector.DeepCopy()
|
||||
|
||||
// TODO(madhusudancs): Check if you can use deepCopy_extensions_LabelSelector here.
|
||||
newSelector.MatchLabels = make(map[string]string)
|
||||
if selector.MatchLabels != nil {
|
||||
for key, val := range selector.MatchLabels {
|
||||
newSelector.MatchLabels[key] = val
|
||||
}
|
||||
if newSelector.MatchLabels == nil {
|
||||
newSelector.MatchLabels = make(map[string]string)
|
||||
}
|
||||
|
||||
newSelector.MatchLabels[labelKey] = labelValue
|
||||
|
||||
if selector.MatchExpressions != nil {
|
||||
newMExps := make([]LabelSelectorRequirement, len(selector.MatchExpressions))
|
||||
for i, me := range selector.MatchExpressions {
|
||||
newMExps[i].Key = me.Key
|
||||
newMExps[i].Operator = me.Operator
|
||||
if me.Values != nil {
|
||||
newMExps[i].Values = make([]string, len(me.Values))
|
||||
copy(newMExps[i].Values, me.Values)
|
||||
} else {
|
||||
newMExps[i].Values = nil
|
||||
}
|
||||
}
|
||||
newSelector.MatchExpressions = newMExps
|
||||
} else {
|
||||
newSelector.MatchExpressions = nil
|
||||
}
|
||||
|
||||
return newSelector
|
||||
}
|
||||
|
||||
|
7
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go
generated
vendored
7
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go
generated
vendored
@ -27,6 +27,9 @@ func TestCloneSelectorAndAddLabel(t *testing.T) {
|
||||
"foo2": "bar2",
|
||||
"foo3": "bar3",
|
||||
}
|
||||
matchExpressions := []LabelSelectorRequirement{
|
||||
{Key: "foo", Operator: LabelSelectorOpIn, Values: []string{"foo"}},
|
||||
}
|
||||
|
||||
cases := []struct {
|
||||
labels map[string]string
|
||||
@ -60,8 +63,8 @@ func TestCloneSelectorAndAddLabel(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
ls_in := LabelSelector{MatchLabels: tc.labels}
|
||||
ls_out := LabelSelector{MatchLabels: tc.want}
|
||||
ls_in := LabelSelector{MatchLabels: tc.labels, MatchExpressions: matchExpressions}
|
||||
ls_out := LabelSelector{MatchLabels: tc.want, MatchExpressions: matchExpressions}
|
||||
|
||||
got := CloneSelectorAndAddLabel(&ls_in, tc.labelKey, tc.labelValue)
|
||||
if !reflect.DeepEqual(got, &ls_out) {
|
||||
|
22
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go
generated
vendored
22
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go
generated
vendored
@ -20,9 +20,6 @@ import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
openapi "k8s.io/kube-openapi/pkg/common"
|
||||
|
||||
"github.com/go-openapi/spec"
|
||||
"github.com/google/gofuzz"
|
||||
)
|
||||
|
||||
@ -149,16 +146,15 @@ func (t MicroTime) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(t.UTC().Format(RFC3339Micro))
|
||||
}
|
||||
|
||||
func (_ MicroTime) OpenAPIDefinition() openapi.OpenAPIDefinition {
|
||||
return openapi.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "date-time",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
// OpenAPISchemaType is used by the kube-openapi generator when constructing
|
||||
// the OpenAPI spec of this type.
|
||||
//
|
||||
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
|
||||
func (_ MicroTime) OpenAPISchemaType() []string { return []string{"string"} }
|
||||
|
||||
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
|
||||
// the OpenAPI spec of this type.
|
||||
func (_ MicroTime) OpenAPISchemaFormat() string { return "date-time" }
|
||||
|
||||
// MarshalQueryParameter converts to a URL query parameter value
|
||||
func (t MicroTime) MarshalQueryParameter() (string, error) {
|
||||
|
22
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go
generated
vendored
22
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go
generated
vendored
@ -20,9 +20,6 @@ import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
openapi "k8s.io/kube-openapi/pkg/common"
|
||||
|
||||
"github.com/go-openapi/spec"
|
||||
"github.com/google/gofuzz"
|
||||
)
|
||||
|
||||
@ -151,16 +148,15 @@ func (t Time) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(t.UTC().Format(time.RFC3339))
|
||||
}
|
||||
|
||||
func (_ Time) OpenAPIDefinition() openapi.OpenAPIDefinition {
|
||||
return openapi.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "date-time",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
// OpenAPISchemaType is used by the kube-openapi generator when constructing
|
||||
// the OpenAPI spec of this type.
|
||||
//
|
||||
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
|
||||
func (_ Time) OpenAPISchemaType() []string { return []string{"string"} }
|
||||
|
||||
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
|
||||
// the OpenAPI spec of this type.
|
||||
func (_ Time) OpenAPISchemaFormat() string { return "date-time" }
|
||||
|
||||
// MarshalQueryParameter converts to a URL query parameter value
|
||||
func (t Time) MarshalQueryParameter() (string, error) {
|
||||
|
13
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go
generated
vendored
13
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go
generated
vendored
@ -342,6 +342,7 @@ type ListOptions struct {
|
||||
// +optional
|
||||
ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"`
|
||||
// Timeout for the list/watch call.
|
||||
// This limits the duration of the call, regardless of any activity or inactivity.
|
||||
// +optional
|
||||
TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"`
|
||||
|
||||
@ -651,6 +652,18 @@ const (
|
||||
// can only be created. API calls that return MethodNotAllowed can never succeed.
|
||||
StatusReasonMethodNotAllowed StatusReason = "MethodNotAllowed"
|
||||
|
||||
// StatusReasonNotAcceptable means that the accept types indicated by the client were not acceptable
|
||||
// to the server - for instance, attempting to receive protobuf for a resource that supports only json and yaml.
|
||||
// API calls that return NotAcceptable can never succeed.
|
||||
// Status code 406
|
||||
StatusReasonNotAcceptable StatusReason = "NotAcceptable"
|
||||
|
||||
// StatusReasonUnsupportedMediaType means that the content type sent by the client is not acceptable
|
||||
// to the server - for instance, attempting to send protobuf for a resource that supports only json and yaml.
|
||||
// API calls that return UnsupportedMediaType can never succeed.
|
||||
// Status code 415
|
||||
StatusReasonUnsupportedMediaType StatusReason = "UnsupportedMediaType"
|
||||
|
||||
// StatusReasonInternalError indicates that an internal error occurred, it is unexpected
|
||||
// and the outcome of the call is unknown.
|
||||
// Details (optional):
|
||||
|
2
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go
generated
vendored
@ -195,7 +195,7 @@ var map_ListOptions = map[string]string{
|
||||
"includeUninitialized": "If true, partially initialized resources are included in the response.",
|
||||
"watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
|
||||
"resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
|
||||
"timeoutSeconds": "Timeout for the list/watch call.",
|
||||
"timeoutSeconds": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.",
|
||||
"limit": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.",
|
||||
"continue": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.",
|
||||
}
|
||||
|
2
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go
generated
vendored
@ -58,7 +58,7 @@ func TestVerbsUgorjiUnmarshalJSON(t *testing.T) {
|
||||
|
||||
for i, c := range cases {
|
||||
var result APIResource
|
||||
if err := jsoniter.ConfigFastest.Unmarshal([]byte(c.input), &result); err != nil {
|
||||
if err := jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal([]byte(c.input), &result); err != nil {
|
||||
t.Errorf("[%d] Failed to unmarshal input '%v': %v", i, c.input, err)
|
||||
}
|
||||
if !reflect.DeepEqual(result, c.result) {
|
||||
|
3
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/BUILD
generated
vendored
3
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/BUILD
generated
vendored
@ -12,8 +12,7 @@ go_test(
|
||||
"helpers_test.go",
|
||||
"unstructured_list_test.go",
|
||||
],
|
||||
importpath = "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
||||
library = ":go_default_library",
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//vendor/github.com/stretchr/testify/assert:go_default_library",
|
||||
"//vendor/github.com/stretchr/testify/require:go_default_library",
|
||||
|
216
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go
generated
vendored
216
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go
generated
vendored
@ -31,163 +31,181 @@ import (
|
||||
)
|
||||
|
||||
// NestedFieldCopy returns a deep copy of the value of a nested field.
|
||||
// false is returned if the value is missing.
|
||||
// nil, true is returned for a nil field.
|
||||
func NestedFieldCopy(obj map[string]interface{}, fields ...string) (interface{}, bool) {
|
||||
val, ok := nestedFieldNoCopy(obj, fields...)
|
||||
if !ok {
|
||||
return nil, false
|
||||
// Returns false if the value is missing.
|
||||
// No error is returned for a nil field.
|
||||
func NestedFieldCopy(obj map[string]interface{}, fields ...string) (interface{}, bool, error) {
|
||||
val, found, err := nestedFieldNoCopy(obj, fields...)
|
||||
if !found || err != nil {
|
||||
return nil, found, err
|
||||
}
|
||||
return runtime.DeepCopyJSONValue(val), true
|
||||
return runtime.DeepCopyJSONValue(val), true, nil
|
||||
}
|
||||
|
||||
func nestedFieldNoCopy(obj map[string]interface{}, fields ...string) (interface{}, bool) {
|
||||
func nestedFieldNoCopy(obj map[string]interface{}, fields ...string) (interface{}, bool, error) {
|
||||
var val interface{} = obj
|
||||
for _, field := range fields {
|
||||
|
||||
for i, field := range fields {
|
||||
if m, ok := val.(map[string]interface{}); ok {
|
||||
val, ok = m[field]
|
||||
if !ok {
|
||||
return nil, false
|
||||
return nil, false, nil
|
||||
}
|
||||
} else {
|
||||
// Expected map[string]interface{}, got something else
|
||||
return nil, false
|
||||
return nil, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected map[string]interface{}", jsonPath(fields[:i+1]), val, val)
|
||||
}
|
||||
}
|
||||
return val, true
|
||||
return val, true, nil
|
||||
}
|
||||
|
||||
// NestedString returns the string value of a nested field.
|
||||
// Returns false if value is not found or is not a string.
|
||||
func NestedString(obj map[string]interface{}, fields ...string) (string, bool) {
|
||||
val, ok := nestedFieldNoCopy(obj, fields...)
|
||||
if !ok {
|
||||
return "", false
|
||||
// Returns false if value is not found and an error if not a string.
|
||||
func NestedString(obj map[string]interface{}, fields ...string) (string, bool, error) {
|
||||
val, found, err := nestedFieldNoCopy(obj, fields...)
|
||||
if !found || err != nil {
|
||||
return "", found, err
|
||||
}
|
||||
s, ok := val.(string)
|
||||
return s, ok
|
||||
if !ok {
|
||||
return "", false, fmt.Errorf("%v accessor error: %v is of the type %T, expected string", jsonPath(fields), val, val)
|
||||
}
|
||||
return s, true, nil
|
||||
}
|
||||
|
||||
// NestedBool returns the bool value of a nested field.
|
||||
// Returns false if value is not found or is not a bool.
|
||||
func NestedBool(obj map[string]interface{}, fields ...string) (bool, bool) {
|
||||
val, ok := nestedFieldNoCopy(obj, fields...)
|
||||
if !ok {
|
||||
return false, false
|
||||
// Returns false if value is not found and an error if not a bool.
|
||||
func NestedBool(obj map[string]interface{}, fields ...string) (bool, bool, error) {
|
||||
val, found, err := nestedFieldNoCopy(obj, fields...)
|
||||
if !found || err != nil {
|
||||
return false, found, err
|
||||
}
|
||||
b, ok := val.(bool)
|
||||
return b, ok
|
||||
if !ok {
|
||||
return false, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected bool", jsonPath(fields), val, val)
|
||||
}
|
||||
return b, true, nil
|
||||
}
|
||||
|
||||
// NestedFloat64 returns the bool value of a nested field.
|
||||
// Returns false if value is not found or is not a float64.
|
||||
func NestedFloat64(obj map[string]interface{}, fields ...string) (float64, bool) {
|
||||
val, ok := nestedFieldNoCopy(obj, fields...)
|
||||
if !ok {
|
||||
return 0, false
|
||||
// NestedFloat64 returns the float64 value of a nested field.
|
||||
// Returns false if value is not found and an error if not a float64.
|
||||
func NestedFloat64(obj map[string]interface{}, fields ...string) (float64, bool, error) {
|
||||
val, found, err := nestedFieldNoCopy(obj, fields...)
|
||||
if !found || err != nil {
|
||||
return 0, found, err
|
||||
}
|
||||
f, ok := val.(float64)
|
||||
return f, ok
|
||||
if !ok {
|
||||
return 0, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected float64", jsonPath(fields), val, val)
|
||||
}
|
||||
return f, true, nil
|
||||
}
|
||||
|
||||
// NestedInt64 returns the int64 value of a nested field.
|
||||
// Returns false if value is not found or is not an int64.
|
||||
func NestedInt64(obj map[string]interface{}, fields ...string) (int64, bool) {
|
||||
val, ok := nestedFieldNoCopy(obj, fields...)
|
||||
if !ok {
|
||||
return 0, false
|
||||
// Returns false if value is not found and an error if not an int64.
|
||||
func NestedInt64(obj map[string]interface{}, fields ...string) (int64, bool, error) {
|
||||
val, found, err := nestedFieldNoCopy(obj, fields...)
|
||||
if !found || err != nil {
|
||||
return 0, found, err
|
||||
}
|
||||
i, ok := val.(int64)
|
||||
return i, ok
|
||||
if !ok {
|
||||
return 0, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected int64", jsonPath(fields), val, val)
|
||||
}
|
||||
return i, true, nil
|
||||
}
|
||||
|
||||
// NestedStringSlice returns a copy of []string value of a nested field.
|
||||
// Returns false if value is not found, is not a []interface{} or contains non-string items in the slice.
|
||||
func NestedStringSlice(obj map[string]interface{}, fields ...string) ([]string, bool) {
|
||||
val, ok := nestedFieldNoCopy(obj, fields...)
|
||||
// Returns false if value is not found and an error if not a []interface{} or contains non-string items in the slice.
|
||||
func NestedStringSlice(obj map[string]interface{}, fields ...string) ([]string, bool, error) {
|
||||
val, found, err := nestedFieldNoCopy(obj, fields...)
|
||||
if !found || err != nil {
|
||||
return nil, found, err
|
||||
}
|
||||
m, ok := val.([]interface{})
|
||||
if !ok {
|
||||
return nil, false
|
||||
return nil, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected []interface{}", jsonPath(fields), val, val)
|
||||
}
|
||||
if m, ok := val.([]interface{}); ok {
|
||||
strSlice := make([]string, 0, len(m))
|
||||
for _, v := range m {
|
||||
if str, ok := v.(string); ok {
|
||||
strSlice = append(strSlice, str)
|
||||
} else {
|
||||
return nil, false
|
||||
}
|
||||
strSlice := make([]string, 0, len(m))
|
||||
for _, v := range m {
|
||||
if str, ok := v.(string); ok {
|
||||
strSlice = append(strSlice, str)
|
||||
} else {
|
||||
return nil, false, fmt.Errorf("%v accessor error: contains non-string key in the slice: %v is of the type %T, expected string", jsonPath(fields), v, v)
|
||||
}
|
||||
return strSlice, true
|
||||
}
|
||||
return nil, false
|
||||
return strSlice, true, nil
|
||||
}
|
||||
|
||||
// NestedSlice returns a deep copy of []interface{} value of a nested field.
|
||||
// Returns false if value is not found or is not a []interface{}.
|
||||
func NestedSlice(obj map[string]interface{}, fields ...string) ([]interface{}, bool) {
|
||||
val, ok := nestedFieldNoCopy(obj, fields...)
|
||||
// Returns false if value is not found and an error if not a []interface{}.
|
||||
func NestedSlice(obj map[string]interface{}, fields ...string) ([]interface{}, bool, error) {
|
||||
val, found, err := nestedFieldNoCopy(obj, fields...)
|
||||
if !found || err != nil {
|
||||
return nil, found, err
|
||||
}
|
||||
_, ok := val.([]interface{})
|
||||
if !ok {
|
||||
return nil, false
|
||||
return nil, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected []interface{}", jsonPath(fields), val, val)
|
||||
}
|
||||
if _, ok := val.([]interface{}); ok {
|
||||
return runtime.DeepCopyJSONValue(val).([]interface{}), true
|
||||
}
|
||||
return nil, false
|
||||
return runtime.DeepCopyJSONValue(val).([]interface{}), true, nil
|
||||
}
|
||||
|
||||
// NestedStringMap returns a copy of map[string]string value of a nested field.
|
||||
// Returns false if value is not found, is not a map[string]interface{} or contains non-string values in the map.
|
||||
func NestedStringMap(obj map[string]interface{}, fields ...string) (map[string]string, bool) {
|
||||
m, ok := nestedMapNoCopy(obj, fields...)
|
||||
if !ok {
|
||||
return nil, false
|
||||
// Returns false if value is not found and an error if not a map[string]interface{} or contains non-string values in the map.
|
||||
func NestedStringMap(obj map[string]interface{}, fields ...string) (map[string]string, bool, error) {
|
||||
m, found, err := nestedMapNoCopy(obj, fields...)
|
||||
if !found || err != nil {
|
||||
return nil, found, err
|
||||
}
|
||||
strMap := make(map[string]string, len(m))
|
||||
for k, v := range m {
|
||||
if str, ok := v.(string); ok {
|
||||
strMap[k] = str
|
||||
} else {
|
||||
return nil, false
|
||||
return nil, false, fmt.Errorf("%v accessor error: contains non-string key in the map: %v is of the type %T, expected string", jsonPath(fields), v, v)
|
||||
}
|
||||
}
|
||||
return strMap, true
|
||||
return strMap, true, nil
|
||||
}
|
||||
|
||||
// NestedMap returns a deep copy of map[string]interface{} value of a nested field.
|
||||
// Returns false if value is not found or is not a map[string]interface{}.
|
||||
func NestedMap(obj map[string]interface{}, fields ...string) (map[string]interface{}, bool) {
|
||||
m, ok := nestedMapNoCopy(obj, fields...)
|
||||
if !ok {
|
||||
return nil, false
|
||||
// Returns false if value is not found and an error if not a map[string]interface{}.
|
||||
func NestedMap(obj map[string]interface{}, fields ...string) (map[string]interface{}, bool, error) {
|
||||
m, found, err := nestedMapNoCopy(obj, fields...)
|
||||
if !found || err != nil {
|
||||
return nil, found, err
|
||||
}
|
||||
return runtime.DeepCopyJSON(m), true
|
||||
return runtime.DeepCopyJSON(m), true, nil
|
||||
}
|
||||
|
||||
// nestedMapNoCopy returns a map[string]interface{} value of a nested field.
|
||||
// Returns false if value is not found or is not a map[string]interface{}.
|
||||
func nestedMapNoCopy(obj map[string]interface{}, fields ...string) (map[string]interface{}, bool) {
|
||||
val, ok := nestedFieldNoCopy(obj, fields...)
|
||||
if !ok {
|
||||
return nil, false
|
||||
// Returns false if value is not found and an error if not a map[string]interface{}.
|
||||
func nestedMapNoCopy(obj map[string]interface{}, fields ...string) (map[string]interface{}, bool, error) {
|
||||
val, found, err := nestedFieldNoCopy(obj, fields...)
|
||||
if !found || err != nil {
|
||||
return nil, found, err
|
||||
}
|
||||
m, ok := val.(map[string]interface{})
|
||||
return m, ok
|
||||
if !ok {
|
||||
return nil, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected map[string]interface{}", jsonPath(fields), val, val)
|
||||
}
|
||||
return m, true, nil
|
||||
}
|
||||
|
||||
// SetNestedField sets the value of a nested field to a deep copy of the value provided.
|
||||
// Returns false if value cannot be set because one of the nesting levels is not a map[string]interface{}.
|
||||
func SetNestedField(obj map[string]interface{}, value interface{}, fields ...string) bool {
|
||||
// Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}.
|
||||
func SetNestedField(obj map[string]interface{}, value interface{}, fields ...string) error {
|
||||
return setNestedFieldNoCopy(obj, runtime.DeepCopyJSONValue(value), fields...)
|
||||
}
|
||||
|
||||
func setNestedFieldNoCopy(obj map[string]interface{}, value interface{}, fields ...string) bool {
|
||||
func setNestedFieldNoCopy(obj map[string]interface{}, value interface{}, fields ...string) error {
|
||||
m := obj
|
||||
for _, field := range fields[:len(fields)-1] {
|
||||
|
||||
for i, field := range fields[:len(fields)-1] {
|
||||
if val, ok := m[field]; ok {
|
||||
if valMap, ok := val.(map[string]interface{}); ok {
|
||||
m = valMap
|
||||
} else {
|
||||
return false
|
||||
return fmt.Errorf("value cannot be set because %v is not a map[string]interface{}", jsonPath(fields[:i+1]))
|
||||
}
|
||||
} else {
|
||||
newVal := make(map[string]interface{})
|
||||
@ -196,12 +214,12 @@ func setNestedFieldNoCopy(obj map[string]interface{}, value interface{}, fields
|
||||
}
|
||||
}
|
||||
m[fields[len(fields)-1]] = value
|
||||
return true
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetNestedStringSlice sets the string slice value of a nested field.
|
||||
// Returns false if value cannot be set because one of the nesting levels is not a map[string]interface{}.
|
||||
func SetNestedStringSlice(obj map[string]interface{}, value []string, fields ...string) bool {
|
||||
// Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}.
|
||||
func SetNestedStringSlice(obj map[string]interface{}, value []string, fields ...string) error {
|
||||
m := make([]interface{}, 0, len(value)) // convert []string into []interface{}
|
||||
for _, v := range value {
|
||||
m = append(m, v)
|
||||
@ -210,14 +228,14 @@ func SetNestedStringSlice(obj map[string]interface{}, value []string, fields ...
|
||||
}
|
||||
|
||||
// SetNestedSlice sets the slice value of a nested field.
|
||||
// Returns false if value cannot be set because one of the nesting levels is not a map[string]interface{}.
|
||||
func SetNestedSlice(obj map[string]interface{}, value []interface{}, fields ...string) bool {
|
||||
// Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}.
|
||||
func SetNestedSlice(obj map[string]interface{}, value []interface{}, fields ...string) error {
|
||||
return SetNestedField(obj, value, fields...)
|
||||
}
|
||||
|
||||
// SetNestedStringMap sets the map[string]string value of a nested field.
|
||||
// Returns false if value cannot be set because one of the nesting levels is not a map[string]interface{}.
|
||||
func SetNestedStringMap(obj map[string]interface{}, value map[string]string, fields ...string) bool {
|
||||
// Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}.
|
||||
func SetNestedStringMap(obj map[string]interface{}, value map[string]string, fields ...string) error {
|
||||
m := make(map[string]interface{}, len(value)) // convert map[string]string into map[string]interface{}
|
||||
for k, v := range value {
|
||||
m[k] = v
|
||||
@ -226,8 +244,8 @@ func SetNestedStringMap(obj map[string]interface{}, value map[string]string, fie
|
||||
}
|
||||
|
||||
// SetNestedMap sets the map[string]interface{} value of a nested field.
|
||||
// Returns false if value cannot be set because one of the nesting levels is not a map[string]interface{}.
|
||||
func SetNestedMap(obj map[string]interface{}, value map[string]interface{}, fields ...string) bool {
|
||||
// Returns an error if value cannot be set because one of the nesting levels is not a map[string]interface{}.
|
||||
func SetNestedMap(obj map[string]interface{}, value map[string]interface{}, fields ...string) error {
|
||||
return SetNestedField(obj, value, fields...)
|
||||
}
|
||||
|
||||
@ -245,22 +263,26 @@ func RemoveNestedField(obj map[string]interface{}, fields ...string) {
|
||||
}
|
||||
|
||||
func getNestedString(obj map[string]interface{}, fields ...string) string {
|
||||
val, ok := NestedString(obj, fields...)
|
||||
if !ok {
|
||||
val, found, err := NestedString(obj, fields...)
|
||||
if !found || err != nil {
|
||||
return ""
|
||||
}
|
||||
return val
|
||||
}
|
||||
|
||||
func jsonPath(fields []string) string {
|
||||
return "." + strings.Join(fields, ".")
|
||||
}
|
||||
|
||||
func extractOwnerReference(v map[string]interface{}) metav1.OwnerReference {
|
||||
// though this field is a *bool, but when decoded from JSON, it's
|
||||
// unmarshalled as bool.
|
||||
var controllerPtr *bool
|
||||
if controller, ok := NestedBool(v, "controller"); ok {
|
||||
if controller, found, err := NestedBool(v, "controller"); err == nil && found {
|
||||
controllerPtr = &controller
|
||||
}
|
||||
var blockOwnerDeletionPtr *bool
|
||||
if blockOwnerDeletion, ok := NestedBool(v, "blockOwnerDeletion"); ok {
|
||||
if blockOwnerDeletion, found, err := NestedBool(v, "blockOwnerDeletion"); err == nil && found {
|
||||
blockOwnerDeletionPtr = &blockOwnerDeletion
|
||||
}
|
||||
return metav1.OwnerReference{
|
||||
|
22
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go
generated
vendored
22
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go
generated
vendored
@ -138,8 +138,8 @@ func (u *Unstructured) setNestedMap(value map[string]string, fields ...string) {
|
||||
}
|
||||
|
||||
func (u *Unstructured) GetOwnerReferences() []metav1.OwnerReference {
|
||||
field, ok := nestedFieldNoCopy(u.Object, "metadata", "ownerReferences")
|
||||
if !ok {
|
||||
field, found, err := nestedFieldNoCopy(u.Object, "metadata", "ownerReferences")
|
||||
if !found || err != nil {
|
||||
return nil
|
||||
}
|
||||
original, ok := field.([]interface{})
|
||||
@ -228,8 +228,8 @@ func (u *Unstructured) SetResourceVersion(version string) {
|
||||
}
|
||||
|
||||
func (u *Unstructured) GetGeneration() int64 {
|
||||
val, ok := NestedInt64(u.Object, "metadata", "generation")
|
||||
if !ok {
|
||||
val, found, err := NestedInt64(u.Object, "metadata", "generation")
|
||||
if !found || err != nil {
|
||||
return 0
|
||||
}
|
||||
return val
|
||||
@ -289,8 +289,8 @@ func (u *Unstructured) SetDeletionTimestamp(timestamp *metav1.Time) {
|
||||
}
|
||||
|
||||
func (u *Unstructured) GetDeletionGracePeriodSeconds() *int64 {
|
||||
val, ok := NestedInt64(u.Object, "metadata", "deletionGracePeriodSeconds")
|
||||
if !ok {
|
||||
val, found, err := NestedInt64(u.Object, "metadata", "deletionGracePeriodSeconds")
|
||||
if !found || err != nil {
|
||||
return nil
|
||||
}
|
||||
return &val
|
||||
@ -305,7 +305,7 @@ func (u *Unstructured) SetDeletionGracePeriodSeconds(deletionGracePeriodSeconds
|
||||
}
|
||||
|
||||
func (u *Unstructured) GetLabels() map[string]string {
|
||||
m, _ := NestedStringMap(u.Object, "metadata", "labels")
|
||||
m, _, _ := NestedStringMap(u.Object, "metadata", "labels")
|
||||
return m
|
||||
}
|
||||
|
||||
@ -314,7 +314,7 @@ func (u *Unstructured) SetLabels(labels map[string]string) {
|
||||
}
|
||||
|
||||
func (u *Unstructured) GetAnnotations() map[string]string {
|
||||
m, _ := NestedStringMap(u.Object, "metadata", "annotations")
|
||||
m, _, _ := NestedStringMap(u.Object, "metadata", "annotations")
|
||||
return m
|
||||
}
|
||||
|
||||
@ -337,8 +337,8 @@ func (u *Unstructured) GroupVersionKind() schema.GroupVersionKind {
|
||||
}
|
||||
|
||||
func (u *Unstructured) GetInitializers() *metav1.Initializers {
|
||||
m, ok := nestedMapNoCopy(u.Object, "metadata", "initializers")
|
||||
if !ok {
|
||||
m, found, err := nestedMapNoCopy(u.Object, "metadata", "initializers")
|
||||
if !found || err != nil {
|
||||
return nil
|
||||
}
|
||||
out := &metav1.Initializers{}
|
||||
@ -362,7 +362,7 @@ func (u *Unstructured) SetInitializers(initializers *metav1.Initializers) {
|
||||
}
|
||||
|
||||
func (u *Unstructured) GetFinalizers() []string {
|
||||
val, _ := NestedStringSlice(u.Object, "metadata", "finalizers")
|
||||
val, _, _ := NestedStringSlice(u.Object, "metadata", "finalizers")
|
||||
return val
|
||||
}
|
||||
|
||||
|
5
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list_test.go
generated
vendored
5
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list_test.go
generated
vendored
@ -35,8 +35,9 @@ func TestUnstructuredList(t *testing.T) {
|
||||
content := list.UnstructuredContent()
|
||||
items := content["items"].([]interface{})
|
||||
require.Len(t, items, 1)
|
||||
val, ok := NestedFieldCopy(items[0].(map[string]interface{}), "metadata", "name")
|
||||
require.True(t, ok)
|
||||
val, found, err := NestedFieldCopy(items[0].(map[string]interface{}), "metadata", "name")
|
||||
require.True(t, found)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "test", val)
|
||||
}
|
||||
|
||||
|
8
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/zz_generated.deepcopy.go
generated
vendored
8
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/zz_generated.deepcopy.go
generated
vendored
@ -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 unstructured
|
||||
|
||||
@ -35,9 +35,8 @@ func (in *Unstructured) DeepCopyInto(out *Unstructured) {
|
||||
func (in *Unstructured) 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.
|
||||
@ -51,7 +50,6 @@ func (in *UnstructuredList) DeepCopyInto(out *UnstructuredList) {
|
||||
func (in *UnstructuredList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
3
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/BUILD
generated
vendored
3
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/BUILD
generated
vendored
@ -9,8 +9,7 @@ load(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["validation_test.go"],
|
||||
importpath = "k8s.io/apimachinery/pkg/apis/meta/v1/validation",
|
||||
library = ":go_default_library",
|
||||
embed = [":go_default_library"],
|
||||
deps = ["//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library"],
|
||||
)
|
||||
|
||||
|
58
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go
generated
vendored
58
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go
generated
vendored
@ -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.
|
||||
@ -915,6 +904,26 @@ func (in *Timestamp) DeepCopy() *Timestamp {
|
||||
return out
|
||||
}
|
||||
|
||||
// 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
|
||||
@ -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
|
||||
}
|
||||
|
2
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go
generated
vendored
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user