Vendor: Update k8s version

Signed-off-by: Michał Żyłowski <michal.zylowski@intel.com>
This commit is contained in:
Michał Żyłowski 2017-02-03 14:41:32 +01:00
parent dfa93414c5
commit 52baf68d50
3756 changed files with 113013 additions and 92675 deletions

View file

@ -17,7 +17,6 @@ go_library(
],
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/conversion",
"//vendor:k8s.io/apimachinery/pkg/runtime",

View file

@ -12,9 +12,12 @@ go_library(
srcs = ["install.go"],
tags = ["automanaged"],
deps = [
"//pkg/apimachinery/announced:go_default_library",
"//pkg/api:go_default_library",
"//pkg/apis/imagepolicy:go_default_library",
"//pkg/apis/imagepolicy/v1alpha1:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apimachinery/announced",
"//vendor:k8s.io/apimachinery/pkg/apimachinery/registered",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/util/sets",
],
)

View file

@ -19,13 +19,21 @@ limitations under the License.
package install
import (
"k8s.io/apimachinery/pkg/apimachinery/announced"
"k8s.io/apimachinery/pkg/apimachinery/registered"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/kubernetes/pkg/apimachinery/announced"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/imagepolicy"
"k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1"
)
func init() {
Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
}
// Install registers the API group and adds types to a scheme
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
if err := announced.NewGroupMetaFactory(
&announced.GroupMetaFactoryArgs{
GroupName: imagepolicy.GroupName,
@ -37,7 +45,7 @@ func init() {
announced.VersionToSchemeFunc{
v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme,
},
).Announce().RegisterAndEnable(); err != nil {
).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
panic(err)
}
}

View file

@ -17,10 +17,8 @@ limitations under the License.
package imagepolicy
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/kubernetes/pkg/api"
)
// GroupName is the group name use in this package
@ -46,11 +44,6 @@ var (
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&api.ListOptions{},
&api.DeleteOptions{},
&metav1.ExportOptions{},
&metav1.GetOptions{},
&ImageReview{},
)
// metav1.AddToGroupVersion(scheme, SchemeGroupVersion)

View file

@ -18,7 +18,6 @@ package imagepolicy
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/api"
)
// +genclient=true
@ -28,7 +27,7 @@ import (
// ImageReview checks if the set of images in a pod are allowed.
type ImageReview struct {
metav1.TypeMeta
api.ObjectMeta
metav1.ObjectMeta
// Spec holds information about the pod being evaluated
Spec ImageReviewSpec

View file

@ -22,7 +22,6 @@ go_library(
],
tags = ["automanaged"],
deps = [
"//pkg/api/v1:go_default_library",
"//pkg/apis/imagepolicy:go_default_library",
"//vendor:github.com/gogo/protobuf/proto",
"//vendor:github.com/gogo/protobuf/sortkeys",

View file

@ -316,7 +316,7 @@ func (this *ImageReview) String() string {
return "nil"
}
s := strings.Join([]string{`&ImageReview{`,
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
`Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ImageReviewSpec", "ImageReviewSpec", 1), `&`, ``, 1) + `,`,
`Status:` + strings.Replace(strings.Replace(this.Status.String(), "ImageReviewStatus", "ImageReviewStatus", 1), `&`, ``, 1) + `,`,
`}`,
@ -1019,42 +1019,43 @@ var (
)
var fileDescriptorGenerated = []byte{
// 588 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x92, 0xbf, 0x6f, 0x13, 0x31,
0x14, 0xc7, 0x73, 0x49, 0x7f, 0xc5, 0x01, 0xda, 0x1a, 0x86, 0x28, 0xc3, 0xb5, 0x0a, 0x12, 0x2a,
0x08, 0x6c, 0xa5, 0x42, 0xa8, 0x62, 0xa0, 0xf4, 0x10, 0x43, 0x07, 0x40, 0x98, 0x05, 0xb1, 0x39,
0xd7, 0xd7, 0x8b, 0x9b, 0x3b, 0xfb, 0x74, 0xf6, 0xa5, 0xca, 0x80, 0xc4, 0xc8, 0xc0, 0xc0, 0x7f,
0xc3, 0xbf, 0xd0, 0xb1, 0x23, 0x53, 0x45, 0xc3, 0x3f, 0x82, 0xce, 0x77, 0xe9, 0x1d, 0x4d, 0x23,
0x84, 0xb2, 0xf9, 0xf9, 0xf9, 0x7d, 0xbe, 0x5f, 0xbf, 0xf7, 0xd0, 0xfe, 0x70, 0x4f, 0x13, 0xa1,
0xe8, 0x30, 0xed, 0x43, 0x22, 0xc1, 0x80, 0xa6, 0xf1, 0x30, 0xa0, 0x3c, 0x16, 0x9a, 0x8a, 0x88,
0x07, 0x10, 0xab, 0x50, 0xf8, 0x63, 0x3a, 0xea, 0xf1, 0x30, 0x1e, 0xf0, 0x1e, 0x0d, 0x40, 0x42,
0xc2, 0x0d, 0x1c, 0x91, 0x38, 0x51, 0x46, 0x61, 0x9a, 0x03, 0x48, 0x09, 0x20, 0xf1, 0x30, 0x20,
0x19, 0x80, 0x54, 0x00, 0x64, 0x0a, 0xe8, 0x3c, 0x09, 0x84, 0x19, 0xa4, 0x7d,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x47, 0x7c, 0x07, 0x2d, 0x8e, 0x79, 0x94, 0x81, 0xfd, 0x86,
0x6d, 0x56, 0x04, 0xcf, 0x9a, 0x3b, 0x4e, 0xef, 0x10, 0xad, 0xcf, 0x2d, 0x1f, 0xdf, 0x47, 0xcb,
0x3c, 0x8a, 0xd4, 0x31, 0x1c, 0x58, 0xc8, 0x8a, 0xbf, 0x5a, 0x7a, 0x58, 0xde, 0x2b, 0xae, 0xd9,
0x2c, 0x8f, 0xef, 0xa1, 0xa5, 0x14, 0xb8, 0x56, 0xb2, 0x40, 0x57, 0xff, 0x86, 0xd9, 0x5b, 0x56,
0x66, 0xfd, 0x07, 0x27, 0xe7, 0x5e, 0xe3, 0xf4, 0xdc, 0x6b, 0xfc, 0x38, 0xf7, 0x1a, 0x9f, 0xa7,
0x9e, 0x73, 0x32, 0xf5, 0x9c, 0xd3, 0xa9, 0xe7, 0xfc, 0x9c, 0x7a, 0xce, 0xb7, 0x5f, 0x5e, 0xe3,
0xc3, 0xca, 0x6c, 0x8e, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x81, 0x72, 0x5a, 0x7b, 0x05,
0x00, 0x00,
}

View file

@ -34,7 +34,7 @@ option go_package = "v1alpha1";
// ImageReview checks if the set of images in a pod are allowed.
message ImageReview {
// +optional
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec holds information about the pod being evaluated
optional ImageReviewSpec spec = 2;

View file

@ -20,7 +20,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/kubernetes/pkg/api/v1"
)
// GroupName is the group name for this API.
@ -42,12 +41,8 @@ var (
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&v1.ListOptions{},
&v1.DeleteOptions{},
&metav1.ExportOptions{},
&metav1.GetOptions{},
&ImageReview{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View file

@ -26,8 +26,7 @@ import (
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
pkg3_types "k8s.io/apimachinery/pkg/types"
pkg2_v1 "k8s.io/kubernetes/pkg/api/v1"
pkg2_types "k8s.io/apimachinery/pkg/types"
"reflect"
"runtime"
time "time"
@ -64,10 +63,9 @@ func init() {
}
if false { // reference the types, but skip this branch at build/run time
var v0 pkg1_v1.TypeMeta
var v1 pkg3_types.UID
var v2 pkg2_v1.ObjectMeta
var v3 time.Time
_, _, _, _ = v0, v1, v2, v3
var v1 pkg2_types.UID
var v2 time.Time
_, _, _ = v0, v1, v2
}
}
@ -159,7 +157,13 @@ func (x *ImageReview) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[2] {
yy10 := &x.ObjectMeta
yy10.CodecEncodeSelf(e)
yym11 := z.EncBinary()
_ = yym11
if false {
} else if z.HasExtensions() && z.EncExt(yy10) {
} else {
z.EncFallback(yy10)
}
} else {
r.EncodeNil()
}
@ -169,7 +173,13 @@ func (x *ImageReview) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy12 := &x.ObjectMeta
yy12.CodecEncodeSelf(e)
yym13 := z.EncBinary()
_ = yym13
if false {
} else if z.HasExtensions() && z.EncExt(yy12) {
} else {
z.EncFallback(yy12)
}
}
}
if yyr2 || yy2arr2 {
@ -287,24 +297,30 @@ func (x *ImageReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
}
case "metadata":
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_v1.ObjectMeta{}
x.ObjectMeta = pkg1_v1.ObjectMeta{}
} else {
yyv8 := &x.ObjectMeta
yyv8.CodecDecodeSelf(d)
yym9 := z.DecBinary()
_ = yym9
if false {
} else if z.HasExtensions() && z.DecExt(yyv8) {
} else {
z.DecFallback(yyv8, false)
}
}
case "spec":
if r.TryDecodeAsNil() {
x.Spec = ImageReviewSpec{}
} else {
yyv9 := &x.Spec
yyv9.CodecDecodeSelf(d)
yyv10 := &x.Spec
yyv10.CodecDecodeSelf(d)
}
case "status":
if r.TryDecodeAsNil() {
x.Status = ImageReviewStatus{}
} else {
yyv10 := &x.Status
yyv10.CodecDecodeSelf(d)
yyv11 := &x.Status
yyv11.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys3)
@ -317,16 +333,16 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj11 int
var yyb11 bool
var yyhl11 bool = l >= 0
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
var yyj12 int
var yyb12 bool
var yyhl12 bool = l >= 0
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb11 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb11 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -334,21 +350,21 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
yyv12 := &x.Kind
yym13 := z.DecBinary()
_ = yym13
yyv13 := &x.Kind
yym14 := z.DecBinary()
_ = yym14
if false {
} else {
*((*string)(yyv12)) = r.DecodeString()
*((*string)(yyv13)) = r.DecodeString()
}
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb11 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb11 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -356,38 +372,44 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
yyv14 := &x.APIVersion
yym15 := z.DecBinary()
_ = yym15
yyv15 := &x.APIVersion
yym16 := z.DecBinary()
_ = yym16
if false {
} else {
*((*string)(yyv14)) = r.DecodeString()
*((*string)(yyv15)) = r.DecodeString()
}
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb11 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb11 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_v1.ObjectMeta{}
x.ObjectMeta = pkg1_v1.ObjectMeta{}
} else {
yyv16 := &x.ObjectMeta
yyv16.CodecDecodeSelf(d)
yyv17 := &x.ObjectMeta
yym18 := z.DecBinary()
_ = yym18
if false {
} else if z.HasExtensions() && z.DecExt(yyv17) {
} else {
z.DecFallback(yyv17, false)
}
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb11 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb11 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -395,16 +417,16 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Spec = ImageReviewSpec{}
} else {
yyv17 := &x.Spec
yyv17.CodecDecodeSelf(d)
yyv19 := &x.Spec
yyv19.CodecDecodeSelf(d)
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb11 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb11 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -412,21 +434,21 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Status = ImageReviewStatus{}
} else {
yyv18 := &x.Status
yyv18.CodecDecodeSelf(d)
yyv20 := &x.Status
yyv20.CodecDecodeSelf(d)
}
for {
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb11 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb11 {
if yyb12 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj11-1, "")
z.DecStructFieldNotFound(yyj12-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

View file

@ -18,7 +18,6 @@ package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/api/v1"
)
// +genclient=true
@ -29,7 +28,7 @@ import (
type ImageReview struct {
metav1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec holds information about the pod being evaluated
Spec ImageReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`

View file

@ -47,10 +47,7 @@ func RegisterConversions(scheme *runtime.Scheme) error {
}
func autoConvert_v1alpha1_ImageReview_To_imagepolicy_ImageReview(in *ImageReview, out *imagepolicy.ImageReview, s conversion.Scope) error {
// TODO: Inefficient conversion - can we improve it?
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
return err
}
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha1_ImageReviewSpec_To_imagepolicy_ImageReviewSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
@ -65,10 +62,7 @@ func Convert_v1alpha1_ImageReview_To_imagepolicy_ImageReview(in *ImageReview, ou
}
func autoConvert_imagepolicy_ImageReview_To_v1alpha1_ImageReview(in *imagepolicy.ImageReview, out *ImageReview, s conversion.Scope) error {
// TODO: Inefficient conversion - can we improve it?
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
return err
}
out.ObjectMeta = in.ObjectMeta
if err := Convert_imagepolicy_ImageReviewSpec_To_v1alpha1_ImageReviewSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}

View file

@ -21,9 +21,9 @@ limitations under the License.
package v1alpha1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
v1 "k8s.io/kubernetes/pkg/api/v1"
reflect "reflect"
)
@ -47,8 +47,10 @@ func DeepCopy_v1alpha1_ImageReview(in interface{}, out interface{}, c *conversio
in := in.(*ImageReview)
out := out.(*ImageReview)
*out = *in
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
return err
} else {
out.ObjectMeta = *newVal.(*v1.ObjectMeta)
}
if err := DeepCopy_v1alpha1_ImageReviewSpec(&in.Spec, &out.Spec, c); err != nil {
return err
@ -74,9 +76,7 @@ func DeepCopy_v1alpha1_ImageReviewSpec(in interface{}, out interface{}, c *conve
if in.Containers != nil {
in, out := &in.Containers, &out.Containers
*out = make([]ImageReviewContainerSpec, len(*in))
for i := range *in {
(*out)[i] = (*in)[i]
}
copy(*out, *in)
}
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations

View file

@ -21,9 +21,9 @@ limitations under the License.
package imagepolicy
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
api "k8s.io/kubernetes/pkg/api"
reflect "reflect"
)
@ -47,8 +47,10 @@ func DeepCopy_imagepolicy_ImageReview(in interface{}, out interface{}, c *conver
in := in.(*ImageReview)
out := out.(*ImageReview)
*out = *in
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
return err
} else {
out.ObjectMeta = *newVal.(*v1.ObjectMeta)
}
if err := DeepCopy_imagepolicy_ImageReviewSpec(&in.Spec, &out.Spec, c); err != nil {
return err
@ -74,9 +76,7 @@ func DeepCopy_imagepolicy_ImageReviewSpec(in interface{}, out interface{}, c *co
if in.Containers != nil {
in, out := &in.Containers, &out.Containers
*out = make([]ImageReviewContainerSpec, len(*in))
for i := range *in {
(*out)[i] = (*in)[i]
}
copy(*out, *in)
}
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations