Commit adbf7137 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #39916 from smarterclayton/generate_for_staging

Automatic merge from submit-queue Generate changes for staged repos (apimachinery, apiserver) Restores OpenAPI types, deepcopy, and bazel for meta/v1 types. Fixes #39912
parents 52a6ad0a e365195a
......@@ -2639,43 +2639,43 @@
},
{
"ImportPath": "k8s.io/gengo/args",
"Rev": "cfac487ed0c8217f3b1ac5d33c14f78b35291151"
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
},
{
"ImportPath": "k8s.io/gengo/examples/deepcopy-gen/generators",
"Rev": "cfac487ed0c8217f3b1ac5d33c14f78b35291151"
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
},
{
"ImportPath": "k8s.io/gengo/examples/defaulter-gen/generators",
"Rev": "cfac487ed0c8217f3b1ac5d33c14f78b35291151"
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
},
{
"ImportPath": "k8s.io/gengo/examples/import-boss/generators",
"Rev": "cfac487ed0c8217f3b1ac5d33c14f78b35291151"
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
},
{
"ImportPath": "k8s.io/gengo/examples/set-gen/generators",
"Rev": "cfac487ed0c8217f3b1ac5d33c14f78b35291151"
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
},
{
"ImportPath": "k8s.io/gengo/examples/set-gen/sets",
"Rev": "cfac487ed0c8217f3b1ac5d33c14f78b35291151"
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
},
{
"ImportPath": "k8s.io/gengo/generator",
"Rev": "cfac487ed0c8217f3b1ac5d33c14f78b35291151"
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
},
{
"ImportPath": "k8s.io/gengo/namer",
"Rev": "cfac487ed0c8217f3b1ac5d33c14f78b35291151"
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
},
{
"ImportPath": "k8s.io/gengo/parser",
"Rev": "cfac487ed0c8217f3b1ac5d33c14f78b35291151"
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
},
{
"ImportPath": "k8s.io/gengo/types",
"Rev": "cfac487ed0c8217f3b1ac5d33c14f78b35291151"
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
},
{
"ImportPath": "k8s.io/heapster/metrics/api/v1/types",
......
......@@ -36103,16 +36103,8 @@
}
},
"v1.Time": {
"description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.",
"required": [
"Time"
],
"properties": {
"Time": {
"type": "string",
"format": "date-time"
}
}
"type": "string",
"format": "date-time"
},
"v1.Volume": {
"description": "Volume represents a named volume in a pod that may be accessed by any container in the pod.",
......@@ -11953,16 +11953,8 @@
}
},
"v1.Time": {
"description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.",
"required": [
"Time"
],
"properties": {
"Time": {
"type": "string",
"format": "date-time"
}
}
"type": "string",
"format": "date-time"
},
"v1.Volume": {
"description": "Volume represents a named volume in a pod that may be accessed by any container in the pod.",
......
......@@ -36,7 +36,11 @@ trap "rm -f '${CACHE}'" HUP INT TERM ERR
# Example:
# kfind -type f -name foobar.go
function kfind() {
find . \
# include the "special" vendor directories which are actually part
# of the Kubernetes source tree - generators will use these for
# including certain core API concepts.
find -H . ./vendor/k8s.io/apimachinery ./vendor/k8s.io/apiserver \
\( \
-not \( \
\( \
-path ./vendor -o \
......@@ -47,6 +51,7 @@ function kfind() {
-path ./examples \
\) -prune \
\) \
\) \
"$@"
}
......
......@@ -15,7 +15,7 @@ limitations under the License.
*/
// +k8s:deepcopy-gen=package
// +k8s:openapi-gen=true
// +k8s:openapi-gen=false
// +k8s:defaulter-gen=TypeMeta
// +groupName=meta.k8s.io
......
......@@ -18,6 +18,7 @@ go_library(
"//pkg/api/resource:go_default_library",
"//pkg/util/intstr:go_default_library",
"//vendor:github.com/go-openapi/spec",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/openapi",
],
)
......
......@@ -22,6 +22,7 @@ package openapi
import (
spec "github.com/go-openapi/spec"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
openapi "k8s.io/apimachinery/pkg/openapi"
resource "k8s.io/kubernetes/pkg/api/resource"
intstr "k8s.io/kubernetes/pkg/util/intstr"
......@@ -8280,24 +8281,7 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions
},
Dependencies: []string{},
},
"v1.Time": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.",
Properties: map[string]spec.Schema{
"Time": {
SchemaProps: spec.SchemaProps{
Type: []string{"string"},
Format: "date-time",
},
},
},
Required: []string{"Time"},
},
},
Dependencies: []string{},
},
"v1.Timestamp": {
"v1.Time": v1.Time{}.OpenAPIDefinition(), "v1.Timestamp": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "Timestamp is a struct that is equivalent to Time, but intended for protobuf marshalling/unmarshalling. It is generated into a serialization that matches Time. Do not use in Go structs.",
......
......@@ -41,5 +41,6 @@ limitations under the License.
//
// As a bonus, a few common types useful from all api objects and versions
// are provided in types.go.
// +k8s:openapi-gen=false
package runtime // import "k8s.io/kubernetes/pkg/runtime"
......@@ -32,7 +32,6 @@ package runtime
//
// +k8s:deepcopy-gen=true
// +protobuf=true
// +k8s:openapi-gen=true
type TypeMeta struct {
// +optional
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"`
......@@ -88,7 +87,6 @@ const (
//
// +k8s:deepcopy-gen=true
// +protobuf=true
// +k8s:openapi-gen=true
type RawExtension struct {
// Raw is the underlying serialization of this object.
//
......@@ -107,7 +105,6 @@ type RawExtension struct {
//
// +k8s:deepcopy-gen=true
// +protobuf=true
// +k8s:openapi-gen=true
type Unknown struct {
TypeMeta `json:",inline" protobuf:"bytes,1,opt,name=typeMeta"`
// Raw will hold the complete serialized object which couldn't be matched
......
......@@ -42,6 +42,7 @@ CLIENT_REPO="${MAIN_REPO}/staging/src/${CLIENT_REPO_FROM_SRC}"
CLIENT_REPO_TEMP="${MAIN_REPO}/staging/src/${CLIENT_REPO_TEMP_FROM_SRC}"
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
sedi="-i"
cleanup() {
rm -rf "${CLIENT_REPO_TEMP}"
......@@ -89,7 +90,7 @@ GO15VENDOREXPERIMENT=1 godep save ./...
popd > /dev/null
echo "moving vendor/k8s.io/kubernetes"
cp -rn "${CLIENT_REPO_TEMP}"/vendor/k8s.io/kubernetes/* "${CLIENT_REPO_TEMP}"/
cp -r "${CLIENT_REPO_TEMP}"/vendor/k8s.io/kubernetes/* "${CLIENT_REPO_TEMP}"/
rm -rf "${CLIENT_REPO_TEMP}"/vendor/k8s.io/kubernetes
# client-go will share the vendor of the main repo for now. When client-go
# becomes a standalone repo, it will have its own vendor
......@@ -130,6 +131,13 @@ sed -i "s/kubernetes_build_info/kubernetes_build_info_copy/g" "${CLIENT_REPO_TEM
echo "rewrite proto names in proto.RegisterType"
find "${CLIENT_REPO_TEMP}" -type f -name "generated.pb.go" -print0 | xargs -0 sed -i "s/k8s\.io\.kubernetes/k8s.io.client-go/g"
# strip all generator tags from client-go
find "${CLIENT_REPO_TEMP}" -type f -name "*.go" -print0 | xargs -0 sed -i '/^\/\/ +k8s:openapi-gen=true/d'
find "${CLIENT_REPO_TEMP}" -type f -name "*.go" -print0 | xargs -0 sed -i '/^\/\/ +k8s:defaulter-gen=/d'
find "${CLIENT_REPO_TEMP}" -type f -name "*.go" -print0 | xargs -0 sed -i '/^\/\/ +k8s:deepcopy-gen=/d'
find "${CLIENT_REPO_TEMP}" -type f -name "*.go" -print0 | xargs -0 sed -i '/^\/\/ +k8s:conversion-gen=/d'
echo "rearranging directory layout"
# $1 and $2 are relative to ${CLIENT_REPO_TEMP}
function mvfolder {
......
......@@ -14,9 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
// +groupName=meta.k8s.io
package v1
......@@ -19,10 +19,11 @@ limitations under the License.
syntax = 'proto2';
package k8s.io.kubernetes.pkg.apis.meta.v1;
package k8s.io.apimachinery.pkg.apis.meta.v1;
import "k8s.io/kubernetes/pkg/runtime/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/schema/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
// Package-wide variables from generator "generated".
......@@ -457,6 +458,6 @@ message WatchEvent {
// * If Type is Deleted: the state of the object immediately before deletion.
// * If Type is Error: *Status is recommended; other types may make sense
// depending on context.
optional k8s.io.kubernetes.pkg.runtime.RawExtension object = 2;
optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 2;
}
......@@ -15,14 +15,14 @@ limitations under the License.
*/
// Code generated by protoc-gen-gogo.
// source: k8s.io/apimachinery/pkg/runtime/generated.proto
// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto
// DO NOT EDIT!
/*
Package runtime is a generated protocol buffer package.
It is generated from these files:
k8s.io/apimachinery/pkg/runtime/generated.proto
k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto
It has these top-level messages:
RawExtension
......@@ -62,9 +62,9 @@ func (*Unknown) ProtoMessage() {}
func (*Unknown) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func init() {
proto.RegisterType((*RawExtension)(nil), "k8s.io.client-go.pkg.runtime.RawExtension")
proto.RegisterType((*TypeMeta)(nil), "k8s.io.client-go.pkg.runtime.TypeMeta")
proto.RegisterType((*Unknown)(nil), "k8s.io.client-go.pkg.runtime.Unknown")
proto.RegisterType((*RawExtension)(nil), "k8s.io.apimachinery.pkg.runtime.RawExtension")
proto.RegisterType((*TypeMeta)(nil), "k8s.io.apimachinery.pkg.runtime.TypeMeta")
proto.RegisterType((*Unknown)(nil), "k8s.io.apimachinery.pkg.runtime.Unknown")
}
func (m *RawExtension) Marshal() (data []byte, err error) {
size := m.Size()
......@@ -738,30 +738,31 @@ var (
)
var fileDescriptorGenerated = []byte{
// 388 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x90, 0x3f, 0x8f, 0xda, 0x30,
0x18, 0xc6, 0x13, 0x40, 0x82, 0x1a, 0x24, 0x2a, 0x77, 0x68, 0x8a, 0x54, 0x83, 0x58, 0x5a, 0x06,
0x6c, 0x15, 0xa9, 0x52, 0x57, 0x82, 0x18, 0xaa, 0xaa, 0x52, 0x65, 0x95, 0x0e, 0x9d, 0x1a, 0x12,
0x37, 0xb5, 0x52, 0xec, 0xc8, 0x71, 0x94, 0x76, 0xeb, 0x47, 0xe8, 0xc7, 0x62, 0x64, 0xbc, 0x09,
0x1d, 0xb9, 0xcf, 0x70, 0xfb, 0x09, 0x63, 0xfe, 0x1c, 0xa0, 0xdb, 0xe2, 0xf7, 0xf9, 0x3d, 0xcf,
0xfb, 0xbc, 0x01, 0xc3, 0xe4, 0x43, 0x86, 0xb9, 0x24, 0x49, 0x3e, 0x67, 0x4a, 0x30, 0xcd, 0x32,
0x92, 0x26, 0x31, 0x51, 0xb9, 0xd0, 0x7c, 0xc1, 0x48, 0xcc, 0x04, 0x53, 0x81, 0x66, 0x11, 0x4e,
0x95, 0xd4, 0x12, 0xbe, 0xde, 0xe1, 0xf8, 0x88, 0xe3, 0x34, 0x89, 0xb1, 0xc5, 0x3b, 0xc3, 0x98,
0xeb, 0x5f, 0xf9, 0x1c, 0x87, 0x72, 0x41, 0x62,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27, 0x8f, 0x65, 0x7a, 0xce, 0xc3, 0xf7, 0xa0, 0x69, 0x47, 0xdb, 0xd5, 0x5e, 0xcd, 0xd8, 0x5f,
0x58, 0x7b, 0x73, 0x72, 0x94, 0xe8, 0x29, 0xe7, 0x0f, 0x96, 0x1b, 0xe4, 0xac, 0x36, 0xc8, 0xb9,
0xd9, 0x20, 0xe7, 0x5f, 0x89, 0xdc, 0x65, 0x89, 0xdc, 0x55, 0x89, 0xdc, 0xdb, 0x12, 0xb9, 0xff,
0xef, 0x90, 0xf3, 0xbd, 0x6e, 0x8f, 0x7c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x32, 0xc1, 0x73, 0x2d,
0x94, 0x02, 0x00, 0x00,
// 406 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x90, 0x4f, 0x8b, 0xd3, 0x40,
0x18, 0xc6, 0x93, 0x6d, 0xa1, 0xeb, 0xb4, 0xb0, 0x32, 0x1e, 0x8c, 0x3d, 0x4c, 0x96, 0x9e, 0xec,
0xc1, 0x19, 0x2c, 0x08, 0x5e, 0x37, 0xcb, 0x82, 0x22, 0x82, 0x0c, 0xfe, 0x01, 0x4f, 0x4e, 0x93,
0x31, 0x3b, 0xc4, 0xbe, 0x13, 0x26, 0x13, 0xe3, 0xde, 0xfc, 0x08, 0x7e, 0xac, 0x1e, 0xf7, 0xe8,
0xa9, 0xd8, 0xf8, 0x21, 0xbc, 0x4a, 0xa6, 0xd3, 0x5a, 0x5b, 0xc1, 0x5b, 0xe6, 0x7d, 0x9e, 0xdf,
0xf3, 0x3e, 0x6f, 0xd0, 0xb3, 0xe2, 0x69, 0x45, 0x95, 0x66, 0x45, 0x3d, 0x97, 0x06, 0xa4, 0x95,
0x15, 0xfb, 0x2c, 0x21, 0xd3, 0x86, 0x79, 0x41, 0x94, 0x6a, 0x21, 0xd2, 0x6b, 0x05, 0xd2, 0xdc,
0xb0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0xd2, 0xff, 0xfc, 0x62, 0xba, 0xad, 0x97,
0xdc, 0xf5, 0xe1, 0xbb, 0xc2, 0x7c, 0x17, 0xb6, 0xbd, 0xf0, 0xe4, 0xf8, 0x42, 0x7c, 0x81, 0xce,
0x52, 0x0d, 0x56, 0x82, 0xbd, 0x82, 0x54, 0x67, 0x0a, 0xf2, 0xa8, 0xe7, 0xca, 0xde, 0xf7, 0x79,
0x67, 0x97, 0x7f, 0xcb, 0xfc, 0xd0, 0x8f, 0x9f, 0xa0, 0xa1, 0x1f, 0x75, 0xab, 0xa3, 0xbe, 0xc3,
0xef, 0x79, 0x7c, 0x78, 0xf9, 0x47, 0xe2, 0xfb, 0xbe, 0x64, 0xba, 0x5c, 0x93, 0xe0, 0x76, 0x4d,
0x82, 0xef, 0x6b, 0x12, 0x7c, 0x6d, 0x49, 0xb8, 0x6c, 0x49, 0x78, 0xdb, 0x92, 0xf0, 0x47, 0x4b,
0xc2, 0x6f, 0x3f, 0x49, 0xf0, 0x7e, 0xe0, 0x8f, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xa5, 0x26,
0x55, 0x0f, 0xb3, 0x02, 0x00, 0x00,
}
......@@ -19,7 +19,7 @@ limitations under the License.
syntax = 'proto2';
package k8s.io.kubernetes.pkg.runtime;
package k8s.io.apimachinery.pkg.runtime;
import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
......
......@@ -15,14 +15,14 @@ limitations under the License.
*/
// Code generated by protoc-gen-gogo.
// source: k8s.io/apimachinery/pkg/runtime/schema/generated.proto
// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto
// DO NOT EDIT!
/*
Package schema is a generated protocol buffer package.
It is generated from these files:
k8s.io/apimachinery/pkg/runtime/schema/generated.proto
k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto
It has these top-level messages:
*/
......@@ -42,17 +42,19 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion1
var fileDescriptorGenerated = []byte{
// 183 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0xc9, 0xb6, 0x28, 0xd6,
0xcb, 0xcc, 0xd7, 0xcf, 0x2e, 0x4d, 0x4a, 0x2d, 0xca, 0x4b, 0x2d, 0x49, 0x2d, 0xd6, 0x2f, 0xc8,
0x4e, 0xd7, 0x2f, 0x2a, 0xcd, 0x2b, 0xc9, 0xcc, 0x4d, 0xd5, 0x2f, 0x4e, 0xce, 0x48, 0xcd, 0x4d,
0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9,
0x17, 0x52, 0x81, 0xe8, 0xd2, 0x43, 0xe8, 0xd2, 0x2b, 0xc8, 0x4e, 0xd7, 0x83, 0xea, 0xd2, 0x83,
0xe8, 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf,
0x4f, 0xcf, 0xd7, 0x07, 0x6b, 0x4e, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0xa8,
0x94, 0x21, 0x76, 0xa7, 0x94, 0x96, 0x64, 0xe6, 0xe8, 0x67, 0xe6, 0x95, 0x14, 0x97, 0x14, 0xa1,
0xbb, 0xc3, 0x49, 0xe3, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63,
0x68, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9,
0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x10, 0xc5, 0x06, 0x71, 0x0b, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8d,
0x74, 0x75, 0xa7, 0xe8, 0x00, 0x00, 0x00,
// 215 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0xce, 0xb1, 0x4e, 0xc4, 0x30,
0x0c, 0xc6, 0xf1, 0x76, 0x61, 0x60, 0x64, 0xec, 0xe0, 0x11, 0xb1, 0x10, 0x0b, 0x26, 0x66, 0x5e,
0x80, 0x9d, 0x2d, 0xed, 0x99, 0xd4, 0x2a, 0x8d, 0x23, 0xc7, 0x41, 0x62, 0xe3, 0x11, 0x78, 0xac,
0x1b, 0x6f, 0x64, 0xa4, 0xe5, 0x45, 0x10, 0xcd, 0x0d, 0xe8, 0x60, 0xcb, 0xa7, 0xe8, 0x67, 0xfd,
0xcf, 0x1f, 0xa6, 0xbb, 0xec, 0x58, 0x70, 0x2a, 0x3d, 0x69, 0x24, 0xa3, 0x8c, 0x2f, 0x14, 0x77,
0xa2, 0x78, 0xfc, 0xf0, 0x89, 0x67, 0x3f, 0x8c, 0x1c, 0x49, 0x5f, 0x31, 0x4d, 0x01, 0xb5, 0x44,
0xe3, 0x99, 0x30, 0x0f, 0x23, 0xcd, 0x1e, 0x03, 0x45, 0x52, 0x6f, 0xb4, 0x73, 0x49, 0xc5, 0xe4,
0xe2, 0xb2, 0x3a, 0xf7, 0xdb, 0xb9, 0x34, 0x05, 0x77, 0x74, 0xae, 0xba, 0xee, 0x3a, 0xb0, 0x8d,
0xa5, 0x77, 0x83, 0xcc, 0x18, 0x24, 0x08, 0x6e, 0xbc, 0x2f, 0x4f, 0xdb, 0xda, 0xc6, 0xf6, 0xaa,
0x67, 0xbb, 0xdb, 0xbf, 0x9d, 0x3f, 0x31, 0x3e, 0x31, 0x2a, 0x65, 0x29, 0x3a, 0xd0, 0x69, 0x4a,
0x77, 0xf3, 0xbf, 0x29, 0xc6, 0xcf, 0xc8, 0xd1, 0xb2, 0xe9, 0x29, 0xb9, 0xbf, 0xda, 0x2f, 0xd0,
0x1c, 0x16, 0x68, 0x3e, 0x16, 0x68, 0xde, 0x56, 0x68, 0xf7, 0x2b, 0xb4, 0x87, 0x15, 0xda, 0xcf,
0x15, 0xda, 0xf7, 0x2f, 0x68, 0x1e, 0xcf, 0x6a, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x86,
0xae, 0x35, 0x6c, 0x39, 0x01, 0x00, 0x00,
}
......@@ -19,8 +19,9 @@ limitations under the License.
syntax = 'proto2';
package k8s.io.kubernetes.pkg.runtime.schema;
package k8s.io.apimachinery.pkg.runtime.schema;
import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
// Package-wide variables from generator "generated".
......
......@@ -30,9 +30,7 @@ package runtime
// TypeMeta is provided here for convenience. You may use it directly from this package or define
// your own with the same fields.
//
// +k8s:deepcopy-gen=true
// +protobuf=true
// +k8s:openapi-gen=true
type TypeMeta struct {
// +optional
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"`
......@@ -86,9 +84,7 @@ const (
// in the Object. (TODO: In the case where the object is of an unknown type, a
// runtime.Unknown object will be created and stored.)
//
// +k8s:deepcopy-gen=true
// +protobuf=true
// +k8s:openapi-gen=true
type RawExtension struct {
// Raw is the underlying serialization of this object.
//
......@@ -105,9 +101,7 @@ type RawExtension struct {
// TODO: Make this object have easy access to field based accessors and settors for
// metadata and field mutatation.
//
// +k8s:deepcopy-gen=true
// +protobuf=true
// +k8s:openapi-gen=true
type Unknown struct {
TypeMeta `json:",inline" protobuf:"bytes,1,opt,name=typeMeta"`
// Raw will hold the complete serialized object which couldn't be matched
......
......@@ -88,7 +88,7 @@ func IsValidLabelValue(value string) []string {
}
const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?"
const dns1123LabelErrMsg string = "a valid DNS (RFC 1123) label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character"
const dns1123LabelErrMsg string = "a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character"
const DNS1123LabelMaxLength int = 63
var dns1123LabelRegexp = regexp.MustCompile("^" + dns1123LabelFmt + "$")
......@@ -107,7 +107,7 @@ func IsDNS1123Label(value string) []string {
}
const dns1123SubdomainFmt string = dns1123LabelFmt + "(\\." + dns1123LabelFmt + ")*"
const dns1123SubdomainErrorMsg string = "a valid DNS (RFC 1123) subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character"
const dns1123SubdomainErrorMsg string = "a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character"
const DNS1123SubdomainMaxLength int = 253
var dns1123SubdomainRegexp = regexp.MustCompile("^" + dns1123SubdomainFmt + "$")
......@@ -126,7 +126,7 @@ func IsDNS1123Subdomain(value string) []string {
}
const dns1035LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?"
const dns1035LabelErrMsg string = "a valid DNS (RFC 1035) label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character"
const dns1035LabelErrMsg string = "a DNS-1035 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character"
const DNS1035LabelMaxLength int = 63
var dns1035LabelRegexp = regexp.MustCompile("^" + dns1035LabelFmt + "$")
......@@ -149,7 +149,7 @@ func IsDNS1035Label(value string) []string {
// - valid: *.bar.com, *.foo.bar.com
// - invalid: *.*.bar.com, *.foo.*.com, *bar.com, f*.bar.com, *
const wildcardDNS1123SubdomainFmt = "\\*\\." + dns1123SubdomainFmt
const wildcardDNS1123SubdomainErrMsg = "a valid wildcard DNS (RFC 1123) subdomain must start with '*.', followed by a valid DNS subdomain, which must consist of lower case alphanumeric characters, '-' or '.' and end with an alphanumeric character"
const wildcardDNS1123SubdomainErrMsg = "a wildcard DNS-1123 subdomain must start with '*.', followed by a valid DNS subdomain, which must consist of lower case alphanumeric characters, '-' or '.' and end with an alphanumeric character"
// IsWildcardDNS1123Subdomain tests for a string that conforms to the definition of a
// wildcard subdomain in DNS (RFC 1034 section 4.3.3).
......
......@@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// Package api contains the latest (or "internal") version of the
// Kubernetes API objects. This is the API objects as represented in memory.
// The contract presented to clients is located in the versioned packages,
......
......@@ -54,7 +54,6 @@ var (
// int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster
// than operations on inf.Dec for values that can be represented as int64.
// +k8s:openapi-gen=true
type int64Amount struct {
value int64
scale Scale
......
......@@ -93,7 +93,6 @@ import (
// +protobuf.embed=string
// +protobuf.options.marshal=false
// +protobuf.options.(gogoproto.goproto_stringer)=false
// +k8s:openapi-gen=true
type Quantity struct {
// i is the quantity in int64 scaled form, if d.Dec == nil
i int64Amount
......
......@@ -14,10 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/api
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
// Package v1 is the v1 version of the API.
package v1
......@@ -14,6 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
package apps
......@@ -14,9 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
package v1beta1
......@@ -14,6 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +groupName=authentication.k8s.io
package authentication
......@@ -14,9 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authentication
// +groupName=authentication.k8s.io
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
package v1beta1
......@@ -14,6 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +groupName=authorization.k8s.io
package authorization
......@@ -14,10 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authorization
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
// +groupName=authorization.k8s.io
package v1beta1
......@@ -14,6 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
package autoscaling
......@@ -14,9 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
package v1
......@@ -14,6 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
package batch
......@@ -14,9 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
package v1
......@@ -14,9 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
package v2alpha1
......@@ -14,6 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +groupName=certificates.k8s.io
package certificates
......@@ -14,10 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/certificates
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
// +groupName=certificates.k8s.io
package v1alpha1
......@@ -14,6 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
package componentconfig
......@@ -14,9 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/componentconfig
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
package v1alpha1
......@@ -14,6 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
package extensions
......@@ -14,11 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
package v1beta1
......@@ -14,6 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +groupName=imagepolicy.k8s.io
package imagepolicy
......@@ -14,10 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/imagepolicy
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
// +groupName=imagepolicy.k8s.io
package v1alpha1
......@@ -14,6 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:defaulter-gen=TypeMeta
// +groupName=kubeadm.k8s.io
package v1alpha1
......@@ -14,6 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
package policy
......@@ -14,11 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/policy
// Package policy is for any kind of policy object. Suitable examples, even if
// they aren't all here, are PodDisruptionBudget, PodSecurityPolicy,
// NetworkPolicy, etc.
// +k8s:openapi-gen=true
package v1beta1
......@@ -14,6 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +groupName=rbac.authorization.k8s.io
package rbac
......@@ -124,7 +124,6 @@ func SubjectsStrings(subjects []Subject) ([]string, []string, []string, []string
return users, groups, sas, others
}
// +k8s:deepcopy-gen=false
// PolicyRuleBuilder let's us attach methods. A no-no for API types.
// We use it to construct rules in code. It's more compact than trying to write them
// out in a literal and allows us to perform some basic checking during construction
......@@ -197,7 +196,6 @@ func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) {
return r.PolicyRule, nil
}
// +k8s:deepcopy-gen=false
// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
// We use it to construct bindings in code. It's more compact than trying to write them
// out in a literal.
......
......@@ -14,10 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
// +groupName=rbac.authorization.k8s.io
package v1alpha1
......@@ -22,7 +22,6 @@ import (
"k8s.io/client-go/pkg/api/v1"
)
// +k8s:deepcopy-gen=false
// PolicyRuleBuilder let's us attach methods. A no-no for API types.
// We use it to construct rules in code. It's more compact than trying to write them
// out in a literal and allows us to perform some basic checking during construction
......@@ -89,7 +88,6 @@ func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) {
return r.PolicyRule, nil
}
// +k8s:deepcopy-gen=false
// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
// We use it to construct bindings in code. It's more compact than trying to write them
// out in a literal.
......
......@@ -14,6 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +groupName=storage.k8s.io
package storage
......@@ -14,9 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/storage
// +groupName=storage.k8s.io
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
package v1beta1
......@@ -14,6 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
package federation
......@@ -14,8 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=k8s.io/kubernetes/federation/apis/federation
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
package v1beta1
......@@ -39,7 +39,6 @@ import (
//
// +protobuf=true
// +protobuf.options.(gogoproto.goproto_stringer)=false
// +k8s:openapi-gen=true
type IntOrString struct {
Type Type `protobuf:"varint,1,opt,name=type,casttype=Type"`
IntVal int32 `protobuf:"varint,2,opt,name=intVal"`
......
......@@ -23,4 +23,4 @@ limitations under the License.
// * Multiple consumers and producers. In particular, it is allowed for an
// item to be reenqueued while it is being processed.
// * Shutdown notifications.
package workqueue // import "k8s.io/client-go/pkg/util/workqueue"
package workqueue
......@@ -16,5 +16,4 @@ limitations under the License.
// Package version supplies version information collected at build time to
// kubernetes components.
// +k8s:openapi-gen=true
package version
......@@ -226,8 +226,11 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
var peerPkgs []string
if customArgs, ok := arguments.CustomArgs.(*CustomArgs); ok {
if len(customArgs.ExtraPeerDirs) > 0 {
peerPkgs = append(peerPkgs, customArgs.ExtraPeerDirs...)
for _, pkg := range customArgs.ExtraPeerDirs {
if i := strings.Index(pkg, "/vendor/"); i != -1 {
pkg = pkg[i+len("/vendor/"):]
}
peerPkgs = append(peerPkgs, pkg)
}
}
// Make sure our peer-packages are added and fully parsed.
......
......@@ -171,6 +171,12 @@ func (b *Builder) AddFileForTest(pkg string, path string, src []byte) error {
// flag indicates whether this file was user-requested or just from following
// the import graph.
func (b *Builder) addFile(pkgPath importPathString, path string, src []byte, userRequested bool) error {
for _, p := range b.parsed[pkgPath] {
if path == p.name {
glog.V(5).Infof("addFile %s %s already parsed, skipping", pkgPath, path)
return nil
}
}
glog.V(6).Infof("addFile %s %s", pkgPath, path)
p, err := parser.ParseFile(b.fset, path, src, parser.DeclarationErrors|parser.ParseComments)
if err != nil {
......
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