Commit 5bbdfc66 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #48544 from sttts/sttts-typed-deepcopy-1.8

Automatic merge from submit-queue (batch tested with PRs 46094, 48544, 48807, 49102, 44174) Static deepcopy – phase 1 This PR is the follow-up of https://github.com/kubernetes/kubernetes/pull/36412, replacing the dynamic reflection based deepcopy with static DeepCopy+DeepCopyInto methods on API types. This PR **does not yet** include the code dropping the cloner from the scheme and all the porting of the calls to scheme.Copy. This will be part of a follow-up "Phase 2" PR. A couple of the commits will go in first: - [x] audit: fix deepcopy registration https://github.com/kubernetes/kubernetes/pull/48599 - [x] apimachinery+apiserver: separate test types in their own packages #48601 - [x] client-go: remove TPR example #48604 - [x] apimachinery: remove unneeded GetObjectKind() impls #48608 - [x] sanity check against origin, that OpenShift's types are fine for static deepcopy https://github.com/deads2k/origin/pull/34 TODO **after** review here: - [x] merge https://github.com/kubernetes/gengo/pull/32 and update vendoring commit
parents ac742fa9 8dd0989b
...@@ -2231,7 +2231,6 @@ ...@@ -2231,7 +2231,6 @@
}, },
{ {
"ImportPath": "github.com/pelletier/go-buffruneio", "ImportPath": "github.com/pelletier/go-buffruneio",
"Comment": "v0.1.0",
"Rev": "df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d" "Rev": "df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d"
}, },
{ {
...@@ -2985,43 +2984,43 @@ ...@@ -2985,43 +2984,43 @@
}, },
{ {
"ImportPath": "k8s.io/gengo/args", "ImportPath": "k8s.io/gengo/args",
"Rev": "c79c13d131b0a8f42d05faa6491c12e94ccc6f30" "Rev": "712a17394a0980fabbcf3d968972e185d80c0fa4"
}, },
{ {
"ImportPath": "k8s.io/gengo/examples/deepcopy-gen/generators", "ImportPath": "k8s.io/gengo/examples/deepcopy-gen/generators",
"Rev": "c79c13d131b0a8f42d05faa6491c12e94ccc6f30" "Rev": "712a17394a0980fabbcf3d968972e185d80c0fa4"
}, },
{ {
"ImportPath": "k8s.io/gengo/examples/defaulter-gen/generators", "ImportPath": "k8s.io/gengo/examples/defaulter-gen/generators",
"Rev": "c79c13d131b0a8f42d05faa6491c12e94ccc6f30" "Rev": "712a17394a0980fabbcf3d968972e185d80c0fa4"
}, },
{ {
"ImportPath": "k8s.io/gengo/examples/import-boss/generators", "ImportPath": "k8s.io/gengo/examples/import-boss/generators",
"Rev": "c79c13d131b0a8f42d05faa6491c12e94ccc6f30" "Rev": "712a17394a0980fabbcf3d968972e185d80c0fa4"
}, },
{ {
"ImportPath": "k8s.io/gengo/examples/set-gen/generators", "ImportPath": "k8s.io/gengo/examples/set-gen/generators",
"Rev": "c79c13d131b0a8f42d05faa6491c12e94ccc6f30" "Rev": "712a17394a0980fabbcf3d968972e185d80c0fa4"
}, },
{ {
"ImportPath": "k8s.io/gengo/examples/set-gen/sets", "ImportPath": "k8s.io/gengo/examples/set-gen/sets",
"Rev": "c79c13d131b0a8f42d05faa6491c12e94ccc6f30" "Rev": "712a17394a0980fabbcf3d968972e185d80c0fa4"
}, },
{ {
"ImportPath": "k8s.io/gengo/generator", "ImportPath": "k8s.io/gengo/generator",
"Rev": "c79c13d131b0a8f42d05faa6491c12e94ccc6f30" "Rev": "712a17394a0980fabbcf3d968972e185d80c0fa4"
}, },
{ {
"ImportPath": "k8s.io/gengo/namer", "ImportPath": "k8s.io/gengo/namer",
"Rev": "c79c13d131b0a8f42d05faa6491c12e94ccc6f30" "Rev": "712a17394a0980fabbcf3d968972e185d80c0fa4"
}, },
{ {
"ImportPath": "k8s.io/gengo/parser", "ImportPath": "k8s.io/gengo/parser",
"Rev": "c79c13d131b0a8f42d05faa6491c12e94ccc6f30" "Rev": "712a17394a0980fabbcf3d968972e185d80c0fa4"
}, },
{ {
"ImportPath": "k8s.io/gengo/types", "ImportPath": "k8s.io/gengo/types",
"Rev": "c79c13d131b0a8f42d05faa6491c12e94ccc6f30" "Rev": "712a17394a0980fabbcf3d968972e185d80c0fa4"
}, },
{ {
"ImportPath": "k8s.io/heapster/metrics/api/v1/types", "ImportPath": "k8s.io/heapster/metrics/api/v1/types",
......
...@@ -13,10 +13,12 @@ go_library( ...@@ -13,10 +13,12 @@ go_library(
"doc.go", "doc.go",
"register.go", "register.go",
"types.go", "types.go",
"zz_generated.deepcopy.go",
], ],
tags = ["automanaged"], tags = ["automanaged"],
deps = [ deps = [
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
], ],
......
...@@ -14,5 +14,6 @@ See the License for the specific language governing permissions and ...@@ -14,5 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register
// +groupName=kubeadm.k8s.io // +groupName=kubeadm.k8s.io
package kubeadm // import "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" package kubeadm // import "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
...@@ -22,6 +22,8 @@ import ( ...@@ -22,6 +22,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type MasterConfiguration struct { type MasterConfiguration struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -86,6 +88,8 @@ type Etcd struct { ...@@ -86,6 +88,8 @@ type Etcd struct {
Image string Image string
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type NodeConfiguration struct { type NodeConfiguration struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -14,12 +14,14 @@ go_library( ...@@ -14,12 +14,14 @@ go_library(
"doc.go", "doc.go",
"register.go", "register.go",
"types.go", "types.go",
"zz_generated.deepcopy.go",
"zz_generated.defaults.go", "zz_generated.defaults.go",
], ],
tags = ["automanaged"], tags = ["automanaged"],
deps = [ deps = [
"//cmd/kubeadm/app/constants:go_default_library", "//cmd/kubeadm/app/constants:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
], ],
......
...@@ -16,4 +16,5 @@ limitations under the License. ...@@ -16,4 +16,5 @@ limitations under the License.
// +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen=TypeMeta
// +groupName=kubeadm.k8s.io // +groupName=kubeadm.k8s.io
// +k8s:deepcopy-gen=package
package v1alpha1 // import "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1" package v1alpha1 // import "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1"
...@@ -22,6 +22,8 @@ import ( ...@@ -22,6 +22,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type MasterConfiguration struct { type MasterConfiguration struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
...@@ -86,6 +88,8 @@ type Etcd struct { ...@@ -86,6 +88,8 @@ type Etcd struct {
Image string `json:"image"` Image string `json:"image"`
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type NodeConfiguration struct { type NodeConfiguration struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
......
// +build !ignore_autogenerated
/*
Copyright 2017 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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package v1alpha1
import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)
// Deprecated: GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*API).DeepCopyInto(out.(*API))
return nil
}, InType: reflect.TypeOf(&API{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Etcd).DeepCopyInto(out.(*Etcd))
return nil
}, InType: reflect.TypeOf(&Etcd{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*MasterConfiguration).DeepCopyInto(out.(*MasterConfiguration))
return nil
}, InType: reflect.TypeOf(&MasterConfiguration{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Networking).DeepCopyInto(out.(*Networking))
return nil
}, InType: reflect.TypeOf(&Networking{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*NodeConfiguration).DeepCopyInto(out.(*NodeConfiguration))
return nil
}, InType: reflect.TypeOf(&NodeConfiguration{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TokenDiscovery).DeepCopyInto(out.(*TokenDiscovery))
return nil
}, InType: reflect.TypeOf(&TokenDiscovery{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *API) DeepCopyInto(out *API) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new API.
func (x *API) DeepCopy() *API {
if x == nil {
return nil
}
out := new(API)
x.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Etcd) DeepCopyInto(out *Etcd) {
*out = *in
if in.Endpoints != nil {
in, out := &in.Endpoints, &out.Endpoints
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ExtraArgs != nil {
in, out := &in.ExtraArgs, &out.ExtraArgs
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Etcd.
func (x *Etcd) DeepCopy() *Etcd {
if x == nil {
return nil
}
out := new(Etcd)
x.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MasterConfiguration) DeepCopyInto(out *MasterConfiguration) {
*out = *in
out.TypeMeta = in.TypeMeta
out.API = in.API
in.Etcd.DeepCopyInto(&out.Etcd)
out.Networking = in.Networking
if in.AuthorizationModes != nil {
in, out := &in.AuthorizationModes, &out.AuthorizationModes
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.APIServerExtraArgs != nil {
in, out := &in.APIServerExtraArgs, &out.APIServerExtraArgs
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.ControllerManagerExtraArgs != nil {
in, out := &in.ControllerManagerExtraArgs, &out.ControllerManagerExtraArgs
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.SchedulerExtraArgs != nil {
in, out := &in.SchedulerExtraArgs, &out.SchedulerExtraArgs
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.APIServerCertSANs != nil {
in, out := &in.APIServerCertSANs, &out.APIServerCertSANs
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new MasterConfiguration.
func (x *MasterConfiguration) DeepCopy() *MasterConfiguration {
if x == nil {
return nil
}
out := new(MasterConfiguration)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *MasterConfiguration) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Networking) DeepCopyInto(out *Networking) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Networking.
func (x *Networking) DeepCopy() *Networking {
if x == nil {
return nil
}
out := new(Networking)
x.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NodeConfiguration) DeepCopyInto(out *NodeConfiguration) {
*out = *in
out.TypeMeta = in.TypeMeta
if in.DiscoveryTokenAPIServers != nil {
in, out := &in.DiscoveryTokenAPIServers, &out.DiscoveryTokenAPIServers
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfiguration.
func (x *NodeConfiguration) DeepCopy() *NodeConfiguration {
if x == nil {
return nil
}
out := new(NodeConfiguration)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *NodeConfiguration) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TokenDiscovery) DeepCopyInto(out *TokenDiscovery) {
*out = *in
if in.Addresses != nil {
in, out := &in.Addresses, &out.Addresses
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new TokenDiscovery.
func (x *TokenDiscovery) DeepCopy() *TokenDiscovery {
if x == nil {
return nil
}
out := new(TokenDiscovery)
x.DeepCopyInto(out)
return out
}
// +build !ignore_autogenerated
/*
Copyright 2017 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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package kubeadm
import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)
// Deprecated: register deep-copy functions.
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*API).DeepCopyInto(out.(*API))
return nil
}, InType: reflect.TypeOf(&API{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Etcd).DeepCopyInto(out.(*Etcd))
return nil
}, InType: reflect.TypeOf(&Etcd{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*MasterConfiguration).DeepCopyInto(out.(*MasterConfiguration))
return nil
}, InType: reflect.TypeOf(&MasterConfiguration{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Networking).DeepCopyInto(out.(*Networking))
return nil
}, InType: reflect.TypeOf(&Networking{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*NodeConfiguration).DeepCopyInto(out.(*NodeConfiguration))
return nil
}, InType: reflect.TypeOf(&NodeConfiguration{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TokenDiscovery).DeepCopyInto(out.(*TokenDiscovery))
return nil
}, InType: reflect.TypeOf(&TokenDiscovery{})},
)
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *API) DeepCopyInto(out *API) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new API.
func (x *API) DeepCopy() *API {
if x == nil {
return nil
}
out := new(API)
x.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Etcd) DeepCopyInto(out *Etcd) {
*out = *in
if in.Endpoints != nil {
in, out := &in.Endpoints, &out.Endpoints
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ExtraArgs != nil {
in, out := &in.ExtraArgs, &out.ExtraArgs
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Etcd.
func (x *Etcd) DeepCopy() *Etcd {
if x == nil {
return nil
}
out := new(Etcd)
x.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MasterConfiguration) DeepCopyInto(out *MasterConfiguration) {
*out = *in
out.TypeMeta = in.TypeMeta
out.API = in.API
in.Etcd.DeepCopyInto(&out.Etcd)
out.Networking = in.Networking
if in.AuthorizationModes != nil {
in, out := &in.AuthorizationModes, &out.AuthorizationModes
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.APIServerExtraArgs != nil {
in, out := &in.APIServerExtraArgs, &out.APIServerExtraArgs
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.ControllerManagerExtraArgs != nil {
in, out := &in.ControllerManagerExtraArgs, &out.ControllerManagerExtraArgs
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.SchedulerExtraArgs != nil {
in, out := &in.SchedulerExtraArgs, &out.SchedulerExtraArgs
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.APIServerCertSANs != nil {
in, out := &in.APIServerCertSANs, &out.APIServerCertSANs
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new MasterConfiguration.
func (x *MasterConfiguration) DeepCopy() *MasterConfiguration {
if x == nil {
return nil
}
out := new(MasterConfiguration)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *MasterConfiguration) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Networking) DeepCopyInto(out *Networking) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Networking.
func (x *Networking) DeepCopy() *Networking {
if x == nil {
return nil
}
out := new(Networking)
x.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NodeConfiguration) DeepCopyInto(out *NodeConfiguration) {
*out = *in
out.TypeMeta = in.TypeMeta
if in.DiscoveryTokenAPIServers != nil {
in, out := &in.DiscoveryTokenAPIServers, &out.DiscoveryTokenAPIServers
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfiguration.
func (x *NodeConfiguration) DeepCopy() *NodeConfiguration {
if x == nil {
return nil
}
out := new(NodeConfiguration)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *NodeConfiguration) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TokenDiscovery) DeepCopyInto(out *TokenDiscovery) {
*out = *in
if in.Addresses != nil {
in, out := &in.Addresses, &out.Addresses
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new TokenDiscovery.
func (x *TokenDiscovery) DeepCopy() *TokenDiscovery {
if x == nil {
return nil
}
out := new(TokenDiscovery)
x.DeepCopyInto(out)
return out
}
...@@ -13,10 +13,12 @@ go_library( ...@@ -13,10 +13,12 @@ go_library(
"doc.go", "doc.go",
"register.go", "register.go",
"types.go", "types.go",
"zz_generated.deepcopy.go",
], ],
tags = ["automanaged"], tags = ["automanaged"],
deps = [ deps = [
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
], ],
......
...@@ -14,5 +14,6 @@ See the License for the specific language governing permissions and ...@@ -14,5 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register
// +groupName=testgroup.k8s.io // +groupName=testgroup.k8s.io
package testgroup // import "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup" package testgroup // import "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup"
...@@ -19,6 +19,7 @@ package testgroup ...@@ -19,6 +19,7 @@ package testgroup
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type TestType struct { type TestType struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -26,6 +27,8 @@ type TestType struct { ...@@ -26,6 +27,8 @@ type TestType struct {
Status TestTypeStatus Status TestTypeStatus
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type TestTypeList struct { type TestTypeList struct {
metav1.TypeMeta metav1.TypeMeta
metav1.ListMeta metav1.ListMeta
......
...@@ -14,11 +14,13 @@ go_library( ...@@ -14,11 +14,13 @@ go_library(
"register.go", "register.go",
"types.generated.go", "types.generated.go",
"types.go", "types.go",
"zz_generated.deepcopy.go",
], ],
tags = ["automanaged"], tags = ["automanaged"],
deps = [ deps = [
"//vendor/github.com/ugorji/go/codec:go_default_library", "//vendor/github.com/ugorji/go/codec:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
......
...@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and ...@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true // +k8s:openapi-gen=true
// +groupName=testgroup.k8s.io // +groupName=testgroup.k8s.io
package v1 package v1
...@@ -19,6 +19,7 @@ package v1 ...@@ -19,6 +19,7 @@ package v1
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type TestType struct { type TestType struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
...@@ -32,6 +33,8 @@ type TestType struct { ...@@ -32,6 +33,8 @@ type TestType struct {
Status TestTypeStatus `json:"status,omitempty"` Status TestTypeStatus `json:"status,omitempty"`
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type TestTypeList struct { type TestTypeList struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
// +optional // +optional
......
// +build !ignore_autogenerated
/*
Copyright 2017 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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package v1
import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)
// Deprecated: register deep-copy functions.
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestType).DeepCopyInto(out.(*TestType))
return nil
}, InType: reflect.TypeOf(&TestType{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestTypeList).DeepCopyInto(out.(*TestTypeList))
return nil
}, InType: reflect.TypeOf(&TestTypeList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestTypeStatus).DeepCopyInto(out.(*TestTypeStatus))
return nil
}, InType: reflect.TypeOf(&TestTypeStatus{})},
)
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestType) DeepCopyInto(out *TestType) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Status = in.Status
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new TestType.
func (x *TestType) DeepCopy() *TestType {
if x == nil {
return nil
}
out := new(TestType)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *TestType) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestTypeList) DeepCopyInto(out *TestTypeList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]TestType, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeList.
func (x *TestTypeList) DeepCopy() *TestTypeList {
if x == nil {
return nil
}
out := new(TestTypeList)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *TestTypeList) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestTypeStatus) DeepCopyInto(out *TestTypeStatus) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeStatus.
func (x *TestTypeStatus) DeepCopy() *TestTypeStatus {
if x == nil {
return nil
}
out := new(TestTypeStatus)
x.DeepCopyInto(out)
return out
}
// +build !ignore_autogenerated
/*
Copyright 2017 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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package testgroup
import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)
// Deprecated: register deep-copy functions.
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestType).DeepCopyInto(out.(*TestType))
return nil
}, InType: reflect.TypeOf(&TestType{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestTypeList).DeepCopyInto(out.(*TestTypeList))
return nil
}, InType: reflect.TypeOf(&TestTypeList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestTypeStatus).DeepCopyInto(out.(*TestTypeStatus))
return nil
}, InType: reflect.TypeOf(&TestTypeStatus{})},
)
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestType) DeepCopyInto(out *TestType) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Status = in.Status
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new TestType.
func (x *TestType) DeepCopy() *TestType {
if x == nil {
return nil
}
out := new(TestType)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *TestType) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestTypeList) DeepCopyInto(out *TestTypeList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]TestType, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeList.
func (x *TestTypeList) DeepCopy() *TestTypeList {
if x == nil {
return nil
}
out := new(TestTypeList)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *TestTypeList) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestTypeStatus) DeepCopyInto(out *TestTypeStatus) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeStatus.
func (x *TestTypeStatus) DeepCopy() *TestTypeStatus {
if x == nil {
return nil
}
out := new(TestTypeStatus)
x.DeepCopyInto(out)
return out
}
...@@ -93,6 +93,7 @@ type ClusterStatus struct { ...@@ -93,6 +93,7 @@ type ClusterStatus struct {
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation. // Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation.
type Cluster struct { type Cluster struct {
...@@ -110,6 +111,8 @@ type Cluster struct { ...@@ -110,6 +111,8 @@ type Cluster struct {
Status ClusterStatus Status ClusterStatus
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// A list of all the kubernetes clusters registered to the federation // A list of all the kubernetes clusters registered to the federation
type ClusterList struct { type ClusterList struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -93,6 +93,7 @@ type ClusterStatus struct { ...@@ -93,6 +93,7 @@ type ClusterStatus struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +nonNamespaced=true // +nonNamespaced=true
// Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation. // Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation.
...@@ -111,6 +112,8 @@ type Cluster struct { ...@@ -111,6 +112,8 @@ type Cluster struct {
Status ClusterStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` Status ClusterStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// A list of all the kubernetes clusters registered to the federation // A list of all the kubernetes clusters registered to the federation
type ClusterList struct { type ClusterList struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
......
...@@ -61,7 +61,10 @@ func init() { ...@@ -61,7 +61,10 @@ func init() {
} }
if err := scheme.AddGeneratedDeepCopyFuncs( if err := scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{ conversion.GeneratedDeepCopyFunc{
Fn: metav1.DeepCopy_v1_Time, Fn: func(in, out interface{}, c *conversion.Cloner) error {
in.(*metav1.Time).DeepCopyInto(out.(*metav1.Time))
return nil
},
InType: reflect.TypeOf(&metav1.Time{}), InType: reflect.TypeOf(&metav1.Time{}),
}, },
); err != nil { ); err != nil {
......
...@@ -589,6 +589,7 @@ staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer ...@@ -589,6 +589,7 @@ staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer
staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1 staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1
staging/src/k8s.io/apimachinery/pkg/conversion staging/src/k8s.io/apimachinery/pkg/conversion
staging/src/k8s.io/apimachinery/pkg/conversion/unstructured staging/src/k8s.io/apimachinery/pkg/conversion/unstructured
staging/src/k8s.io/apimachinery/pkg/labels
staging/src/k8s.io/apimachinery/pkg/openapi staging/src/k8s.io/apimachinery/pkg/openapi
staging/src/k8s.io/apimachinery/pkg/runtime/schema staging/src/k8s.io/apimachinery/pkg/runtime/schema
staging/src/k8s.io/apimachinery/pkg/runtime/serializer staging/src/k8s.io/apimachinery/pkg/runtime/serializer
......
...@@ -39,7 +39,7 @@ function kfind() { ...@@ -39,7 +39,7 @@ function kfind() {
# include the "special" vendor directories which are actually part # include the "special" vendor directories which are actually part
# of the Kubernetes source tree - generators will use these for # of the Kubernetes source tree - generators will use these for
# including certain core API concepts. # including certain core API concepts.
find -H . ./vendor/k8s.io/apimachinery ./vendor/k8s.io/apiserver ./vendor/k8s.io/kube-aggregator ./vendor/k8s.io/apiextensions-apiserver ./vendor/k8s.io/metrics ./vendor/k8s.io/sample-apiserver ./vendor/k8s.io/api \ find -H . ./vendor/k8s.io/apimachinery ./vendor/k8s.io/apiserver ./vendor/k8s.io/kube-aggregator ./vendor/k8s.io/apiextensions-apiserver ./vendor/k8s.io/metrics ./vendor/k8s.io/sample-apiserver ./vendor/k8s.io/api ./vendor/k8s.io/client-go \
\( \ \( \
-not \( \ -not \( \
\( \ \( \
......
...@@ -29,12 +29,23 @@ import ( ...@@ -29,12 +29,23 @@ import (
type FakeAPIObject struct{} type FakeAPIObject struct{}
func (obj *FakeAPIObject) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } func (obj *FakeAPIObject) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
func (obj *FakeAPIObject) DeepCopyObject() runtime.Object {
if obj == nil {
return nil
}
clone := *obj
return &clone
}
type ExtensionAPIObject struct { type ExtensionAPIObject struct {
metav1.TypeMeta metav1.TypeMeta
metav1.ObjectMeta metav1.ObjectMeta
} }
func (obj *ExtensionAPIObject) DeepCopyObject() runtime.Object {
panic("ExtensionAPIObject does not support DeepCopy")
}
func TestGetReference(t *testing.T) { func TestGetReference(t *testing.T) {
// when vendoring kube, if you don't force the set of registered versions (like make test does) // when vendoring kube, if you don't force the set of registered versions (like make test does)
......
...@@ -33,11 +33,11 @@ type Time struct { ...@@ -33,11 +33,11 @@ type Time struct {
time.Time `protobuf:"-"` time.Time `protobuf:"-"`
} }
// DeepCopy returns a deep-copy of the Time value. The underlying time.Time // DeepCopyInto creates a deep-copy of the Time value. The underlying time.Time
// type is effectively immutable in the time API, so it is safe to // type is effectively immutable in the time API, so it is safe to
// copy-by-assign, despite the presence of (unexported) Pointer fields. // copy-by-assign, despite the presence of (unexported) Pointer fields.
func (t Time) DeepCopy() Time { func (t *Time) DeepCopyInto(out *Time) {
return t *out = *t
} }
// String returns the representation of the time. // String returns the representation of the time.
......
...@@ -23,6 +23,8 @@ package unversioned ...@@ -23,6 +23,8 @@ package unversioned
// TypeMeta describes an individual object in an API response or request // TypeMeta describes an individual object in an API response or request
// with strings representing the type of the object and its API schema version. // with strings representing the type of the object and its API schema version.
// Structures that are versioned or persisted should inline TypeMeta. // Structures that are versioned or persisted should inline TypeMeta.
//
// +k8s:deepcopy-gen=false
type TypeMeta struct { type TypeMeta struct {
// Kind is a string value representing the REST resource this object represents. // Kind is a string value representing the REST resource this object represents.
// Servers may infer this from the endpoint the client submits requests to. // Servers may infer this from the endpoint the client submits requests to.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -10,12 +10,15 @@ load( ...@@ -10,12 +10,15 @@ load(
go_library( go_library(
name = "go_default_library", name = "go_default_library",
srcs = [ srcs = [
"doc.go",
"register.go", "register.go",
"types.go", "types.go",
"zz_generated.deepcopy.go",
], ],
tags = ["automanaged"], tags = ["automanaged"],
deps = [ deps = [
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
......
/*
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.
*/
// +k8s:deepcopy-gen=package
package abac
...@@ -20,6 +20,8 @@ import ( ...@@ -20,6 +20,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Policy contains a single ABAC policy rule // Policy contains a single ABAC policy rule
type Policy struct { type Policy struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -12,8 +12,10 @@ go_library( ...@@ -12,8 +12,10 @@ go_library(
name = "go_default_library", name = "go_default_library",
srcs = [ srcs = [
"conversion.go", "conversion.go",
"doc.go",
"register.go", "register.go",
"types.go", "types.go",
"zz_generated.deepcopy.go",
], ],
tags = ["automanaged"], tags = ["automanaged"],
deps = [ deps = [
......
/*
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.
*/
// +k8s:deepcopy-gen=package,register
// +groupName=abac.authorization.kubernetes.io
package v0 // import "k8s.io/kubernetes/pkg/apis/abac/v0"
...@@ -21,6 +21,8 @@ import ( ...@@ -21,6 +21,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Policy contains a single ABAC policy rule // Policy contains a single ABAC policy rule
type Policy struct { type Policy struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
......
// +build !ignore_autogenerated
/*
Copyright 2017 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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package v0
import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)
// Deprecated: register deep-copy functions.
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Policy).DeepCopyInto(out.(*Policy))
return nil
}, InType: reflect.TypeOf(&Policy{})},
)
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Policy) DeepCopyInto(out *Policy) {
*out = *in
out.TypeMeta = in.TypeMeta
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
func (x *Policy) DeepCopy() *Policy {
if x == nil {
return nil
}
out := new(Policy)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *Policy) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
...@@ -21,6 +21,8 @@ import ( ...@@ -21,6 +21,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Policy contains a single ABAC policy rule // Policy contains a single ABAC policy rule
type Policy struct { type Policy struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
......
...@@ -26,35 +26,65 @@ import ( ...@@ -26,35 +26,65 @@ import (
reflect "reflect" reflect "reflect"
) )
// Deprecated: register deep-copy functions.
func init() { func init() {
SchemeBuilder.Register(RegisterDeepCopies) SchemeBuilder.Register(RegisterDeepCopies)
} }
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes. // to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error { func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs( return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Policy, InType: reflect.TypeOf(&Policy{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PolicySpec, InType: reflect.TypeOf(&PolicySpec{})}, in.(*Policy).DeepCopyInto(out.(*Policy))
return nil
}, InType: reflect.TypeOf(&Policy{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PolicySpec).DeepCopyInto(out.(*PolicySpec))
return nil
}, InType: reflect.TypeOf(&PolicySpec{})},
) )
} }
// DeepCopy_v1beta1_Policy is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_v1beta1_Policy(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *Policy) DeepCopyInto(out *Policy) {
{ *out = *in
in := in.(*Policy) out.TypeMeta = in.TypeMeta
out := out.(*Policy) out.Spec = in.Spec
*out = *in return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
func (x *Policy) DeepCopy() *Policy {
if x == nil {
return nil
}
out := new(Policy)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *Policy) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil return nil
} }
} }
// DeepCopy_v1beta1_PolicySpec is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_v1beta1_PolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *PolicySpec) DeepCopyInto(out *PolicySpec) {
{ *out = *in
in := in.(*PolicySpec) return
out := out.(*PolicySpec) }
*out = *in
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PolicySpec.
func (x *PolicySpec) DeepCopy() *PolicySpec {
if x == nil {
return nil return nil
} }
out := new(PolicySpec)
x.DeepCopyInto(out)
return out
} }
// +build !ignore_autogenerated
/*
Copyright 2017 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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package abac
import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)
// Deprecated: GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Policy).DeepCopyInto(out.(*Policy))
return nil
}, InType: reflect.TypeOf(&Policy{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PolicySpec).DeepCopyInto(out.(*PolicySpec))
return nil
}, InType: reflect.TypeOf(&PolicySpec{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Policy) DeepCopyInto(out *Policy) {
*out = *in
out.TypeMeta = in.TypeMeta
out.Spec = in.Spec
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
func (x *Policy) DeepCopy() *Policy {
if x == nil {
return nil
}
out := new(Policy)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *Policy) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PolicySpec) DeepCopyInto(out *PolicySpec) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PolicySpec.
func (x *PolicySpec) DeepCopy() *PolicySpec {
if x == nil {
return nil
}
out := new(PolicySpec)
x.DeepCopyInto(out)
return out
}
...@@ -23,6 +23,8 @@ import ( ...@@ -23,6 +23,8 @@ import (
"k8s.io/kubernetes/pkg/apis/authentication" "k8s.io/kubernetes/pkg/apis/authentication"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// AdmissionReview describes an admission request. // AdmissionReview describes an admission request.
type AdmissionReview struct { type AdmissionReview struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -23,6 +23,8 @@ import ( ...@@ -23,6 +23,8 @@ import (
"k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/admission"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// AdmissionReview describes an admission request. // AdmissionReview describes an admission request.
type AdmissionReview struct { type AdmissionReview struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
......
...@@ -21,80 +21,106 @@ limitations under the License. ...@@ -21,80 +21,106 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
v1 "k8s.io/api/authentication/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
// Deprecated: register deep-copy functions.
func init() { func init() {
SchemeBuilder.Register(RegisterDeepCopies) SchemeBuilder.Register(RegisterDeepCopies)
} }
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes. // to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error { func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs( return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_AdmissionReview, InType: reflect.TypeOf(&AdmissionReview{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_AdmissionReviewSpec, InType: reflect.TypeOf(&AdmissionReviewSpec{})}, in.(*AdmissionReview).DeepCopyInto(out.(*AdmissionReview))
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_AdmissionReviewStatus, InType: reflect.TypeOf(&AdmissionReviewStatus{})}, return nil
}, InType: reflect.TypeOf(&AdmissionReview{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*AdmissionReviewSpec).DeepCopyInto(out.(*AdmissionReviewSpec))
return nil
}, InType: reflect.TypeOf(&AdmissionReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*AdmissionReviewStatus).DeepCopyInto(out.(*AdmissionReviewStatus))
return nil
}, InType: reflect.TypeOf(&AdmissionReviewStatus{})},
) )
} }
// DeepCopy_v1alpha1_AdmissionReview is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_v1alpha1_AdmissionReview(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *AdmissionReview) DeepCopyInto(out *AdmissionReview) {
{ *out = *in
in := in.(*AdmissionReview) out.TypeMeta = in.TypeMeta
out := out.(*AdmissionReview) in.Spec.DeepCopyInto(&out.Spec)
*out = *in in.Status.DeepCopyInto(&out.Status)
if err := DeepCopy_v1alpha1_AdmissionReviewSpec(&in.Spec, &out.Spec, c); err != nil { return
return err }
}
if err := DeepCopy_v1alpha1_AdmissionReviewStatus(&in.Status, &out.Status, c); err != nil { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionReview.
return err func (x *AdmissionReview) DeepCopy() *AdmissionReview {
} if x == nil {
return nil return nil
} }
out := new(AdmissionReview)
x.DeepCopyInto(out)
return out
} }
// DeepCopy_v1alpha1_AdmissionReviewSpec is an autogenerated deepcopy function. // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func DeepCopy_v1alpha1_AdmissionReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error { func (x *AdmissionReview) DeepCopyObject() runtime.Object {
{ if c := x.DeepCopy(); c != nil {
in := in.(*AdmissionReviewSpec) return c
out := out.(*AdmissionReviewSpec) } else {
*out = *in
if newVal, err := c.DeepCopy(&in.Object); err != nil {
return err
} else {
out.Object = *newVal.(*runtime.RawExtension)
}
if newVal, err := c.DeepCopy(&in.OldObject); err != nil {
return err
} else {
out.OldObject = *newVal.(*runtime.RawExtension)
}
if err := v1.DeepCopy_v1_UserInfo(&in.UserInfo, &out.UserInfo, c); err != nil {
return err
}
return nil return nil
} }
} }
// DeepCopy_v1alpha1_AdmissionReviewStatus is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_v1alpha1_AdmissionReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *AdmissionReviewSpec) DeepCopyInto(out *AdmissionReviewSpec) {
{ *out = *in
in := in.(*AdmissionReviewStatus) out.Kind = in.Kind
out := out.(*AdmissionReviewStatus) in.Object.DeepCopyInto(&out.Object)
*out = *in in.OldObject.DeepCopyInto(&out.OldObject)
if in.Result != nil { out.Resource = in.Resource
in, out := &in.Result, &out.Result in.UserInfo.DeepCopyInto(&out.UserInfo)
if newVal, err := c.DeepCopy(*in); err != nil { return
return err }
} else {
*out = newVal.(*meta_v1.Status) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionReviewSpec.
} func (x *AdmissionReviewSpec) DeepCopy() *AdmissionReviewSpec {
if x == nil {
return nil
}
out := new(AdmissionReviewSpec)
x.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AdmissionReviewStatus) DeepCopyInto(out *AdmissionReviewStatus) {
*out = *in
if in.Result != nil {
in, out := &in.Result, &out.Result
if *in == nil {
*out = nil
} else {
*out = new(v1.Status)
(*in).DeepCopyInto(*out)
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionReviewStatus.
func (x *AdmissionReviewStatus) DeepCopy() *AdmissionReviewStatus {
if x == nil {
return nil return nil
} }
out := new(AdmissionReviewStatus)
x.DeepCopyInto(out)
return out
} }
...@@ -24,83 +24,111 @@ import ( ...@@ -24,83 +24,111 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
authentication "k8s.io/kubernetes/pkg/apis/authentication"
reflect "reflect" reflect "reflect"
) )
// Deprecated: register deep-copy functions.
func init() { func init() {
SchemeBuilder.Register(RegisterDeepCopies) SchemeBuilder.Register(RegisterDeepCopies)
} }
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes. // to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error { func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs( return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admission_AdmissionReview, InType: reflect.TypeOf(&AdmissionReview{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admission_AdmissionReviewSpec, InType: reflect.TypeOf(&AdmissionReviewSpec{})}, in.(*AdmissionReview).DeepCopyInto(out.(*AdmissionReview))
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admission_AdmissionReviewStatus, InType: reflect.TypeOf(&AdmissionReviewStatus{})}, return nil
}, InType: reflect.TypeOf(&AdmissionReview{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*AdmissionReviewSpec).DeepCopyInto(out.(*AdmissionReviewSpec))
return nil
}, InType: reflect.TypeOf(&AdmissionReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*AdmissionReviewStatus).DeepCopyInto(out.(*AdmissionReviewStatus))
return nil
}, InType: reflect.TypeOf(&AdmissionReviewStatus{})},
) )
} }
// DeepCopy_admission_AdmissionReview is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_admission_AdmissionReview(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *AdmissionReview) DeepCopyInto(out *AdmissionReview) {
{ *out = *in
in := in.(*AdmissionReview) out.TypeMeta = in.TypeMeta
out := out.(*AdmissionReview) in.Spec.DeepCopyInto(&out.Spec)
*out = *in in.Status.DeepCopyInto(&out.Status)
if err := DeepCopy_admission_AdmissionReviewSpec(&in.Spec, &out.Spec, c); err != nil { return
return err }
}
if err := DeepCopy_admission_AdmissionReviewStatus(&in.Status, &out.Status, c); err != nil { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionReview.
return err func (x *AdmissionReview) DeepCopy() *AdmissionReview {
} if x == nil {
return nil return nil
} }
out := new(AdmissionReview)
x.DeepCopyInto(out)
return out
} }
// DeepCopy_admission_AdmissionReviewSpec is an autogenerated deepcopy function. // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func DeepCopy_admission_AdmissionReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error { func (x *AdmissionReview) DeepCopyObject() runtime.Object {
{ if c := x.DeepCopy(); c != nil {
in := in.(*AdmissionReviewSpec) return c
out := out.(*AdmissionReviewSpec) } else {
*out = *in return nil
// in.Object is kind 'Interface' }
if in.Object != nil { }
if newVal, err := c.DeepCopy(&in.Object); err != nil {
return err // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
} else { func (in *AdmissionReviewSpec) DeepCopyInto(out *AdmissionReviewSpec) {
out.Object = *newVal.(*runtime.Object) *out = *in
} out.Kind = in.Kind
} if in.Object == nil {
// in.OldObject is kind 'Interface' out.Object = nil
if in.OldObject != nil { } else {
if newVal, err := c.DeepCopy(&in.OldObject); err != nil { out.Object = in.Object.DeepCopyObject()
return err }
} else { if in.OldObject == nil {
out.OldObject = *newVal.(*runtime.Object) out.OldObject = nil
} } else {
} out.OldObject = in.OldObject.DeepCopyObject()
if err := authentication.DeepCopy_authentication_UserInfo(&in.UserInfo, &out.UserInfo, c); err != nil { }
return err out.Resource = in.Resource
} in.UserInfo.DeepCopyInto(&out.UserInfo)
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionReviewSpec.
func (x *AdmissionReviewSpec) DeepCopy() *AdmissionReviewSpec {
if x == nil {
return nil return nil
} }
out := new(AdmissionReviewSpec)
x.DeepCopyInto(out)
return out
} }
// DeepCopy_admission_AdmissionReviewStatus is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_admission_AdmissionReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *AdmissionReviewStatus) DeepCopyInto(out *AdmissionReviewStatus) {
{ *out = *in
in := in.(*AdmissionReviewStatus) if in.Result != nil {
out := out.(*AdmissionReviewStatus) in, out := &in.Result, &out.Result
*out = *in if *in == nil {
if in.Result != nil { *out = nil
in, out := &in.Result, &out.Result } else {
if newVal, err := c.DeepCopy(*in); err != nil { *out = new(v1.Status)
return err (*in).DeepCopyInto(*out)
} else {
*out = newVal.(*v1.Status)
}
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionReviewStatus.
func (x *AdmissionReviewStatus) DeepCopy() *AdmissionReviewStatus {
if x == nil {
return nil return nil
} }
out := new(AdmissionReviewStatus)
x.DeepCopyInto(out)
return out
} }
...@@ -22,6 +22,7 @@ import ( ...@@ -22,6 +22,7 @@ import (
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// InitializerConfiguration describes the configuration of initializers. // InitializerConfiguration describes the configuration of initializers.
type InitializerConfiguration struct { type InitializerConfiguration struct {
...@@ -40,6 +41,8 @@ type InitializerConfiguration struct { ...@@ -40,6 +41,8 @@ type InitializerConfiguration struct {
Initializers []Initializer Initializers []Initializer
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// InitializerConfigurationList is a list of InitializerConfiguration. // InitializerConfigurationList is a list of InitializerConfiguration.
type InitializerConfigurationList struct { type InitializerConfigurationList struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -120,6 +123,7 @@ const ( ...@@ -120,6 +123,7 @@ const (
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ExternalAdmissionHookConfiguration describes the configuration of initializers. // ExternalAdmissionHookConfiguration describes the configuration of initializers.
type ExternalAdmissionHookConfiguration struct { type ExternalAdmissionHookConfiguration struct {
...@@ -133,6 +137,8 @@ type ExternalAdmissionHookConfiguration struct { ...@@ -133,6 +137,8 @@ type ExternalAdmissionHookConfiguration struct {
ExternalAdmissionHooks []ExternalAdmissionHook ExternalAdmissionHooks []ExternalAdmissionHook
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration. // ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.
type ExternalAdmissionHookConfigurationList struct { type ExternalAdmissionHookConfigurationList struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -23,6 +23,7 @@ import ( ...@@ -23,6 +23,7 @@ import (
) )
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// StatefulSet represents a set of pods with consistent identities. // StatefulSet represents a set of pods with consistent identities.
// Identities are defined as: // Identities are defined as:
...@@ -188,6 +189,8 @@ type StatefulSetStatus struct { ...@@ -188,6 +189,8 @@ type StatefulSetStatus struct {
UpdateRevision string UpdateRevision string
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// StatefulSetList is a collection of StatefulSets. // StatefulSetList is a collection of StatefulSets.
type StatefulSetList struct { type StatefulSetList struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -197,6 +200,7 @@ type StatefulSetList struct { ...@@ -197,6 +200,7 @@ type StatefulSetList struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ControllerRevision implements an immutable snapshot of state data. Clients // ControllerRevision implements an immutable snapshot of state data. Clients
// are responsible for serializing and deserializing the objects that contain // are responsible for serializing and deserializing the objects that contain
...@@ -218,6 +222,8 @@ type ControllerRevision struct { ...@@ -218,6 +222,8 @@ type ControllerRevision struct {
Revision int64 Revision int64
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ControllerRevisionList is a resource containing a list of ControllerRevision objects. // ControllerRevisionList is a resource containing a list of ControllerRevision objects.
type ControllerRevisionList struct { type ControllerRevisionList struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -38,6 +38,7 @@ const ( ...@@ -38,6 +38,7 @@ const (
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +noMethods=true // +noMethods=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// TokenReview attempts to authenticate a token to a known user. // TokenReview attempts to authenticate a token to a known user.
type TokenReview struct { type TokenReview struct {
......
...@@ -21,90 +21,126 @@ limitations under the License. ...@@ -21,90 +21,126 @@ limitations under the License.
package authentication package authentication
import ( import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
// Deprecated: register deep-copy functions.
func init() { func init() {
SchemeBuilder.Register(RegisterDeepCopies) SchemeBuilder.Register(RegisterDeepCopies)
} }
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes. // to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error { func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs( return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReview, InType: reflect.TypeOf(&TokenReview{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})}, in.(*TokenReview).DeepCopyInto(out.(*TokenReview))
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})}, return nil
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_UserInfo, InType: reflect.TypeOf(&UserInfo{})}, }, InType: reflect.TypeOf(&TokenReview{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TokenReviewSpec).DeepCopyInto(out.(*TokenReviewSpec))
return nil
}, InType: reflect.TypeOf(&TokenReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TokenReviewStatus).DeepCopyInto(out.(*TokenReviewStatus))
return nil
}, InType: reflect.TypeOf(&TokenReviewStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*UserInfo).DeepCopyInto(out.(*UserInfo))
return nil
}, InType: reflect.TypeOf(&UserInfo{})},
) )
} }
// DeepCopy_authentication_TokenReview is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_authentication_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *TokenReview) DeepCopyInto(out *TokenReview) {
{ *out = *in
in := in.(*TokenReview) out.TypeMeta = in.TypeMeta
out := out.(*TokenReview) in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
*out = *in out.Spec = in.Spec
if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { in.Status.DeepCopyInto(&out.Status)
return err return
} else { }
out.ObjectMeta = *newVal.(*v1.ObjectMeta)
} // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new TokenReview.
if err := DeepCopy_authentication_TokenReviewStatus(&in.Status, &out.Status, c); err != nil { func (x *TokenReview) DeepCopy() *TokenReview {
return err if x == nil {
}
return nil return nil
} }
out := new(TokenReview)
x.DeepCopyInto(out)
return out
} }
// DeepCopy_authentication_TokenReviewSpec is an autogenerated deepcopy function. // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func DeepCopy_authentication_TokenReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error { func (x *TokenReview) DeepCopyObject() runtime.Object {
{ if c := x.DeepCopy(); c != nil {
in := in.(*TokenReviewSpec) return c
out := out.(*TokenReviewSpec) } else {
*out = *in
return nil return nil
} }
} }
// DeepCopy_authentication_TokenReviewStatus is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_authentication_TokenReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *TokenReviewSpec) DeepCopyInto(out *TokenReviewSpec) {
{ *out = *in
in := in.(*TokenReviewStatus) return
out := out.(*TokenReviewStatus) }
*out = *in
if err := DeepCopy_authentication_UserInfo(&in.User, &out.User, c); err != nil { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new TokenReviewSpec.
return err func (x *TokenReviewSpec) DeepCopy() *TokenReviewSpec {
} if x == nil {
return nil return nil
} }
out := new(TokenReviewSpec)
x.DeepCopyInto(out)
return out
} }
// DeepCopy_authentication_UserInfo is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_authentication_UserInfo(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *TokenReviewStatus) DeepCopyInto(out *TokenReviewStatus) {
{ *out = *in
in := in.(*UserInfo) in.User.DeepCopyInto(&out.User)
out := out.(*UserInfo) return
*out = *in }
if in.Groups != nil {
in, out := &in.Groups, &out.Groups // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new TokenReviewStatus.
*out = make([]string, len(*in)) func (x *TokenReviewStatus) DeepCopy() *TokenReviewStatus {
copy(*out, *in) if x == nil {
} return nil
if in.Extra != nil { }
in, out := &in.Extra, &out.Extra out := new(TokenReviewStatus)
*out = make(map[string]ExtraValue) x.DeepCopyInto(out)
for key, val := range *in { return out
if newVal, err := c.DeepCopy(&val); err != nil { }
return err
} else { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
(*out)[key] = *newVal.(*ExtraValue) func (in *UserInfo) DeepCopyInto(out *UserInfo) {
} *out = *in
} if in.Groups != nil {
in, out := &in.Groups, &out.Groups
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Extra != nil {
in, out := &in.Extra, &out.Extra
*out = make(map[string]ExtraValue, len(*in))
for key, val := range *in {
(*out)[key] = make(ExtraValue, len(val))
copy((*out)[key], val)
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new UserInfo.
func (x *UserInfo) DeepCopy() *UserInfo {
if x == nil {
return nil return nil
} }
out := new(UserInfo)
x.DeepCopyInto(out)
return out
} }
...@@ -23,6 +23,7 @@ import ( ...@@ -23,6 +23,7 @@ import (
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +noMethods=true // +noMethods=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// SubjectAccessReview checks whether or not a user or group can perform an action. Not filling in a // SubjectAccessReview checks whether or not a user or group can perform an action. Not filling in a
// spec.namespace means "in all namespaces". // spec.namespace means "in all namespaces".
...@@ -40,6 +41,7 @@ type SubjectAccessReview struct { ...@@ -40,6 +41,7 @@ type SubjectAccessReview struct {
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +noMethods=true // +noMethods=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a // SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
// spec.namespace means "in all namespaces". Self is a special case, because users should always be able // spec.namespace means "in all namespaces". Self is a special case, because users should always be able
...@@ -57,6 +59,7 @@ type SelfSubjectAccessReview struct { ...@@ -57,6 +59,7 @@ type SelfSubjectAccessReview struct {
// +genclient=true // +genclient=true
// +noMethods=true // +noMethods=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. // LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions // Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
......
...@@ -22,6 +22,8 @@ import ( ...@@ -22,6 +22,8 @@ import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Scale represents a scaling request for a resource. // Scale represents a scaling request for a resource.
type Scale struct { type Scale struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -325,6 +327,7 @@ type ResourceMetricStatus struct { ...@@ -325,6 +327,7 @@ type ResourceMetricStatus struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// HorizontalPodAutoscaler is the configuration for a horizontal pod // HorizontalPodAutoscaler is the configuration for a horizontal pod
// autoscaler, which automatically manages the replica count of any resource // autoscaler, which automatically manages the replica count of any resource
...@@ -346,6 +349,8 @@ type HorizontalPodAutoscaler struct { ...@@ -346,6 +349,8 @@ type HorizontalPodAutoscaler struct {
Status HorizontalPodAutoscalerStatus Status HorizontalPodAutoscalerStatus
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. // HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.
type HorizontalPodAutoscalerList struct { type HorizontalPodAutoscalerList struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -22,6 +22,7 @@ import ( ...@@ -22,6 +22,7 @@ import (
) )
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Job represents the configuration of a single job. // Job represents the configuration of a single job.
type Job struct { type Job struct {
...@@ -42,6 +43,8 @@ type Job struct { ...@@ -42,6 +43,8 @@ type Job struct {
Status JobStatus Status JobStatus
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// JobList is a collection of jobs. // JobList is a collection of jobs.
type JobList struct { type JobList struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -54,6 +57,8 @@ type JobList struct { ...@@ -54,6 +57,8 @@ type JobList struct {
Items []Job Items []Job
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// JobTemplate describes a template for creating copies of a predefined pod. // JobTemplate describes a template for creating copies of a predefined pod.
type JobTemplate struct { type JobTemplate struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -188,6 +193,7 @@ type JobCondition struct { ...@@ -188,6 +193,7 @@ type JobCondition struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// CronJob represents the configuration of a single cron job. // CronJob represents the configuration of a single cron job.
type CronJob struct { type CronJob struct {
...@@ -208,6 +214,8 @@ type CronJob struct { ...@@ -208,6 +214,8 @@ type CronJob struct {
Status CronJobStatus Status CronJobStatus
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// CronJobList is a collection of cron jobs. // CronJobList is a collection of cron jobs.
type CronJobList struct { type CronJobList struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -20,6 +20,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ...@@ -20,6 +20,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Describes a certificate signing request // Describes a certificate signing request
type CertificateSigningRequest struct { type CertificateSigningRequest struct {
...@@ -102,6 +103,8 @@ type CertificateSigningRequestCondition struct { ...@@ -102,6 +103,8 @@ type CertificateSigningRequestCondition struct {
LastUpdateTime metav1.Time LastUpdateTime metav1.Time
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type CertificateSigningRequestList struct { type CertificateSigningRequestList struct {
metav1.TypeMeta metav1.TypeMeta
// +optional // +optional
......
...@@ -78,6 +78,8 @@ type KubeProxyConntrackConfiguration struct { ...@@ -78,6 +78,8 @@ type KubeProxyConntrackConfiguration struct {
TCPCloseWaitTimeout metav1.Duration TCPCloseWaitTimeout metav1.Duration
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// KubeProxyConfiguration contains everything necessary to configure the // KubeProxyConfiguration contains everything necessary to configure the
// Kubernetes proxy server. // Kubernetes proxy server.
type KubeProxyConfiguration struct { type KubeProxyConfiguration struct {
...@@ -166,6 +168,8 @@ const ( ...@@ -166,6 +168,8 @@ const (
HairpinNone = "none" HairpinNone = "none"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// A configuration field should go in KubeletFlags instead of KubeletConfiguration if any of these are true: // A configuration field should go in KubeletFlags instead of KubeletConfiguration if any of these are true:
// - its value will never, or cannot safely be changed during the lifetime of a node // - its value will never, or cannot safely be changed during the lifetime of a node
// - its value cannot be safely shared between nodes at the same time (e.g. a hostname) // - its value cannot be safely shared between nodes at the same time (e.g. a hostname)
...@@ -563,6 +567,8 @@ type KubeletAnonymousAuthentication struct { ...@@ -563,6 +567,8 @@ type KubeletAnonymousAuthentication struct {
Enabled bool Enabled bool
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type KubeSchedulerConfiguration struct { type KubeSchedulerConfiguration struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -650,6 +656,8 @@ type GroupResource struct { ...@@ -650,6 +656,8 @@ type GroupResource struct {
Resource string Resource string
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type KubeControllerManagerConfiguration struct { type KubeControllerManagerConfiguration struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -74,6 +74,8 @@ type KubeProxyConntrackConfiguration struct { ...@@ -74,6 +74,8 @@ type KubeProxyConntrackConfiguration struct {
TCPCloseWaitTimeout metav1.Duration `json:"tcpCloseWaitTimeout"` TCPCloseWaitTimeout metav1.Duration `json:"tcpCloseWaitTimeout"`
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// KubeProxyConfiguration contains everything necessary to configure the // KubeProxyConfiguration contains everything necessary to configure the
// Kubernetes proxy server. // Kubernetes proxy server.
type KubeProxyConfiguration struct { type KubeProxyConfiguration struct {
...@@ -144,6 +146,8 @@ const ( ...@@ -144,6 +146,8 @@ const (
ProxyModeIPTables ProxyMode = "iptables" ProxyModeIPTables ProxyMode = "iptables"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type KubeSchedulerConfiguration struct { type KubeSchedulerConfiguration struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
...@@ -241,6 +245,8 @@ type LeaderElectionConfiguration struct { ...@@ -241,6 +245,8 @@ type LeaderElectionConfiguration struct {
ResourceLock string `json:"resourceLock"` ResourceLock string `json:"resourceLock"`
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// A configuration field should go in KubeletFlags instead of KubeletConfiguration if any of these are true: // A configuration field should go in KubeletFlags instead of KubeletConfiguration if any of these are true:
// - its value will never, or cannot safely be changed during the lifetime of a node // - its value will never, or cannot safely be changed during the lifetime of a node
// - its value cannot be safely shared between nodes at the same time (e.g. a hostname) // - its value cannot be safely shared between nodes at the same time (e.g. a hostname)
......
...@@ -62,6 +62,7 @@ type ScaleStatus struct { ...@@ -62,6 +62,7 @@ type ScaleStatus struct {
// +genclient=true // +genclient=true
// +noMethods=true // +noMethods=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// represents a scaling request for a resource. // represents a scaling request for a resource.
type Scale struct { type Scale struct {
...@@ -79,6 +80,8 @@ type Scale struct { ...@@ -79,6 +80,8 @@ type Scale struct {
Status ScaleStatus Status ScaleStatus
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Dummy definition // Dummy definition
type ReplicationControllerDummy struct { type ReplicationControllerDummy struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -109,6 +112,7 @@ type CustomMetricCurrentStatusList struct { ...@@ -109,6 +112,7 @@ type CustomMetricCurrentStatusList struct {
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource // A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
// types to the API. It consists of one or more Versions of the api. // types to the API. It consists of one or more Versions of the api.
...@@ -127,6 +131,8 @@ type ThirdPartyResource struct { ...@@ -127,6 +131,8 @@ type ThirdPartyResource struct {
Versions []APIVersion Versions []APIVersion
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ThirdPartyResourceList struct { type ThirdPartyResourceList struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -145,6 +151,8 @@ type APIVersion struct { ...@@ -145,6 +151,8 @@ type APIVersion struct {
Name string Name string
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// An internal object, used for versioned storage in etcd. Not exposed to the end user. // An internal object, used for versioned storage in etcd. Not exposed to the end user.
type ThirdPartyResourceData struct { type ThirdPartyResourceData struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -158,6 +166,7 @@ type ThirdPartyResourceData struct { ...@@ -158,6 +166,7 @@ type ThirdPartyResourceData struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Deployment struct { type Deployment struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -221,6 +230,8 @@ type DeploymentSpec struct { ...@@ -221,6 +230,8 @@ type DeploymentSpec struct {
ProgressDeadlineSeconds *int32 ProgressDeadlineSeconds *int32
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// DeploymentRollback stores the information required to rollback a deployment. // DeploymentRollback stores the information required to rollback a deployment.
type DeploymentRollback struct { type DeploymentRollback struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -367,6 +378,8 @@ type DeploymentCondition struct { ...@@ -367,6 +378,8 @@ type DeploymentCondition struct {
Message string Message string
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type DeploymentList struct { type DeploymentList struct {
metav1.TypeMeta metav1.TypeMeta
// +optional // +optional
...@@ -507,6 +520,7 @@ type DaemonSetStatus struct { ...@@ -507,6 +520,7 @@ type DaemonSetStatus struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// DaemonSet represents the configuration of a daemon set. // DaemonSet represents the configuration of a daemon set.
type DaemonSet struct { type DaemonSet struct {
...@@ -538,6 +552,8 @@ const ( ...@@ -538,6 +552,8 @@ const (
DaemonSetTemplateGenerationKey string = "pod-template-generation" DaemonSetTemplateGenerationKey string = "pod-template-generation"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// DaemonSetList is a collection of daemon sets. // DaemonSetList is a collection of daemon sets.
type DaemonSetList struct { type DaemonSetList struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -550,6 +566,8 @@ type DaemonSetList struct { ...@@ -550,6 +566,8 @@ type DaemonSetList struct {
Items []DaemonSet Items []DaemonSet
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ThirdPartyResourceDataList struct { type ThirdPartyResourceDataList struct {
metav1.TypeMeta metav1.TypeMeta
// Standard list metadata // Standard list metadata
...@@ -561,6 +579,7 @@ type ThirdPartyResourceDataList struct { ...@@ -561,6 +579,7 @@ type ThirdPartyResourceDataList struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Ingress is a collection of rules that allow inbound connections to reach the // Ingress is a collection of rules that allow inbound connections to reach the
// endpoints defined by a backend. An Ingress can be configured to give services // endpoints defined by a backend. An Ingress can be configured to give services
...@@ -584,6 +603,8 @@ type Ingress struct { ...@@ -584,6 +603,8 @@ type Ingress struct {
Status IngressStatus Status IngressStatus
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// IngressList is a collection of Ingress. // IngressList is a collection of Ingress.
type IngressList struct { type IngressList struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -727,6 +748,7 @@ type IngressBackend struct { ...@@ -727,6 +748,7 @@ type IngressBackend struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ReplicaSet represents the configuration of a replica set. // ReplicaSet represents the configuration of a replica set.
type ReplicaSet struct { type ReplicaSet struct {
...@@ -744,6 +766,8 @@ type ReplicaSet struct { ...@@ -744,6 +766,8 @@ type ReplicaSet struct {
Status ReplicaSetStatus Status ReplicaSetStatus
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ReplicaSetList is a collection of ReplicaSets. // ReplicaSetList is a collection of ReplicaSets.
type ReplicaSetList struct { type ReplicaSetList struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -834,6 +858,7 @@ type ReplicaSetCondition struct { ...@@ -834,6 +858,7 @@ type ReplicaSetCondition struct {
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PodSecurityPolicy governs the ability to make requests that affect the SecurityContext // PodSecurityPolicy governs the ability to make requests that affect the SecurityContext
// that will be applied to a pod and container. // that will be applied to a pod and container.
...@@ -1045,6 +1070,8 @@ const ( ...@@ -1045,6 +1070,8 @@ const (
SupplementalGroupsStrategyRunAsAny SupplementalGroupsStrategyType = "RunAsAny" SupplementalGroupsStrategyRunAsAny SupplementalGroupsStrategyType = "RunAsAny"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PodSecurityPolicyList is a list of PodSecurityPolicy objects. // PodSecurityPolicyList is a list of PodSecurityPolicy objects.
type PodSecurityPolicyList struct { type PodSecurityPolicyList struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -1055,6 +1082,7 @@ type PodSecurityPolicyList struct { ...@@ -1055,6 +1082,7 @@ type PodSecurityPolicyList struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// NetworkPolicy describes what network traffic is allowed for a set of Pods // NetworkPolicy describes what network traffic is allowed for a set of Pods
type NetworkPolicy struct { type NetworkPolicy struct {
...@@ -1137,6 +1165,8 @@ type NetworkPolicyPeer struct { ...@@ -1137,6 +1165,8 @@ type NetworkPolicyPeer struct {
NamespaceSelector *metav1.LabelSelector NamespaceSelector *metav1.LabelSelector
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// NetworkPolicyList is a list of NetworkPolicy objects. // NetworkPolicyList is a list of NetworkPolicy objects.
type NetworkPolicyList struct { type NetworkPolicyList struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -23,6 +23,7 @@ import ( ...@@ -23,6 +23,7 @@ import (
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +noMethods=true // +noMethods=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ImageReview checks if the set of images in a pod are allowed. // ImageReview checks if the set of images in a pod are allowed.
type ImageReview struct { type ImageReview struct {
......
...@@ -21,83 +21,124 @@ limitations under the License. ...@@ -21,83 +21,124 @@ limitations under the License.
package imagepolicy package imagepolicy
import ( import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
// Deprecated: register deep-copy functions.
func init() { func init() {
SchemeBuilder.Register(RegisterDeepCopies) SchemeBuilder.Register(RegisterDeepCopies)
} }
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes. // to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error { func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs( return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_imagepolicy_ImageReview, InType: reflect.TypeOf(&ImageReview{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_imagepolicy_ImageReviewContainerSpec, InType: reflect.TypeOf(&ImageReviewContainerSpec{})}, in.(*ImageReview).DeepCopyInto(out.(*ImageReview))
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_imagepolicy_ImageReviewSpec, InType: reflect.TypeOf(&ImageReviewSpec{})}, return nil
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_imagepolicy_ImageReviewStatus, InType: reflect.TypeOf(&ImageReviewStatus{})}, }, InType: reflect.TypeOf(&ImageReview{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ImageReviewContainerSpec).DeepCopyInto(out.(*ImageReviewContainerSpec))
return nil
}, InType: reflect.TypeOf(&ImageReviewContainerSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ImageReviewSpec).DeepCopyInto(out.(*ImageReviewSpec))
return nil
}, InType: reflect.TypeOf(&ImageReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ImageReviewStatus).DeepCopyInto(out.(*ImageReviewStatus))
return nil
}, InType: reflect.TypeOf(&ImageReviewStatus{})},
) )
} }
// DeepCopy_imagepolicy_ImageReview is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_imagepolicy_ImageReview(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *ImageReview) DeepCopyInto(out *ImageReview) {
{ *out = *in
in := in.(*ImageReview) out.TypeMeta = in.TypeMeta
out := out.(*ImageReview) in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
*out = *in in.Spec.DeepCopyInto(&out.Spec)
if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { out.Status = in.Status
return err return
} else { }
out.ObjectMeta = *newVal.(*v1.ObjectMeta)
} // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ImageReview.
if err := DeepCopy_imagepolicy_ImageReviewSpec(&in.Spec, &out.Spec, c); err != nil { func (x *ImageReview) DeepCopy() *ImageReview {
return err if x == nil {
}
return nil return nil
} }
out := new(ImageReview)
x.DeepCopyInto(out)
return out
} }
// DeepCopy_imagepolicy_ImageReviewContainerSpec is an autogenerated deepcopy function. // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func DeepCopy_imagepolicy_ImageReviewContainerSpec(in interface{}, out interface{}, c *conversion.Cloner) error { func (x *ImageReview) DeepCopyObject() runtime.Object {
{ if c := x.DeepCopy(); c != nil {
in := in.(*ImageReviewContainerSpec) return c
out := out.(*ImageReviewContainerSpec) } else {
*out = *in
return nil return nil
} }
} }
// DeepCopy_imagepolicy_ImageReviewSpec is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_imagepolicy_ImageReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *ImageReviewContainerSpec) DeepCopyInto(out *ImageReviewContainerSpec) {
{ *out = *in
in := in.(*ImageReviewSpec) return
out := out.(*ImageReviewSpec) }
*out = *in
if in.Containers != nil { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ImageReviewContainerSpec.
in, out := &in.Containers, &out.Containers func (x *ImageReviewContainerSpec) DeepCopy() *ImageReviewContainerSpec {
*out = make([]ImageReviewContainerSpec, len(*in)) if x == nil {
copy(*out, *in) return nil
} }
if in.Annotations != nil { out := new(ImageReviewContainerSpec)
in, out := &in.Annotations, &out.Annotations x.DeepCopyInto(out)
*out = make(map[string]string) return out
for key, val := range *in { }
(*out)[key] = val
} // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImageReviewSpec) DeepCopyInto(out *ImageReviewSpec) {
*out = *in
if in.Containers != nil {
in, out := &in.Containers, &out.Containers
*out = make([]ImageReviewContainerSpec, len(*in))
copy(*out, *in)
}
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ImageReviewSpec.
func (x *ImageReviewSpec) DeepCopy() *ImageReviewSpec {
if x == nil {
return nil return nil
} }
out := new(ImageReviewSpec)
x.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImageReviewStatus) DeepCopyInto(out *ImageReviewStatus) {
*out = *in
return
} }
// DeepCopy_imagepolicy_ImageReviewStatus is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ImageReviewStatus.
func DeepCopy_imagepolicy_ImageReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error { func (x *ImageReviewStatus) DeepCopy() *ImageReviewStatus {
{ if x == nil {
in := in.(*ImageReviewStatus)
out := out.(*ImageReviewStatus)
*out = *in
return nil return nil
} }
out := new(ImageReviewStatus)
x.DeepCopyInto(out)
return out
} }
...@@ -37,11 +37,11 @@ type Time struct { ...@@ -37,11 +37,11 @@ type Time struct {
time.Time `protobuf:"-"` time.Time `protobuf:"-"`
} }
// DeepCopy returns a deep-copy of the Time value. The underlying time.Time // DeepCopyInto creates a deep-copy of the Time value. The underlying time.Time
// type is effectively immutable in the time API, so it is safe to // type is effectively immutable in the time API, so it is safe to
// copy-by-assign, despite the presence of (unexported) Pointer fields. // copy-by-assign, despite the presence of (unexported) Pointer fields.
func (t Time) DeepCopy() Time { func (t *Time) DeepCopyInto(out *Time) {
return t *out = *t
} }
// String returns the representation of the time. // String returns the representation of the time.
......
...@@ -23,6 +23,7 @@ import ( ...@@ -23,6 +23,7 @@ import (
) )
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// NetworkPolicy describes what network traffic is allowed for a set of Pods // NetworkPolicy describes what network traffic is allowed for a set of Pods
type NetworkPolicy struct { type NetworkPolicy struct {
...@@ -105,6 +106,8 @@ type NetworkPolicyPeer struct { ...@@ -105,6 +106,8 @@ type NetworkPolicyPeer struct {
NamespaceSelector *metav1.LabelSelector NamespaceSelector *metav1.LabelSelector
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// NetworkPolicyList is a list of NetworkPolicy objects. // NetworkPolicyList is a list of NetworkPolicy objects.
type NetworkPolicyList struct { type NetworkPolicyList struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -78,6 +78,7 @@ type PodDisruptionBudgetStatus struct { ...@@ -78,6 +78,7 @@ type PodDisruptionBudgetStatus struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
type PodDisruptionBudget struct { type PodDisruptionBudget struct {
...@@ -93,6 +94,8 @@ type PodDisruptionBudget struct { ...@@ -93,6 +94,8 @@ type PodDisruptionBudget struct {
Status PodDisruptionBudgetStatus Status PodDisruptionBudgetStatus
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. // PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
type PodDisruptionBudgetList struct { type PodDisruptionBudgetList struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -103,6 +106,7 @@ type PodDisruptionBudgetList struct { ...@@ -103,6 +106,7 @@ type PodDisruptionBudgetList struct {
// +genclient=true // +genclient=true
// +noMethods=true // +noMethods=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Eviction evicts a pod from its node subject to certain policies and safety constraints. // Eviction evicts a pod from its node subject to certain policies and safety constraints.
// This is a subresource of Pod. A request to cause such an eviction is // This is a subresource of Pod. A request to cause such an eviction is
......
...@@ -13,11 +13,13 @@ go_library( ...@@ -13,11 +13,13 @@ go_library(
"doc.go", "doc.go",
"register.go", "register.go",
"types.go", "types.go",
"zz_generated.deepcopy.go",
"zz_generated.defaults.go", "zz_generated.defaults.go",
], ],
tags = ["automanaged"], tags = ["automanaged"],
deps = [ deps = [
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
......
...@@ -15,6 +15,7 @@ limitations under the License. ...@@ -15,6 +15,7 @@ limitations under the License.
*/ */
// +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen=TypeMeta
// +k8s:deepcopy-gen=package,register
// Package policy is for any kind of policy object. Suitable examples, even if // Package policy is for any kind of policy object. Suitable examples, even if
// they aren't all here, are PodDisruptionBudget, PodSecurityPolicy, // they aren't all here, are PodDisruptionBudget, PodSecurityPolicy,
......
...@@ -53,6 +53,7 @@ type PodDisruptionBudgetStatus struct { ...@@ -53,6 +53,7 @@ type PodDisruptionBudgetStatus struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
type PodDisruptionBudget struct { type PodDisruptionBudget struct {
...@@ -68,6 +69,8 @@ type PodDisruptionBudget struct { ...@@ -68,6 +69,8 @@ type PodDisruptionBudget struct {
Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. // PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
type PodDisruptionBudgetList struct { type PodDisruptionBudgetList struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
...@@ -76,6 +79,8 @@ type PodDisruptionBudgetList struct { ...@@ -76,6 +79,8 @@ type PodDisruptionBudgetList struct {
Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"` Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"`
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Eviction evicts a pod from its node subject to certain policies and safety constraints. // Eviction evicts a pod from its node subject to certain policies and safety constraints.
// This is a subresource of Pod. A request to cause such an eviction is // This is a subresource of Pod. A request to cause such an eviction is
// created by POSTing to .../pods/<pod name>/eviction. // created by POSTing to .../pods/<pod name>/eviction.
......
// +build !ignore_autogenerated
/*
Copyright 2017 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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package v1alpha1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)
// Deprecated: register deep-copy functions.
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Eviction).DeepCopyInto(out.(*Eviction))
return nil
}, InType: reflect.TypeOf(&Eviction{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PodDisruptionBudget).DeepCopyInto(out.(*PodDisruptionBudget))
return nil
}, InType: reflect.TypeOf(&PodDisruptionBudget{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PodDisruptionBudgetList).DeepCopyInto(out.(*PodDisruptionBudgetList))
return nil
}, InType: reflect.TypeOf(&PodDisruptionBudgetList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PodDisruptionBudgetSpec).DeepCopyInto(out.(*PodDisruptionBudgetSpec))
return nil
}, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PodDisruptionBudgetStatus).DeepCopyInto(out.(*PodDisruptionBudgetStatus))
return nil
}, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})},
)
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Eviction) DeepCopyInto(out *Eviction) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.DeleteOptions != nil {
in, out := &in.DeleteOptions, &out.DeleteOptions
if *in == nil {
*out = nil
} else {
*out = new(v1.DeleteOptions)
(*in).DeepCopyInto(*out)
}
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Eviction.
func (x *Eviction) DeepCopy() *Eviction {
if x == nil {
return nil
}
out := new(Eviction)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *Eviction) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodDisruptionBudget) DeepCopyInto(out *PodDisruptionBudget) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
out.Status = in.Status
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudget.
func (x *PodDisruptionBudget) DeepCopy() *PodDisruptionBudget {
if x == nil {
return nil
}
out := new(PodDisruptionBudget)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *PodDisruptionBudget) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodDisruptionBudgetList) DeepCopyInto(out *PodDisruptionBudgetList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]PodDisruptionBudget, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetList.
func (x *PodDisruptionBudgetList) DeepCopy() *PodDisruptionBudgetList {
if x == nil {
return nil
}
out := new(PodDisruptionBudgetList)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *PodDisruptionBudgetList) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec) {
*out = *in
out.MinAvailable = in.MinAvailable
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
if *in == nil {
*out = nil
} else {
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetSpec.
func (x *PodDisruptionBudgetSpec) DeepCopy() *PodDisruptionBudgetSpec {
if x == nil {
return nil
}
out := new(PodDisruptionBudgetSpec)
x.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodDisruptionBudgetStatus) DeepCopyInto(out *PodDisruptionBudgetStatus) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetStatus.
func (x *PodDisruptionBudgetStatus) DeepCopy() *PodDisruptionBudgetStatus {
if x == nil {
return nil
}
out := new(PodDisruptionBudgetStatus)
x.DeepCopyInto(out)
return out
}
...@@ -28,126 +28,199 @@ import ( ...@@ -28,126 +28,199 @@ import (
reflect "reflect" reflect "reflect"
) )
// Deprecated: register deep-copy functions.
func init() { func init() {
SchemeBuilder.Register(RegisterDeepCopies) SchemeBuilder.Register(RegisterDeepCopies)
} }
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes. // to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error { func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs( return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_Eviction, InType: reflect.TypeOf(&Eviction{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudget, InType: reflect.TypeOf(&PodDisruptionBudget{})}, in.(*Eviction).DeepCopyInto(out.(*Eviction))
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetList, InType: reflect.TypeOf(&PodDisruptionBudgetList{})}, return nil
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetSpec, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})}, }, InType: reflect.TypeOf(&Eviction{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetStatus, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PodDisruptionBudget).DeepCopyInto(out.(*PodDisruptionBudget))
return nil
}, InType: reflect.TypeOf(&PodDisruptionBudget{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PodDisruptionBudgetList).DeepCopyInto(out.(*PodDisruptionBudgetList))
return nil
}, InType: reflect.TypeOf(&PodDisruptionBudgetList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PodDisruptionBudgetSpec).DeepCopyInto(out.(*PodDisruptionBudgetSpec))
return nil
}, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PodDisruptionBudgetStatus).DeepCopyInto(out.(*PodDisruptionBudgetStatus))
return nil
}, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})},
) )
} }
// DeepCopy_policy_Eviction is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_policy_Eviction(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *Eviction) DeepCopyInto(out *Eviction) {
{ *out = *in
in := in.(*Eviction) out.TypeMeta = in.TypeMeta
out := out.(*Eviction) in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
*out = *in if in.DeleteOptions != nil {
if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { in, out := &in.DeleteOptions, &out.DeleteOptions
return err if *in == nil {
*out = nil
} else { } else {
out.ObjectMeta = *newVal.(*v1.ObjectMeta) *out = new(v1.DeleteOptions)
} (*in).DeepCopyInto(*out)
if in.DeleteOptions != nil {
in, out := &in.DeleteOptions, &out.DeleteOptions
if newVal, err := c.DeepCopy(*in); err != nil {
return err
} else {
*out = newVal.(*v1.DeleteOptions)
}
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Eviction.
func (x *Eviction) DeepCopy() *Eviction {
if x == nil {
return nil return nil
} }
out := new(Eviction)
x.DeepCopyInto(out)
return out
} }
// DeepCopy_policy_PodDisruptionBudget is an autogenerated deepcopy function. // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func DeepCopy_policy_PodDisruptionBudget(in interface{}, out interface{}, c *conversion.Cloner) error { func (x *Eviction) DeepCopyObject() runtime.Object {
{ if c := x.DeepCopy(); c != nil {
in := in.(*PodDisruptionBudget) return c
out := out.(*PodDisruptionBudget) } else {
*out = *in return nil
if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { }
return err }
} else {
out.ObjectMeta = *newVal.(*v1.ObjectMeta) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
} func (in *PodDisruptionBudget) DeepCopyInto(out *PodDisruptionBudget) {
if err := DeepCopy_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil { *out = *in
return err out.TypeMeta = in.TypeMeta
} in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if err := DeepCopy_policy_PodDisruptionBudgetStatus(&in.Status, &out.Status, c); err != nil { in.Spec.DeepCopyInto(&out.Spec)
return err in.Status.DeepCopyInto(&out.Status)
} return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudget.
func (x *PodDisruptionBudget) DeepCopy() *PodDisruptionBudget {
if x == nil {
return nil
}
out := new(PodDisruptionBudget)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *PodDisruptionBudget) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil return nil
} }
} }
// DeepCopy_policy_PodDisruptionBudgetList is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_policy_PodDisruptionBudgetList(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *PodDisruptionBudgetList) DeepCopyInto(out *PodDisruptionBudgetList) {
{ *out = *in
in := in.(*PodDisruptionBudgetList) out.TypeMeta = in.TypeMeta
out := out.(*PodDisruptionBudgetList) out.ListMeta = in.ListMeta
*out = *in if in.Items != nil {
if in.Items != nil { in, out := &in.Items, &out.Items
in, out := &in.Items, &out.Items *out = make([]PodDisruptionBudget, len(*in))
*out = make([]PodDisruptionBudget, len(*in)) for i := range *in {
for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i])
if err := DeepCopy_policy_PodDisruptionBudget(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetList.
func (x *PodDisruptionBudgetList) DeepCopy() *PodDisruptionBudgetList {
if x == nil {
return nil return nil
} }
out := new(PodDisruptionBudgetList)
x.DeepCopyInto(out)
return out
} }
// DeepCopy_policy_PodDisruptionBudgetSpec is an autogenerated deepcopy function. // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func DeepCopy_policy_PodDisruptionBudgetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { func (x *PodDisruptionBudgetList) DeepCopyObject() runtime.Object {
{ if c := x.DeepCopy(); c != nil {
in := in.(*PodDisruptionBudgetSpec) return c
out := out.(*PodDisruptionBudgetSpec) } else {
*out = *in return nil
if in.MinAvailable != nil { }
in, out := &in.MinAvailable, &out.MinAvailable }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec) {
*out = *in
if in.MinAvailable != nil {
in, out := &in.MinAvailable, &out.MinAvailable
if *in == nil {
*out = nil
} else {
*out = new(intstr.IntOrString) *out = new(intstr.IntOrString)
**out = **in **out = **in
} }
if in.Selector != nil { }
in, out := &in.Selector, &out.Selector if in.Selector != nil {
if newVal, err := c.DeepCopy(*in); err != nil { in, out := &in.Selector, &out.Selector
return err if *in == nil {
} else { *out = nil
*out = newVal.(*v1.LabelSelector) } else {
} *out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
} }
if in.MaxUnavailable != nil { }
in, out := &in.MaxUnavailable, &out.MaxUnavailable if in.MaxUnavailable != nil {
in, out := &in.MaxUnavailable, &out.MaxUnavailable
if *in == nil {
*out = nil
} else {
*out = new(intstr.IntOrString) *out = new(intstr.IntOrString)
**out = **in **out = **in
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetSpec.
func (x *PodDisruptionBudgetSpec) DeepCopy() *PodDisruptionBudgetSpec {
if x == nil {
return nil return nil
} }
out := new(PodDisruptionBudgetSpec)
x.DeepCopyInto(out)
return out
} }
// DeepCopy_policy_PodDisruptionBudgetStatus is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_policy_PodDisruptionBudgetStatus(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *PodDisruptionBudgetStatus) DeepCopyInto(out *PodDisruptionBudgetStatus) {
{ *out = *in
in := in.(*PodDisruptionBudgetStatus) if in.DisruptedPods != nil {
out := out.(*PodDisruptionBudgetStatus) in, out := &in.DisruptedPods, &out.DisruptedPods
*out = *in *out = make(map[string]v1.Time, len(*in))
if in.DisruptedPods != nil { for key, val := range *in {
in, out := &in.DisruptedPods, &out.DisruptedPods (*out)[key] = *val.DeepCopy()
*out = make(map[string]v1.Time)
for key, val := range *in {
(*out)[key] = val.DeepCopy()
}
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetStatus.
func (x *PodDisruptionBudgetStatus) DeepCopy() *PodDisruptionBudgetStatus {
if x == nil {
return nil return nil
} }
out := new(PodDisruptionBudgetStatus)
x.DeepCopyInto(out)
return out
} }
...@@ -88,6 +88,7 @@ type RoleRef struct { ...@@ -88,6 +88,7 @@ type RoleRef struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
type Role struct { type Role struct {
...@@ -100,6 +101,7 @@ type Role struct { ...@@ -100,6 +101,7 @@ type Role struct {
} }
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. // RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given // It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
...@@ -116,6 +118,8 @@ type RoleBinding struct { ...@@ -116,6 +118,8 @@ type RoleBinding struct {
RoleRef RoleRef RoleRef RoleRef
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// RoleBindingList is a collection of RoleBindings // RoleBindingList is a collection of RoleBindings
type RoleBindingList struct { type RoleBindingList struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -126,6 +130,8 @@ type RoleBindingList struct { ...@@ -126,6 +130,8 @@ type RoleBindingList struct {
Items []RoleBinding Items []RoleBinding
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// RoleList is a collection of Roles // RoleList is a collection of Roles
type RoleList struct { type RoleList struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -138,6 +144,7 @@ type RoleList struct { ...@@ -138,6 +144,7 @@ type RoleList struct {
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
type ClusterRole struct { type ClusterRole struct {
...@@ -151,6 +158,7 @@ type ClusterRole struct { ...@@ -151,6 +158,7 @@ type ClusterRole struct {
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
// and adds who information via Subject. // and adds who information via Subject.
...@@ -167,6 +175,8 @@ type ClusterRoleBinding struct { ...@@ -167,6 +175,8 @@ type ClusterRoleBinding struct {
RoleRef RoleRef RoleRef RoleRef
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ClusterRoleBindingList is a collection of ClusterRoleBindings // ClusterRoleBindingList is a collection of ClusterRoleBindings
type ClusterRoleBindingList struct { type ClusterRoleBindingList struct {
metav1.TypeMeta metav1.TypeMeta
...@@ -177,6 +187,8 @@ type ClusterRoleBindingList struct { ...@@ -177,6 +187,8 @@ type ClusterRoleBindingList struct {
Items []ClusterRoleBinding Items []ClusterRoleBinding
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ClusterRoleList is a collection of ClusterRoles // ClusterRoleList is a collection of ClusterRoles
type ClusterRoleList struct { type ClusterRoleList struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -22,6 +22,7 @@ import ( ...@@ -22,6 +22,7 @@ import (
) )
// +genclient=true // +genclient=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PodPreset is a policy resource that defines additional runtime // PodPreset is a policy resource that defines additional runtime
// requirements for a Pod. // requirements for a Pod.
...@@ -53,6 +54,8 @@ type PodPresetSpec struct { ...@@ -53,6 +54,8 @@ type PodPresetSpec struct {
VolumeMounts []api.VolumeMount VolumeMounts []api.VolumeMount
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PodPresetList is a list of PodPreset objects. // PodPresetList is a list of PodPreset objects.
type PodPresetList struct { type PodPresetList struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -21,107 +21,137 @@ limitations under the License. ...@@ -21,107 +21,137 @@ limitations under the License.
package settings package settings
import ( import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
reflect "reflect" reflect "reflect"
) )
// Deprecated: register deep-copy functions.
func init() { func init() {
SchemeBuilder.Register(RegisterDeepCopies) SchemeBuilder.Register(RegisterDeepCopies)
} }
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes. // to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error { func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs( return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPreset, InType: reflect.TypeOf(&PodPreset{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPresetList, InType: reflect.TypeOf(&PodPresetList{})}, in.(*PodPreset).DeepCopyInto(out.(*PodPreset))
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPresetSpec, InType: reflect.TypeOf(&PodPresetSpec{})}, return nil
}, InType: reflect.TypeOf(&PodPreset{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PodPresetList).DeepCopyInto(out.(*PodPresetList))
return nil
}, InType: reflect.TypeOf(&PodPresetList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PodPresetSpec).DeepCopyInto(out.(*PodPresetSpec))
return nil
}, InType: reflect.TypeOf(&PodPresetSpec{})},
) )
} }
// DeepCopy_settings_PodPreset is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_settings_PodPreset(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *PodPreset) DeepCopyInto(out *PodPreset) {
{ *out = *in
in := in.(*PodPreset) out.TypeMeta = in.TypeMeta
out := out.(*PodPreset) in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
*out = *in in.Spec.DeepCopyInto(&out.Spec)
if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return
return err }
} else {
out.ObjectMeta = *newVal.(*v1.ObjectMeta) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PodPreset.
} func (x *PodPreset) DeepCopy() *PodPreset {
if err := DeepCopy_settings_PodPresetSpec(&in.Spec, &out.Spec, c); err != nil { if x == nil {
return err
}
return nil return nil
} }
out := new(PodPreset)
x.DeepCopyInto(out)
return out
} }
// DeepCopy_settings_PodPresetList is an autogenerated deepcopy function. // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func DeepCopy_settings_PodPresetList(in interface{}, out interface{}, c *conversion.Cloner) error { func (x *PodPreset) DeepCopyObject() runtime.Object {
{ if c := x.DeepCopy(); c != nil {
in := in.(*PodPresetList) return c
out := out.(*PodPresetList) } else {
*out = *in
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]PodPreset, len(*in))
for i := range *in {
if err := DeepCopy_settings_PodPreset(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
}
return nil return nil
} }
} }
// DeepCopy_settings_PodPresetSpec is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_settings_PodPresetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *PodPresetList) DeepCopyInto(out *PodPresetList) {
{ *out = *in
in := in.(*PodPresetSpec) out.TypeMeta = in.TypeMeta
out := out.(*PodPresetSpec) out.ListMeta = in.ListMeta
*out = *in if in.Items != nil {
if newVal, err := c.DeepCopy(&in.Selector); err != nil { in, out := &in.Items, &out.Items
return err *out = make([]PodPreset, len(*in))
} else { for i := range *in {
out.Selector = *newVal.(*v1.LabelSelector) (*in)[i].DeepCopyInto(&(*out)[i])
}
if in.Env != nil {
in, out := &in.Env, &out.Env
*out = make([]api.EnvVar, len(*in))
for i := range *in {
if err := api.DeepCopy_api_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} }
if in.EnvFrom != nil { }
in, out := &in.EnvFrom, &out.EnvFrom return
*out = make([]api.EnvFromSource, len(*in)) }
for i := range *in {
if err := api.DeepCopy_api_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PodPresetList.
return err func (x *PodPresetList) DeepCopy() *PodPresetList {
} if x == nil {
} return nil
}
out := new(PodPresetList)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *PodPresetList) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodPresetSpec) DeepCopyInto(out *PodPresetSpec) {
*out = *in
in.Selector.DeepCopyInto(&out.Selector)
if in.Env != nil {
in, out := &in.Env, &out.Env
*out = make([]api.EnvVar, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
} }
if in.Volumes != nil { }
in, out := &in.Volumes, &out.Volumes if in.EnvFrom != nil {
*out = make([]api.Volume, len(*in)) in, out := &in.EnvFrom, &out.EnvFrom
for i := range *in { *out = make([]api.EnvFromSource, len(*in))
if err := api.DeepCopy_api_Volume(&(*in)[i], &(*out)[i], c); err != nil { for i := range *in {
return err (*in)[i].DeepCopyInto(&(*out)[i])
}
}
} }
if in.VolumeMounts != nil { }
in, out := &in.VolumeMounts, &out.VolumeMounts if in.Volumes != nil {
*out = make([]api.VolumeMount, len(*in)) in, out := &in.Volumes, &out.Volumes
copy(*out, *in) *out = make([]api.Volume, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
} }
}
if in.VolumeMounts != nil {
in, out := &in.VolumeMounts, &out.VolumeMounts
*out = make([]api.VolumeMount, len(*in))
copy(*out, *in)
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new PodPresetSpec.
func (x *PodPresetSpec) DeepCopy() *PodPresetSpec {
if x == nil {
return nil return nil
} }
out := new(PodPresetSpec)
x.DeepCopyInto(out)
return out
} }
...@@ -20,6 +20,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ...@@ -20,6 +20,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +genclient=true // +genclient=true
// +nonNamespaced=true // +nonNamespaced=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// StorageClass describes a named "class" of storage offered in a cluster. // StorageClass describes a named "class" of storage offered in a cluster.
// Different classes might map to quality-of-service levels, or to backup policies, // Different classes might map to quality-of-service levels, or to backup policies,
...@@ -47,6 +48,8 @@ type StorageClass struct { ...@@ -47,6 +48,8 @@ type StorageClass struct {
Parameters map[string]string Parameters map[string]string
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// StorageClassList is a collection of storage classes. // StorageClassList is a collection of storage classes.
type StorageClassList struct { type StorageClassList struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -21,62 +21,95 @@ limitations under the License. ...@@ -21,62 +21,95 @@ limitations under the License.
package storage package storage
import ( import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
// Deprecated: register deep-copy functions.
func init() { func init() {
SchemeBuilder.Register(RegisterDeepCopies) SchemeBuilder.Register(RegisterDeepCopies)
} }
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes. // to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error { func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs( return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_storage_StorageClass, InType: reflect.TypeOf(&StorageClass{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_storage_StorageClassList, InType: reflect.TypeOf(&StorageClassList{})}, in.(*StorageClass).DeepCopyInto(out.(*StorageClass))
return nil
}, InType: reflect.TypeOf(&StorageClass{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*StorageClassList).DeepCopyInto(out.(*StorageClassList))
return nil
}, InType: reflect.TypeOf(&StorageClassList{})},
) )
} }
// DeepCopy_storage_StorageClass is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_storage_StorageClass(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *StorageClass) DeepCopyInto(out *StorageClass) {
{ *out = *in
in := in.(*StorageClass) out.TypeMeta = in.TypeMeta
out := out.(*StorageClass) in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
*out = *in if in.Parameters != nil {
if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { in, out := &in.Parameters, &out.Parameters
return err *out = make(map[string]string, len(*in))
} else { for key, val := range *in {
out.ObjectMeta = *newVal.(*v1.ObjectMeta) (*out)[key] = val
}
if in.Parameters != nil {
in, out := &in.Parameters, &out.Parameters
*out = make(map[string]string)
for key, val := range *in {
(*out)[key] = val
}
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new StorageClass.
func (x *StorageClass) DeepCopy() *StorageClass {
if x == nil {
return nil
}
out := new(StorageClass)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *StorageClass) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil return nil
} }
} }
// DeepCopy_storage_StorageClassList is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_storage_StorageClassList(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *StorageClassList) DeepCopyInto(out *StorageClassList) {
{ *out = *in
in := in.(*StorageClassList) out.TypeMeta = in.TypeMeta
out := out.(*StorageClassList) out.ListMeta = in.ListMeta
*out = *in if in.Items != nil {
if in.Items != nil { in, out := &in.Items, &out.Items
in, out := &in.Items, &out.Items *out = make([]StorageClass, len(*in))
*out = make([]StorageClass, len(*in)) for i := range *in {
for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i])
if err := DeepCopy_storage_StorageClass(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassList.
func (x *StorageClassList) DeepCopy() *StorageClassList {
if x == nil {
return nil
}
out := new(StorageClassList)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *StorageClassList) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil return nil
} }
} }
...@@ -14,12 +14,14 @@ go_library( ...@@ -14,12 +14,14 @@ go_library(
"metaonly.go", "metaonly.go",
"types.generated.go", "types.generated.go",
"types.go", "types.go",
"zz_generated.deepcopy.go",
], ],
tags = ["automanaged"], tags = ["automanaged"],
deps = [ deps = [
"//pkg/api:go_default_library", "//pkg/api:go_default_library",
"//vendor/github.com/ugorji/go/codec:go_default_library", "//vendor/github.com/ugorji/go/codec:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
......
...@@ -23,6 +23,9 @@ import ( ...@@ -23,6 +23,9 @@ import (
// MetadataOnlyObject allows decoding only the apiVersion, kind, and metadata fields of // MetadataOnlyObject allows decoding only the apiVersion, kind, and metadata fields of
// JSON data. // JSON data.
// TODO: enable meta-only decoding for protobuf. // TODO: enable meta-only decoding for protobuf.
//
// +k8s:deepcopy-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type MetadataOnlyObject struct { type MetadataOnlyObject struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
// +optional // +optional
...@@ -32,6 +35,9 @@ type MetadataOnlyObject struct { ...@@ -32,6 +35,9 @@ type MetadataOnlyObject struct {
// MetadataOnlyObjectList allows decoding from JSON data only the typemeta and metadata of // MetadataOnlyObjectList allows decoding from JSON data only the typemeta and metadata of
// a list, and those of the enclosing objects. // a list, and those of the enclosing objects.
// TODO: enable meta-only decoding for protobuf. // TODO: enable meta-only decoding for protobuf.
//
// +k8s:deepcopy-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type MetadataOnlyObjectList struct { type MetadataOnlyObjectList struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
// +optional // +optional
......
// +build !ignore_autogenerated
/*
Copyright 2017 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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package metaonly
import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)
// Deprecated: GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*MetadataOnlyObject).DeepCopyInto(out.(*MetadataOnlyObject))
return nil
}, InType: reflect.TypeOf(&MetadataOnlyObject{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*MetadataOnlyObjectList).DeepCopyInto(out.(*MetadataOnlyObjectList))
return nil
}, InType: reflect.TypeOf(&MetadataOnlyObjectList{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MetadataOnlyObject) DeepCopyInto(out *MetadataOnlyObject) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new MetadataOnlyObject.
func (x *MetadataOnlyObject) DeepCopy() *MetadataOnlyObject {
if x == nil {
return nil
}
out := new(MetadataOnlyObject)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *MetadataOnlyObject) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MetadataOnlyObjectList) DeepCopyInto(out *MetadataOnlyObjectList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]MetadataOnlyObject, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new MetadataOnlyObjectList.
func (x *MetadataOnlyObjectList) DeepCopy() *MetadataOnlyObjectList {
if x == nil {
return nil
}
out := new(MetadataOnlyObjectList)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *MetadataOnlyObjectList) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
...@@ -48,6 +48,7 @@ openapi_library( ...@@ -48,6 +48,7 @@ openapi_library(
"k8s.io/apimachinery/pkg/version", "k8s.io/apimachinery/pkg/version",
"k8s.io/apiserver/pkg/apis/audit/v1alpha1", "k8s.io/apiserver/pkg/apis/audit/v1alpha1",
"k8s.io/apiserver/pkg/apis/example/v1", "k8s.io/apiserver/pkg/apis/example/v1",
"k8s.io/client-go/pkg/version",
"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1", "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1",
"k8s.io/metrics/pkg/apis/custom_metrics/v1alpha1", "k8s.io/metrics/pkg/apis/custom_metrics/v1alpha1",
"k8s.io/metrics/pkg/apis/metrics/v1alpha1", "k8s.io/metrics/pkg/apis/metrics/v1alpha1",
......
...@@ -7,7 +7,10 @@ load( ...@@ -7,7 +7,10 @@ load(
go_library( go_library(
name = "go_default_library", name = "go_default_library",
srcs = ["fake.go"], srcs = [
"fake.go",
"zz_generated.deepcopy.go",
],
tags = ["automanaged"], tags = ["automanaged"],
visibility = [ visibility = [
"//build/visible_to:pkg_kubectl_cmd_testing_CONSUMERS", "//build/visible_to:pkg_kubectl_cmd_testing_CONSUMERS",
...@@ -30,6 +33,7 @@ go_library( ...@@ -30,6 +33,7 @@ go_library(
"//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
......
...@@ -49,6 +49,8 @@ import ( ...@@ -49,6 +49,8 @@ import (
"k8s.io/kubernetes/pkg/printers" "k8s.io/kubernetes/pkg/printers"
) )
// +k8s:deepcopy-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type InternalType struct { type InternalType struct {
Kind string Kind string
APIVersion string APIVersion string
...@@ -56,6 +58,8 @@ type InternalType struct { ...@@ -56,6 +58,8 @@ type InternalType struct {
Name string Name string
} }
// +k8s:deepcopy-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ExternalType struct { type ExternalType struct {
Kind string `json:"kind"` Kind string `json:"kind"`
APIVersion string `json:"apiVersion"` APIVersion string `json:"apiVersion"`
...@@ -63,6 +67,8 @@ type ExternalType struct { ...@@ -63,6 +67,8 @@ type ExternalType struct {
Name string `json:"name"` Name string `json:"name"`
} }
// +k8s:deepcopy-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ExternalType2 struct { type ExternalType2 struct {
Kind string `json:"kind"` Kind string `json:"kind"`
APIVersion string `json:"apiVersion"` APIVersion string `json:"apiVersion"`
...@@ -99,6 +105,8 @@ func NewInternalType(kind, apiversion, name string) *InternalType { ...@@ -99,6 +105,8 @@ func NewInternalType(kind, apiversion, name string) *InternalType {
return &item return &item
} }
// +k8s:deepcopy-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type InternalNamespacedType struct { type InternalNamespacedType struct {
Kind string Kind string
APIVersion string APIVersion string
...@@ -107,6 +115,8 @@ type InternalNamespacedType struct { ...@@ -107,6 +115,8 @@ type InternalNamespacedType struct {
Namespace string Namespace string
} }
// +k8s:deepcopy-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ExternalNamespacedType struct { type ExternalNamespacedType struct {
Kind string `json:"kind"` Kind string `json:"kind"`
APIVersion string `json:"apiVersion"` APIVersion string `json:"apiVersion"`
...@@ -115,6 +125,8 @@ type ExternalNamespacedType struct { ...@@ -115,6 +125,8 @@ type ExternalNamespacedType struct {
Namespace string `json:"namespace"` Namespace string `json:"namespace"`
} }
// +k8s:deepcopy-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ExternalNamespacedType2 struct { type ExternalNamespacedType2 struct {
Kind string `json:"kind"` Kind string `json:"kind"`
APIVersion string `json:"apiVersion"` APIVersion string `json:"apiVersion"`
......
// +build !ignore_autogenerated
/*
Copyright 2017 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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package testing
import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)
// Deprecated: GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ExternalNamespacedType).DeepCopyInto(out.(*ExternalNamespacedType))
return nil
}, InType: reflect.TypeOf(&ExternalNamespacedType{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ExternalNamespacedType2).DeepCopyInto(out.(*ExternalNamespacedType2))
return nil
}, InType: reflect.TypeOf(&ExternalNamespacedType2{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ExternalType).DeepCopyInto(out.(*ExternalType))
return nil
}, InType: reflect.TypeOf(&ExternalType{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ExternalType2).DeepCopyInto(out.(*ExternalType2))
return nil
}, InType: reflect.TypeOf(&ExternalType2{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*InternalNamespacedType).DeepCopyInto(out.(*InternalNamespacedType))
return nil
}, InType: reflect.TypeOf(&InternalNamespacedType{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*InternalType).DeepCopyInto(out.(*InternalType))
return nil
}, InType: reflect.TypeOf(&InternalType{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ExternalNamespacedType) DeepCopyInto(out *ExternalNamespacedType) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ExternalNamespacedType.
func (x *ExternalNamespacedType) DeepCopy() *ExternalNamespacedType {
if x == nil {
return nil
}
out := new(ExternalNamespacedType)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *ExternalNamespacedType) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ExternalNamespacedType2) DeepCopyInto(out *ExternalNamespacedType2) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ExternalNamespacedType2.
func (x *ExternalNamespacedType2) DeepCopy() *ExternalNamespacedType2 {
if x == nil {
return nil
}
out := new(ExternalNamespacedType2)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *ExternalNamespacedType2) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ExternalType) DeepCopyInto(out *ExternalType) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ExternalType.
func (x *ExternalType) DeepCopy() *ExternalType {
if x == nil {
return nil
}
out := new(ExternalType)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *ExternalType) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ExternalType2) DeepCopyInto(out *ExternalType2) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new ExternalType2.
func (x *ExternalType2) DeepCopy() *ExternalType2 {
if x == nil {
return nil
}
out := new(ExternalType2)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *ExternalType2) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *InternalNamespacedType) DeepCopyInto(out *InternalNamespacedType) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new InternalNamespacedType.
func (x *InternalNamespacedType) DeepCopy() *InternalNamespacedType {
if x == nil {
return nil
}
out := new(InternalNamespacedType)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *InternalNamespacedType) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *InternalType) DeepCopyInto(out *InternalType) {
*out = *in
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new InternalType.
func (x *InternalType) DeepCopy() *InternalType {
if x == nil {
return nil
}
out := new(InternalType)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *InternalType) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
...@@ -10,6 +10,7 @@ go_library( ...@@ -10,6 +10,7 @@ go_library(
srcs = [ srcs = [
"types.generated.go", "types.generated.go",
"types.go", "types.go",
"zz_generated.deepcopy.go",
], ],
tags = ["automanaged"], tags = ["automanaged"],
visibility = [ visibility = [
...@@ -18,6 +19,8 @@ go_library( ...@@ -18,6 +19,8 @@ go_library(
deps = [ deps = [
"//vendor/github.com/ugorji/go/codec:go_default_library", "//vendor/github.com/ugorji/go/codec:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
], ],
) )
......
...@@ -20,6 +20,8 @@ import ( ...@@ -20,6 +20,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type TestStruct struct { type TestStruct struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
// +optional // +optional
......
// +build !ignore_autogenerated
/*
Copyright 2017 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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package testing
import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)
// Deprecated: GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TestStruct).DeepCopyInto(out.(*TestStruct))
return nil
}, InType: reflect.TypeOf(&TestStruct{})},
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestStruct) DeepCopyInto(out *TestStruct) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.Map != nil {
in, out := &in.Map, &out.Map
*out = make(map[string]int, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.StringList != nil {
in, out := &in.StringList, &out.StringList
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.IntList != nil {
in, out := &in.IntList, &out.IntList
*out = make([]int, len(*in))
copy(*out, *in)
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new TestStruct.
func (x *TestStruct) DeepCopy() *TestStruct {
if x == nil {
return nil
}
out := new(TestStruct)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *TestStruct) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
...@@ -78,6 +78,8 @@ type NetworkPlugin interface { ...@@ -78,6 +78,8 @@ type NetworkPlugin interface {
Status() error Status() error
} }
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PodNetworkStatus stores the network status of a pod (currently just the primary IP address) // PodNetworkStatus stores the network status of a pod (currently just the primary IP address)
// This struct represents version "v1beta1" // This struct represents version "v1beta1"
type PodNetworkStatus struct { type PodNetworkStatus struct {
......
...@@ -215,10 +215,24 @@ type TestPrintType struct { ...@@ -215,10 +215,24 @@ type TestPrintType struct {
} }
func (obj *TestPrintType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } func (obj *TestPrintType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
func (obj *TestPrintType) DeepCopyObject() runtime.Object {
if obj == nil {
return nil
}
clone := *obj
return &clone
}
type TestUnknownType struct{} type TestUnknownType struct{}
func (obj *TestUnknownType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } func (obj *TestUnknownType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
func (obj *TestUnknownType) DeepCopyObject() runtime.Object {
if obj == nil {
return nil
}
clone := *obj
return &clone
}
func TestPrinter(t *testing.T) { func TestPrinter(t *testing.T) {
//test inputs //test inputs
......
...@@ -21,6 +21,8 @@ import ( ...@@ -21,6 +21,8 @@ import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Configuration provides configuration for the PodTolerationRestriction admission controller. // Configuration provides configuration for the PodTolerationRestriction admission controller.
type Configuration struct { type Configuration struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -21,6 +21,8 @@ import ( ...@@ -21,6 +21,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Configuration provides configuration for the PodTolerationRestriction admission controller. // Configuration provides configuration for the PodTolerationRestriction admission controller.
type Configuration struct { type Configuration struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
......
...@@ -27,42 +27,58 @@ import ( ...@@ -27,42 +27,58 @@ import (
reflect "reflect" reflect "reflect"
) )
// Deprecated: register deep-copy functions.
func init() { func init() {
SchemeBuilder.Register(RegisterDeepCopies) SchemeBuilder.Register(RegisterDeepCopies)
} }
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes. // to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error { func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs( return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Configuration, InType: reflect.TypeOf(&Configuration{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Configuration).DeepCopyInto(out.(*Configuration))
return nil
}, InType: reflect.TypeOf(&Configuration{})},
) )
} }
// DeepCopy_v1alpha1_Configuration is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_v1alpha1_Configuration(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *Configuration) DeepCopyInto(out *Configuration) {
{ *out = *in
in := in.(*Configuration) out.TypeMeta = in.TypeMeta
out := out.(*Configuration) if in.Default != nil {
*out = *in in, out := &in.Default, &out.Default
if in.Default != nil { *out = make([]v1.Toleration, len(*in))
in, out := &in.Default, &out.Default for i := range *in {
*out = make([]v1.Toleration, len(*in)) (*in)[i].DeepCopyInto(&(*out)[i])
for i := range *in {
if err := v1.DeepCopy_v1_Toleration(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} }
if in.Whitelist != nil { }
in, out := &in.Whitelist, &out.Whitelist if in.Whitelist != nil {
*out = make([]v1.Toleration, len(*in)) in, out := &in.Whitelist, &out.Whitelist
for i := range *in { *out = make([]v1.Toleration, len(*in))
if err := v1.DeepCopy_v1_Toleration(&(*in)[i], &(*out)[i], c); err != nil { for i := range *in {
return err (*in)[i].DeepCopyInto(&(*out)[i])
}
}
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Configuration.
func (x *Configuration) DeepCopy() *Configuration {
if x == nil {
return nil
}
out := new(Configuration)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *Configuration) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil return nil
} }
} }
...@@ -27,42 +27,58 @@ import ( ...@@ -27,42 +27,58 @@ import (
reflect "reflect" reflect "reflect"
) )
// Deprecated: register deep-copy functions.
func init() { func init() {
SchemeBuilder.Register(RegisterDeepCopies) SchemeBuilder.Register(RegisterDeepCopies)
} }
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes. // to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error { func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs( return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_podtolerationrestriction_Configuration, InType: reflect.TypeOf(&Configuration{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Configuration).DeepCopyInto(out.(*Configuration))
return nil
}, InType: reflect.TypeOf(&Configuration{})},
) )
} }
// DeepCopy_podtolerationrestriction_Configuration is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_podtolerationrestriction_Configuration(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *Configuration) DeepCopyInto(out *Configuration) {
{ *out = *in
in := in.(*Configuration) out.TypeMeta = in.TypeMeta
out := out.(*Configuration) if in.Default != nil {
*out = *in in, out := &in.Default, &out.Default
if in.Default != nil { *out = make([]api.Toleration, len(*in))
in, out := &in.Default, &out.Default for i := range *in {
*out = make([]api.Toleration, len(*in)) (*in)[i].DeepCopyInto(&(*out)[i])
for i := range *in {
if err := api.DeepCopy_api_Toleration(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} }
if in.Whitelist != nil { }
in, out := &in.Whitelist, &out.Whitelist if in.Whitelist != nil {
*out = make([]api.Toleration, len(*in)) in, out := &in.Whitelist, &out.Whitelist
for i := range *in { *out = make([]api.Toleration, len(*in))
if err := api.DeepCopy_api_Toleration(&(*in)[i], &(*out)[i], c); err != nil { for i := range *in {
return err (*in)[i].DeepCopyInto(&(*out)[i])
}
}
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Configuration.
func (x *Configuration) DeepCopy() *Configuration {
if x == nil {
return nil
}
out := new(Configuration)
x.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (x *Configuration) DeepCopyObject() runtime.Object {
if c := x.DeepCopy(); c != nil {
return c
} else {
return nil return nil
} }
} }
...@@ -18,6 +18,8 @@ package resourcequota ...@@ -18,6 +18,8 @@ package resourcequota
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Configuration provides configuration for the ResourceQuota admission controller. // Configuration provides configuration for the ResourceQuota admission controller.
type Configuration struct { type Configuration struct {
metav1.TypeMeta metav1.TypeMeta
......
...@@ -18,6 +18,8 @@ package v1alpha1 ...@@ -18,6 +18,8 @@ package v1alpha1
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Configuration provides configuration for the ResourceQuota admission controller. // Configuration provides configuration for the ResourceQuota admission controller.
type Configuration struct { type Configuration struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
......
...@@ -26,49 +26,76 @@ import ( ...@@ -26,49 +26,76 @@ import (
reflect "reflect" reflect "reflect"
) )
// Deprecated: register deep-copy functions.
func init() { func init() {
SchemeBuilder.Register(RegisterDeepCopies) SchemeBuilder.Register(RegisterDeepCopies)
} }
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes. // to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error { func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs( return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Configuration, InType: reflect.TypeOf(&Configuration{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_LimitedResource, InType: reflect.TypeOf(&LimitedResource{})}, in.(*Configuration).DeepCopyInto(out.(*Configuration))
return nil
}, InType: reflect.TypeOf(&Configuration{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*LimitedResource).DeepCopyInto(out.(*LimitedResource))
return nil
}, InType: reflect.TypeOf(&LimitedResource{})},
) )
} }
// DeepCopy_v1alpha1_Configuration is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_v1alpha1_Configuration(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *Configuration) DeepCopyInto(out *Configuration) {
{ *out = *in
in := in.(*Configuration) out.TypeMeta = in.TypeMeta
out := out.(*Configuration) if in.LimitedResources != nil {
*out = *in in, out := &in.LimitedResources, &out.LimitedResources
if in.LimitedResources != nil { *out = make([]LimitedResource, len(*in))
in, out := &in.LimitedResources, &out.LimitedResources for i := range *in {
*out = make([]LimitedResource, len(*in)) (*in)[i].DeepCopyInto(&(*out)[i])
for i := range *in {
if err := DeepCopy_v1alpha1_LimitedResource(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Configuration.
func (x *Configuration) DeepCopy() *Configuration {
if x == nil {
return nil return nil
} }
out := new(Configuration)
x.DeepCopyInto(out)
return out
} }
// DeepCopy_v1alpha1_LimitedResource is an autogenerated deepcopy function. // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func DeepCopy_v1alpha1_LimitedResource(in interface{}, out interface{}, c *conversion.Cloner) error { func (x *Configuration) DeepCopyObject() runtime.Object {
{ if c := x.DeepCopy(); c != nil {
in := in.(*LimitedResource) return c
out := out.(*LimitedResource) } else {
*out = *in return nil
if in.MatchContains != nil { }
in, out := &in.MatchContains, &out.MatchContains }
*out = make([]string, len(*in))
copy(*out, *in) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
} func (in *LimitedResource) DeepCopyInto(out *LimitedResource) {
*out = *in
if in.MatchContains != nil {
in, out := &in.MatchContains, &out.MatchContains
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new LimitedResource.
func (x *LimitedResource) DeepCopy() *LimitedResource {
if x == nil {
return nil return nil
} }
out := new(LimitedResource)
x.DeepCopyInto(out)
return out
} }
...@@ -26,49 +26,76 @@ import ( ...@@ -26,49 +26,76 @@ import (
reflect "reflect" reflect "reflect"
) )
// Deprecated: register deep-copy functions.
func init() { func init() {
SchemeBuilder.Register(RegisterDeepCopies) SchemeBuilder.Register(RegisterDeepCopies)
} }
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public // Deprecated: RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes. // to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error { func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs( return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_resourcequota_Configuration, InType: reflect.TypeOf(&Configuration{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_resourcequota_LimitedResource, InType: reflect.TypeOf(&LimitedResource{})}, in.(*Configuration).DeepCopyInto(out.(*Configuration))
return nil
}, InType: reflect.TypeOf(&Configuration{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*LimitedResource).DeepCopyInto(out.(*LimitedResource))
return nil
}, InType: reflect.TypeOf(&LimitedResource{})},
) )
} }
// DeepCopy_resourcequota_Configuration is an autogenerated deepcopy function. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func DeepCopy_resourcequota_Configuration(in interface{}, out interface{}, c *conversion.Cloner) error { func (in *Configuration) DeepCopyInto(out *Configuration) {
{ *out = *in
in := in.(*Configuration) out.TypeMeta = in.TypeMeta
out := out.(*Configuration) if in.LimitedResources != nil {
*out = *in in, out := &in.LimitedResources, &out.LimitedResources
if in.LimitedResources != nil { *out = make([]LimitedResource, len(*in))
in, out := &in.LimitedResources, &out.LimitedResources for i := range *in {
*out = make([]LimitedResource, len(*in)) (*in)[i].DeepCopyInto(&(*out)[i])
for i := range *in {
if err := DeepCopy_resourcequota_LimitedResource(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} }
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new Configuration.
func (x *Configuration) DeepCopy() *Configuration {
if x == nil {
return nil return nil
} }
out := new(Configuration)
x.DeepCopyInto(out)
return out
} }
// DeepCopy_resourcequota_LimitedResource is an autogenerated deepcopy function. // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func DeepCopy_resourcequota_LimitedResource(in interface{}, out interface{}, c *conversion.Cloner) error { func (x *Configuration) DeepCopyObject() runtime.Object {
{ if c := x.DeepCopy(); c != nil {
in := in.(*LimitedResource) return c
out := out.(*LimitedResource) } else {
*out = *in return nil
if in.MatchContains != nil { }
in, out := &in.MatchContains, &out.MatchContains }
*out = make([]string, len(*in))
copy(*out, *in) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
} func (in *LimitedResource) DeepCopyInto(out *LimitedResource) {
*out = *in
if in.MatchContains != nil {
in, out := &in.MatchContains, &out.MatchContains
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, creating a new LimitedResource.
func (x *LimitedResource) DeepCopy() *LimitedResource {
if x == nil {
return nil return nil
} }
out := new(LimitedResource)
x.DeepCopyInto(out)
return out
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment