commit
						558408ce07
					
				|  | @ -25,12 +25,6 @@ | |||
|   revision = "5741799b275a3c4a5a9623a993576d7545cf7b5c" | ||||
|   version = "v2.4.0" | ||||
| 
 | ||||
| [[projects]] | ||||
|   name = "github.com/emicklei/go-restful-swagger12" | ||||
|   packages = ["."] | ||||
|   revision = "dcef7f55730566d41eae5db10e7d6981829720f6" | ||||
|   version = "1.0.1" | ||||
| 
 | ||||
| [[projects]] | ||||
|   name = "github.com/fsnotify/fsnotify" | ||||
|   packages = ["."] | ||||
|  | @ -274,20 +268,20 @@ | |||
| [[projects]] | ||||
|   branch = "master" | ||||
|   name = "k8s.io/api" | ||||
|   packages = ["admissionregistration/v1alpha1","apps/v1beta1","apps/v1beta2","authentication/v1","authentication/v1beta1","authorization/v1","authorization/v1beta1","autoscaling/v1","autoscaling/v2beta1","batch/v1","batch/v1beta1","batch/v2alpha1","certificates/v1beta1","core/v1","extensions/v1beta1","networking/v1","policy/v1beta1","rbac/v1","rbac/v1alpha1","rbac/v1beta1","scheduling/v1alpha1","settings/v1alpha1","storage/v1","storage/v1beta1"] | ||||
|   revision = "218912509d74a117d05a718bb926d0948e531c20" | ||||
|   packages = ["admissionregistration/v1alpha1","admissionregistration/v1beta1","apps/v1","apps/v1beta1","apps/v1beta2","authentication/v1","authentication/v1beta1","authorization/v1","authorization/v1beta1","autoscaling/v1","autoscaling/v2beta1","batch/v1","batch/v1beta1","batch/v2alpha1","certificates/v1beta1","core/v1","events/v1beta1","extensions/v1beta1","networking/v1","policy/v1beta1","rbac/v1","rbac/v1alpha1","rbac/v1beta1","scheduling/v1alpha1","settings/v1alpha1","storage/v1","storage/v1alpha1","storage/v1beta1"] | ||||
|   revision = "9382f5a87a364c195477134986b578d103c7c24d" | ||||
| 
 | ||||
| [[projects]] | ||||
|   branch = "master" | ||||
|   name = "k8s.io/apimachinery" | ||||
|   packages = ["pkg/api/equality","pkg/api/errors","pkg/api/meta","pkg/api/resource","pkg/apis/meta/v1","pkg/apis/meta/v1/unstructured","pkg/apis/meta/v1alpha1","pkg/conversion","pkg/conversion/queryparams","pkg/conversion/unstructured","pkg/fields","pkg/labels","pkg/runtime","pkg/runtime/schema","pkg/runtime/serializer","pkg/runtime/serializer/json","pkg/runtime/serializer/protobuf","pkg/runtime/serializer/recognizer","pkg/runtime/serializer/streaming","pkg/runtime/serializer/versioning","pkg/selection","pkg/types","pkg/util/clock","pkg/util/diff","pkg/util/errors","pkg/util/framer","pkg/util/intstr","pkg/util/json","pkg/util/net","pkg/util/runtime","pkg/util/sets","pkg/util/validation","pkg/util/validation/field","pkg/util/wait","pkg/util/yaml","pkg/version","pkg/watch","third_party/forked/golang/reflect"] | ||||
|   packages = ["pkg/api/equality","pkg/api/errors","pkg/api/meta","pkg/api/resource","pkg/apis/meta/v1","pkg/apis/meta/v1/unstructured","pkg/apis/meta/v1alpha1","pkg/conversion","pkg/conversion/queryparams","pkg/conversion/unstructured","pkg/fields","pkg/labels","pkg/runtime","pkg/runtime/schema","pkg/runtime/serializer","pkg/runtime/serializer/json","pkg/runtime/serializer/protobuf","pkg/runtime/serializer/recognizer","pkg/runtime/serializer/streaming","pkg/runtime/serializer/versioning","pkg/selection","pkg/types","pkg/util/clock","pkg/util/diff","pkg/util/errors","pkg/util/framer","pkg/util/intstr","pkg/util/json","pkg/util/mergepatch","pkg/util/net","pkg/util/runtime","pkg/util/sets","pkg/util/strategicpatch","pkg/util/validation","pkg/util/validation/field","pkg/util/wait","pkg/util/yaml","pkg/version","pkg/watch","third_party/forked/golang/json","third_party/forked/golang/reflect"] | ||||
|   revision = "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 
 | ||||
| [[projects]] | ||||
|   branch = "master" | ||||
|   name = "k8s.io/client-go" | ||||
|   packages = ["discovery","kubernetes","kubernetes/scheme","kubernetes/typed/admissionregistration/v1alpha1","kubernetes/typed/apps/v1beta1","kubernetes/typed/apps/v1beta2","kubernetes/typed/authentication/v1","kubernetes/typed/authentication/v1beta1","kubernetes/typed/authorization/v1","kubernetes/typed/authorization/v1beta1","kubernetes/typed/autoscaling/v1","kubernetes/typed/autoscaling/v2beta1","kubernetes/typed/batch/v1","kubernetes/typed/batch/v1beta1","kubernetes/typed/batch/v2alpha1","kubernetes/typed/certificates/v1beta1","kubernetes/typed/core/v1","kubernetes/typed/extensions/v1beta1","kubernetes/typed/networking/v1","kubernetes/typed/policy/v1beta1","kubernetes/typed/rbac/v1","kubernetes/typed/rbac/v1alpha1","kubernetes/typed/rbac/v1beta1","kubernetes/typed/scheduling/v1alpha1","kubernetes/typed/settings/v1alpha1","kubernetes/typed/storage/v1","kubernetes/typed/storage/v1beta1","pkg/version","rest","rest/watch","tools/auth","tools/clientcmd","tools/clientcmd/api","tools/clientcmd/api/latest","tools/clientcmd/api/v1","tools/metrics","tools/reference","transport","util/cert","util/flowcontrol","util/homedir","util/integer"] | ||||
|   revision = "2ae454230481a7cb5544325e12ad7658ecccd19b" | ||||
|   version = "v5.0.1" | ||||
|   packages = ["discovery","kubernetes","kubernetes/scheme","kubernetes/typed/admissionregistration/v1alpha1","kubernetes/typed/admissionregistration/v1beta1","kubernetes/typed/apps/v1","kubernetes/typed/apps/v1beta1","kubernetes/typed/apps/v1beta2","kubernetes/typed/authentication/v1","kubernetes/typed/authentication/v1beta1","kubernetes/typed/authorization/v1","kubernetes/typed/authorization/v1beta1","kubernetes/typed/autoscaling/v1","kubernetes/typed/autoscaling/v2beta1","kubernetes/typed/batch/v1","kubernetes/typed/batch/v1beta1","kubernetes/typed/batch/v2alpha1","kubernetes/typed/certificates/v1beta1","kubernetes/typed/core/v1","kubernetes/typed/events/v1beta1","kubernetes/typed/extensions/v1beta1","kubernetes/typed/networking/v1","kubernetes/typed/policy/v1beta1","kubernetes/typed/rbac/v1","kubernetes/typed/rbac/v1alpha1","kubernetes/typed/rbac/v1beta1","kubernetes/typed/scheduling/v1alpha1","kubernetes/typed/settings/v1alpha1","kubernetes/typed/storage/v1","kubernetes/typed/storage/v1alpha1","kubernetes/typed/storage/v1beta1","pkg/version","rest","rest/watch","tools/auth","tools/clientcmd","tools/clientcmd/api","tools/clientcmd/api/latest","tools/clientcmd/api/v1","tools/metrics","tools/reference","transport","util/cert","util/flowcontrol","util/homedir","util/integer"] | ||||
|   revision = "87887458218a51f3944b2f4c553eb38173458e97" | ||||
| 
 | ||||
| [[projects]] | ||||
|   branch = "master" | ||||
|  | @ -298,6 +292,6 @@ | |||
| [solve-meta] | ||||
|   analyzer-name = "dep" | ||||
|   analyzer-version = 1 | ||||
|   inputs-digest = "f97c722e792f642563d42011d9e2dff8cd05844996c03c124ceca6409cda38ce" | ||||
|   inputs-digest = "8fda8ef54edbfa4b9acece7d6c76e33d21dc83361efda77489b1a1e254160b41" | ||||
|   solver-name = "gps-cdcl" | ||||
|   solver-version = 1 | ||||
|  |  | |||
|  | @ -25,6 +25,14 @@ | |||
|   branch = "v2" | ||||
|   name = "gopkg.in/yaml.v2" | ||||
| 
 | ||||
| [[constraint]] | ||||
|   branch = "master" | ||||
|   name = "k8s.io/api" | ||||
| 
 | ||||
| [[constraint]] | ||||
|   branch = "master" | ||||
|   name = "k8s.io/apimachinery" | ||||
| 
 | ||||
| [[constraint]] | ||||
|   branch = "master" | ||||
|   name = "k8s.io/client-go" | ||||
|  |  | |||
|  | @ -1,4 +0,0 @@ | |||
| language: go | ||||
| 
 | ||||
| go: | ||||
|   - 1.x | ||||
|  | @ -1,46 +0,0 @@ | |||
| Change history of swagger | ||||
| = | ||||
| 2017-01-30 | ||||
| - moved from go-restful/swagger to go-restful-swagger12 | ||||
| 
 | ||||
| 2015-10-16 | ||||
| - add type override mechanism for swagger models (MR 254, nathanejohnson) | ||||
| - replace uses of wildcard in generated apidocs (issue 251) | ||||
| 
 | ||||
| 2015-05-25 | ||||
| - (api break) changed the type of Properties in Model | ||||
| - (api break) changed the type of Models in ApiDeclaration | ||||
| - (api break) changed the parameter type of PostBuildDeclarationMapFunc | ||||
| 
 | ||||
| 2015-04-09 | ||||
| - add ModelBuildable interface for customization of Model | ||||
| 
 | ||||
| 2015-03-17 | ||||
| - preserve order of Routes per WebService in Swagger listing | ||||
| - fix use of $ref and type in Swagger models | ||||
| - add api version to listing | ||||
| 
 | ||||
| 2014-11-14 | ||||
| - operation parameters are now sorted using ordering path,query,form,header,body | ||||
| 
 | ||||
| 2014-11-12 | ||||
| - respect omitempty tag value for embedded structs | ||||
| - expose ApiVersion of WebService to Swagger ApiDeclaration | ||||
| 
 | ||||
| 2014-05-29 | ||||
| - (api add) Ability to define custom http.Handler to serve swagger-ui static files | ||||
| 
 | ||||
| 2014-05-04 | ||||
| - (fix) include model for array element type of response | ||||
| 
 | ||||
| 2014-01-03 | ||||
| - (fix) do not add primitive type to the Api models | ||||
| 
 | ||||
| 2013-11-27 | ||||
| - (fix) make Swagger work for WebServices with root ("/" or "") paths | ||||
| 
 | ||||
| 2013-10-29 | ||||
| - (api add) package variable LogInfo to customize logging function | ||||
| 
 | ||||
| 2013-10-15 | ||||
| - upgraded to spec version 1.2 (https://github.com/wordnik/swagger-core/wiki/1.2-transition) | ||||
|  | @ -1,22 +0,0 @@ | |||
| Copyright (c) 2017 Ernest Micklei | ||||
| 
 | ||||
| MIT License | ||||
| 
 | ||||
| Permission is hereby granted, free of charge, to any person obtaining | ||||
| a copy of this software and associated documentation files (the | ||||
| "Software"), to deal in the Software without restriction, including | ||||
| without limitation the rights to use, copy, modify, merge, publish, | ||||
| distribute, sublicense, and/or sell copies of the Software, and to | ||||
| permit persons to whom the Software is furnished to do so, subject to | ||||
| the following conditions: | ||||
| 
 | ||||
| The above copyright notice and this permission notice shall be | ||||
| included in all copies or substantial portions of the Software. | ||||
| 
 | ||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
|  | @ -1,83 +0,0 @@ | |||
| # go-restful-swagger12 | ||||
| 
 | ||||
| [](https://travis-ci.org/emicklei/go-restful-swagger12) | ||||
| [](https://godoc.org/github.com/emicklei/go-restful-swagger12) | ||||
| 
 | ||||
| How to use Swagger UI with go-restful | ||||
| = | ||||
| 
 | ||||
| Get the Swagger UI sources (version 1.2 only) | ||||
| 
 | ||||
| 	git clone https://github.com/wordnik/swagger-ui.git | ||||
| 	 | ||||
| The project contains a "dist" folder. | ||||
| Its contents has all the Swagger UI files you need. | ||||
| 
 | ||||
| The `index.html` has an `url` set to `http://petstore.swagger.wordnik.com/api/api-docs`. | ||||
| You need to change that to match your WebService JSON endpoint  e.g. `http://localhost:8080/apidocs.json` | ||||
| 
 | ||||
| Now, you can install the Swagger WebService for serving the Swagger specification in JSON. | ||||
| 
 | ||||
| 	config := swagger.Config{ | ||||
| 		WebServices:    restful.RegisteredWebServices(), | ||||
| 		ApiPath:        "/apidocs.json", | ||||
| 		SwaggerPath:     "/apidocs/", | ||||
| 		SwaggerFilePath: "/Users/emicklei/Projects/swagger-ui/dist"} | ||||
| 	swagger.InstallSwaggerService(config)		 | ||||
| 	 | ||||
| 	 | ||||
| Documenting Structs | ||||
| -- | ||||
| 
 | ||||
| Currently there are 2 ways to document your structs in the go-restful Swagger. | ||||
| 
 | ||||
| ###### By using struct tags | ||||
| - Use tag "description" to annotate a struct field with a description to show in the UI | ||||
| - Use tag "modelDescription" to annotate the struct itself with a description to show in the UI. The tag can be added in an field of the struct and in case that there are multiple definition, they will be appended with an empty line. | ||||
| 
 | ||||
| ###### By using the SwaggerDoc method | ||||
| Here is an example with an `Address` struct and the documentation for each of the fields. The `""` is a special entry for **documenting the struct itself**. | ||||
| 
 | ||||
| 	type Address struct { | ||||
| 		Country  string `json:"country,omitempty"` | ||||
| 		PostCode int    `json:"postcode,omitempty"` | ||||
| 	} | ||||
| 
 | ||||
| 	func (Address) SwaggerDoc() map[string]string { | ||||
| 		return map[string]string{ | ||||
| 			"":         "Address doc", | ||||
| 			"country":  "Country doc", | ||||
| 			"postcode": "PostCode doc", | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| This example will generate a JSON like this | ||||
| 
 | ||||
| 	{ | ||||
| 		"Address": { | ||||
| 			"id": "Address", | ||||
| 			"description": "Address doc", | ||||
| 			"properties": { | ||||
| 				"country": { | ||||
| 				"type": "string", | ||||
| 				"description": "Country doc" | ||||
| 				}, | ||||
| 				"postcode": { | ||||
| 				"type": "integer", | ||||
| 				"format": "int32", | ||||
| 				"description": "PostCode doc" | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| **Very Important Notes:** | ||||
| - `SwaggerDoc()` is using a **NON-Pointer** receiver (e.g. func (Address) and not func (*Address)) | ||||
| - The returned map should use as key the name of the field as defined in the JSON parameter (e.g. `"postcode"` and not `"PostCode"`) | ||||
| 
 | ||||
| Notes | ||||
| -- | ||||
| - The Nickname of an Operation is automatically set by finding the name of the function. You can override it using RouteBuilder.Operation(..)  | ||||
| - The WebServices field of swagger.Config can be used to control which service you want to expose and document ; you can have multiple configs and therefore multiple endpoints. | ||||
| 
 | ||||
| © 2017, ernestmicklei.com.  MIT License. Contributions welcome. | ||||
|  | @ -1,64 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| // Copyright 2015 Ernest Micklei. All rights reserved.
 | ||||
| // Use of this source code is governed by a license
 | ||||
| // that can be found in the LICENSE file.
 | ||||
| 
 | ||||
| import ( | ||||
| 	"bytes" | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // ApiDeclarationList maintains an ordered list of ApiDeclaration.
 | ||||
| type ApiDeclarationList struct { | ||||
| 	List []ApiDeclaration | ||||
| } | ||||
| 
 | ||||
| // At returns the ApiDeclaration by its path unless absent, then ok is false
 | ||||
| func (l *ApiDeclarationList) At(path string) (a ApiDeclaration, ok bool) { | ||||
| 	for _, each := range l.List { | ||||
| 		if each.ResourcePath == path { | ||||
| 			return each, true | ||||
| 		} | ||||
| 	} | ||||
| 	return a, false | ||||
| } | ||||
| 
 | ||||
| // Put adds or replaces a ApiDeclaration with this name
 | ||||
| func (l *ApiDeclarationList) Put(path string, a ApiDeclaration) { | ||||
| 	// maybe replace existing
 | ||||
| 	for i, each := range l.List { | ||||
| 		if each.ResourcePath == path { | ||||
| 			// replace
 | ||||
| 			l.List[i] = a | ||||
| 			return | ||||
| 		} | ||||
| 	} | ||||
| 	// add
 | ||||
| 	l.List = append(l.List, a) | ||||
| } | ||||
| 
 | ||||
| // Do enumerates all the properties, each with its assigned name
 | ||||
| func (l *ApiDeclarationList) Do(block func(path string, decl ApiDeclaration)) { | ||||
| 	for _, each := range l.List { | ||||
| 		block(each.ResourcePath, each) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // MarshalJSON writes the ModelPropertyList as if it was a map[string]ModelProperty
 | ||||
| func (l ApiDeclarationList) MarshalJSON() ([]byte, error) { | ||||
| 	var buf bytes.Buffer | ||||
| 	encoder := json.NewEncoder(&buf) | ||||
| 	buf.WriteString("{\n") | ||||
| 	for i, each := range l.List { | ||||
| 		buf.WriteString("\"") | ||||
| 		buf.WriteString(each.ResourcePath) | ||||
| 		buf.WriteString("\": ") | ||||
| 		encoder.Encode(each) | ||||
| 		if i < len(l.List)-1 { | ||||
| 			buf.WriteString(",\n") | ||||
| 		} | ||||
| 	} | ||||
| 	buf.WriteString("}") | ||||
| 	return buf.Bytes(), nil | ||||
| } | ||||
|  | @ -1,46 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| import ( | ||||
| 	"net/http" | ||||
| 	"reflect" | ||||
| 
 | ||||
| 	"github.com/emicklei/go-restful" | ||||
| ) | ||||
| 
 | ||||
| // PostBuildDeclarationMapFunc can be used to modify the api declaration map.
 | ||||
| type PostBuildDeclarationMapFunc func(apiDeclarationMap *ApiDeclarationList) | ||||
| 
 | ||||
| // MapSchemaFormatFunc can be used to modify typeName at definition time.
 | ||||
| type MapSchemaFormatFunc func(typeName string) string | ||||
| 
 | ||||
| // MapModelTypeNameFunc can be used to return the desired typeName for a given
 | ||||
| // type. It will return false if the default name should be used.
 | ||||
| type MapModelTypeNameFunc func(t reflect.Type) (string, bool) | ||||
| 
 | ||||
| type Config struct { | ||||
| 	// url where the services are available, e.g. http://localhost:8080
 | ||||
| 	// if left empty then the basePath of Swagger is taken from the actual request
 | ||||
| 	WebServicesUrl string | ||||
| 	// path where the JSON api is avaiable , e.g. /apidocs
 | ||||
| 	ApiPath string | ||||
| 	// [optional] path where the swagger UI will be served, e.g. /swagger
 | ||||
| 	SwaggerPath string | ||||
| 	// [optional] location of folder containing Swagger HTML5 application index.html
 | ||||
| 	SwaggerFilePath string | ||||
| 	// api listing is constructed from this list of restful WebServices.
 | ||||
| 	WebServices []*restful.WebService | ||||
| 	// will serve all static content (scripts,pages,images)
 | ||||
| 	StaticHandler http.Handler | ||||
| 	// [optional] on default CORS (Cross-Origin-Resource-Sharing) is enabled.
 | ||||
| 	DisableCORS bool | ||||
| 	// Top-level API version. Is reflected in the resource listing.
 | ||||
| 	ApiVersion string | ||||
| 	// If set then call this handler after building the complete ApiDeclaration Map
 | ||||
| 	PostBuildHandler PostBuildDeclarationMapFunc | ||||
| 	// Swagger global info struct
 | ||||
| 	Info Info | ||||
| 	// [optional] If set, model builder should call this handler to get addition typename-to-swagger-format-field conversion.
 | ||||
| 	SchemaFormatHandler MapSchemaFormatFunc | ||||
| 	// [optional] If set, model builder should call this handler to retrieve the name for a given type.
 | ||||
| 	ModelTypeNameHandler MapModelTypeNameFunc | ||||
| } | ||||
|  | @ -1,467 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| 	"reflect" | ||||
| 	"strings" | ||||
| ) | ||||
| 
 | ||||
| // ModelBuildable is used for extending Structs that need more control over
 | ||||
| // how the Model appears in the Swagger api declaration.
 | ||||
| type ModelBuildable interface { | ||||
| 	PostBuildModel(m *Model) *Model | ||||
| } | ||||
| 
 | ||||
| type modelBuilder struct { | ||||
| 	Models *ModelList | ||||
| 	Config *Config | ||||
| } | ||||
| 
 | ||||
| type documentable interface { | ||||
| 	SwaggerDoc() map[string]string | ||||
| } | ||||
| 
 | ||||
| // Check if this structure has a method with signature func (<theModel>) SwaggerDoc() map[string]string
 | ||||
| // If it exists, retrive the documentation and overwrite all struct tag descriptions
 | ||||
| func getDocFromMethodSwaggerDoc2(model reflect.Type) map[string]string { | ||||
| 	if docable, ok := reflect.New(model).Elem().Interface().(documentable); ok { | ||||
| 		return docable.SwaggerDoc() | ||||
| 	} | ||||
| 	return make(map[string]string) | ||||
| } | ||||
| 
 | ||||
| // addModelFrom creates and adds a Model to the builder and detects and calls
 | ||||
| // the post build hook for customizations
 | ||||
| func (b modelBuilder) addModelFrom(sample interface{}) { | ||||
| 	if modelOrNil := b.addModel(reflect.TypeOf(sample), ""); modelOrNil != nil { | ||||
| 		// allow customizations
 | ||||
| 		if buildable, ok := sample.(ModelBuildable); ok { | ||||
| 			modelOrNil = buildable.PostBuildModel(modelOrNil) | ||||
| 			b.Models.Put(modelOrNil.Id, *modelOrNil) | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func (b modelBuilder) addModel(st reflect.Type, nameOverride string) *Model { | ||||
| 	// Turn pointers into simpler types so further checks are
 | ||||
| 	// correct.
 | ||||
| 	if st.Kind() == reflect.Ptr { | ||||
| 		st = st.Elem() | ||||
| 	} | ||||
| 
 | ||||
| 	modelName := b.keyFrom(st) | ||||
| 	if nameOverride != "" { | ||||
| 		modelName = nameOverride | ||||
| 	} | ||||
| 	// no models needed for primitive types
 | ||||
| 	if b.isPrimitiveType(modelName) { | ||||
| 		return nil | ||||
| 	} | ||||
| 	// golang encoding/json packages says array and slice values encode as
 | ||||
| 	// JSON arrays, except that []byte encodes as a base64-encoded string.
 | ||||
| 	// If we see a []byte here, treat it at as a primitive type (string)
 | ||||
| 	// and deal with it in buildArrayTypeProperty.
 | ||||
| 	if (st.Kind() == reflect.Slice || st.Kind() == reflect.Array) && | ||||
| 		st.Elem().Kind() == reflect.Uint8 { | ||||
| 		return nil | ||||
| 	} | ||||
| 	// see if we already have visited this model
 | ||||
| 	if _, ok := b.Models.At(modelName); ok { | ||||
| 		return nil | ||||
| 	} | ||||
| 	sm := Model{ | ||||
| 		Id:         modelName, | ||||
| 		Required:   []string{}, | ||||
| 		Properties: ModelPropertyList{}} | ||||
| 
 | ||||
| 	// reference the model before further initializing (enables recursive structs)
 | ||||
| 	b.Models.Put(modelName, sm) | ||||
| 
 | ||||
| 	// check for slice or array
 | ||||
| 	if st.Kind() == reflect.Slice || st.Kind() == reflect.Array { | ||||
| 		b.addModel(st.Elem(), "") | ||||
| 		return &sm | ||||
| 	} | ||||
| 	// check for structure or primitive type
 | ||||
| 	if st.Kind() != reflect.Struct { | ||||
| 		return &sm | ||||
| 	} | ||||
| 
 | ||||
| 	fullDoc := getDocFromMethodSwaggerDoc2(st) | ||||
| 	modelDescriptions := []string{} | ||||
| 
 | ||||
| 	for i := 0; i < st.NumField(); i++ { | ||||
| 		field := st.Field(i) | ||||
| 		jsonName, modelDescription, prop := b.buildProperty(field, &sm, modelName) | ||||
| 		if len(modelDescription) > 0 { | ||||
| 			modelDescriptions = append(modelDescriptions, modelDescription) | ||||
| 		} | ||||
| 
 | ||||
| 		// add if not omitted
 | ||||
| 		if len(jsonName) != 0 { | ||||
| 			// update description
 | ||||
| 			if fieldDoc, ok := fullDoc[jsonName]; ok { | ||||
| 				prop.Description = fieldDoc | ||||
| 			} | ||||
| 			// update Required
 | ||||
| 			if b.isPropertyRequired(field) { | ||||
| 				sm.Required = append(sm.Required, jsonName) | ||||
| 			} | ||||
| 			sm.Properties.Put(jsonName, prop) | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	// We always overwrite documentation if SwaggerDoc method exists
 | ||||
| 	// "" is special for documenting the struct itself
 | ||||
| 	if modelDoc, ok := fullDoc[""]; ok { | ||||
| 		sm.Description = modelDoc | ||||
| 	} else if len(modelDescriptions) != 0 { | ||||
| 		sm.Description = strings.Join(modelDescriptions, "\n") | ||||
| 	} | ||||
| 
 | ||||
| 	// update model builder with completed model
 | ||||
| 	b.Models.Put(modelName, sm) | ||||
| 
 | ||||
| 	return &sm | ||||
| } | ||||
| 
 | ||||
| func (b modelBuilder) isPropertyRequired(field reflect.StructField) bool { | ||||
| 	required := true | ||||
| 	if jsonTag := field.Tag.Get("json"); jsonTag != "" { | ||||
| 		s := strings.Split(jsonTag, ",") | ||||
| 		if len(s) > 1 && s[1] == "omitempty" { | ||||
| 			return false | ||||
| 		} | ||||
| 	} | ||||
| 	return required | ||||
| } | ||||
| 
 | ||||
| func (b modelBuilder) buildProperty(field reflect.StructField, model *Model, modelName string) (jsonName, modelDescription string, prop ModelProperty) { | ||||
| 	jsonName = b.jsonNameOfField(field) | ||||
| 	if len(jsonName) == 0 { | ||||
| 		// empty name signals skip property
 | ||||
| 		return "", "", prop | ||||
| 	} | ||||
| 
 | ||||
| 	if field.Name == "XMLName" && field.Type.String() == "xml.Name" { | ||||
| 		// property is metadata for the xml.Name attribute, can be skipped
 | ||||
| 		return "", "", prop | ||||
| 	} | ||||
| 
 | ||||
| 	if tag := field.Tag.Get("modelDescription"); tag != "" { | ||||
| 		modelDescription = tag | ||||
| 	} | ||||
| 
 | ||||
| 	prop.setPropertyMetadata(field) | ||||
| 	if prop.Type != nil { | ||||
| 		return jsonName, modelDescription, prop | ||||
| 	} | ||||
| 	fieldType := field.Type | ||||
| 
 | ||||
| 	// check if type is doing its own marshalling
 | ||||
| 	marshalerType := reflect.TypeOf((*json.Marshaler)(nil)).Elem() | ||||
| 	if fieldType.Implements(marshalerType) { | ||||
| 		var pType = "string" | ||||
| 		if prop.Type == nil { | ||||
| 			prop.Type = &pType | ||||
| 		} | ||||
| 		if prop.Format == "" { | ||||
| 			prop.Format = b.jsonSchemaFormat(b.keyFrom(fieldType)) | ||||
| 		} | ||||
| 		return jsonName, modelDescription, prop | ||||
| 	} | ||||
| 
 | ||||
| 	// check if annotation says it is a string
 | ||||
| 	if jsonTag := field.Tag.Get("json"); jsonTag != "" { | ||||
| 		s := strings.Split(jsonTag, ",") | ||||
| 		if len(s) > 1 && s[1] == "string" { | ||||
| 			stringt := "string" | ||||
| 			prop.Type = &stringt | ||||
| 			return jsonName, modelDescription, prop | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	fieldKind := fieldType.Kind() | ||||
| 	switch { | ||||
| 	case fieldKind == reflect.Struct: | ||||
| 		jsonName, prop := b.buildStructTypeProperty(field, jsonName, model) | ||||
| 		return jsonName, modelDescription, prop | ||||
| 	case fieldKind == reflect.Slice || fieldKind == reflect.Array: | ||||
| 		jsonName, prop := b.buildArrayTypeProperty(field, jsonName, modelName) | ||||
| 		return jsonName, modelDescription, prop | ||||
| 	case fieldKind == reflect.Ptr: | ||||
| 		jsonName, prop := b.buildPointerTypeProperty(field, jsonName, modelName) | ||||
| 		return jsonName, modelDescription, prop | ||||
| 	case fieldKind == reflect.String: | ||||
| 		stringt := "string" | ||||
| 		prop.Type = &stringt | ||||
| 		return jsonName, modelDescription, prop | ||||
| 	case fieldKind == reflect.Map: | ||||
| 		// if it's a map, it's unstructured, and swagger 1.2 can't handle it
 | ||||
| 		objectType := "object" | ||||
| 		prop.Type = &objectType | ||||
| 		return jsonName, modelDescription, prop | ||||
| 	} | ||||
| 
 | ||||
| 	fieldTypeName := b.keyFrom(fieldType) | ||||
| 	if b.isPrimitiveType(fieldTypeName) { | ||||
| 		mapped := b.jsonSchemaType(fieldTypeName) | ||||
| 		prop.Type = &mapped | ||||
| 		prop.Format = b.jsonSchemaFormat(fieldTypeName) | ||||
| 		return jsonName, modelDescription, prop | ||||
| 	} | ||||
| 	modelType := b.keyFrom(fieldType) | ||||
| 	prop.Ref = &modelType | ||||
| 
 | ||||
| 	if fieldType.Name() == "" { // override type of anonymous structs
 | ||||
| 		nestedTypeName := modelName + "." + jsonName | ||||
| 		prop.Ref = &nestedTypeName | ||||
| 		b.addModel(fieldType, nestedTypeName) | ||||
| 	} | ||||
| 	return jsonName, modelDescription, prop | ||||
| } | ||||
| 
 | ||||
| func hasNamedJSONTag(field reflect.StructField) bool { | ||||
| 	parts := strings.Split(field.Tag.Get("json"), ",") | ||||
| 	if len(parts) == 0 { | ||||
| 		return false | ||||
| 	} | ||||
| 	for _, s := range parts[1:] { | ||||
| 		if s == "inline" { | ||||
| 			return false | ||||
| 		} | ||||
| 	} | ||||
| 	return len(parts[0]) > 0 | ||||
| } | ||||
| 
 | ||||
| func (b modelBuilder) buildStructTypeProperty(field reflect.StructField, jsonName string, model *Model) (nameJson string, prop ModelProperty) { | ||||
| 	prop.setPropertyMetadata(field) | ||||
| 	// Check for type override in tag
 | ||||
| 	if prop.Type != nil { | ||||
| 		return jsonName, prop | ||||
| 	} | ||||
| 	fieldType := field.Type | ||||
| 	// check for anonymous
 | ||||
| 	if len(fieldType.Name()) == 0 { | ||||
| 		// anonymous
 | ||||
| 		anonType := model.Id + "." + jsonName | ||||
| 		b.addModel(fieldType, anonType) | ||||
| 		prop.Ref = &anonType | ||||
| 		return jsonName, prop | ||||
| 	} | ||||
| 
 | ||||
| 	if field.Name == fieldType.Name() && field.Anonymous && !hasNamedJSONTag(field) { | ||||
| 		// embedded struct
 | ||||
| 		sub := modelBuilder{new(ModelList), b.Config} | ||||
| 		sub.addModel(fieldType, "") | ||||
| 		subKey := sub.keyFrom(fieldType) | ||||
| 		// merge properties from sub
 | ||||
| 		subModel, _ := sub.Models.At(subKey) | ||||
| 		subModel.Properties.Do(func(k string, v ModelProperty) { | ||||
| 			model.Properties.Put(k, v) | ||||
| 			// if subModel says this property is required then include it
 | ||||
| 			required := false | ||||
| 			for _, each := range subModel.Required { | ||||
| 				if k == each { | ||||
| 					required = true | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			if required { | ||||
| 				model.Required = append(model.Required, k) | ||||
| 			} | ||||
| 		}) | ||||
| 		// add all new referenced models
 | ||||
| 		sub.Models.Do(func(key string, sub Model) { | ||||
| 			if key != subKey { | ||||
| 				if _, ok := b.Models.At(key); !ok { | ||||
| 					b.Models.Put(key, sub) | ||||
| 				} | ||||
| 			} | ||||
| 		}) | ||||
| 		// empty name signals skip property
 | ||||
| 		return "", prop | ||||
| 	} | ||||
| 	// simple struct
 | ||||
| 	b.addModel(fieldType, "") | ||||
| 	var pType = b.keyFrom(fieldType) | ||||
| 	prop.Ref = &pType | ||||
| 	return jsonName, prop | ||||
| } | ||||
| 
 | ||||
| func (b modelBuilder) buildArrayTypeProperty(field reflect.StructField, jsonName, modelName string) (nameJson string, prop ModelProperty) { | ||||
| 	// check for type override in tags
 | ||||
| 	prop.setPropertyMetadata(field) | ||||
| 	if prop.Type != nil { | ||||
| 		return jsonName, prop | ||||
| 	} | ||||
| 	fieldType := field.Type | ||||
| 	if fieldType.Elem().Kind() == reflect.Uint8 { | ||||
| 		stringt := "string" | ||||
| 		prop.Type = &stringt | ||||
| 		return jsonName, prop | ||||
| 	} | ||||
| 	var pType = "array" | ||||
| 	prop.Type = &pType | ||||
| 	isPrimitive := b.isPrimitiveType(fieldType.Elem().Name()) | ||||
| 	elemTypeName := b.getElementTypeName(modelName, jsonName, fieldType.Elem()) | ||||
| 	prop.Items = new(Item) | ||||
| 	if isPrimitive { | ||||
| 		mapped := b.jsonSchemaType(elemTypeName) | ||||
| 		prop.Items.Type = &mapped | ||||
| 	} else { | ||||
| 		prop.Items.Ref = &elemTypeName | ||||
| 	} | ||||
| 	// add|overwrite model for element type
 | ||||
| 	if fieldType.Elem().Kind() == reflect.Ptr { | ||||
| 		fieldType = fieldType.Elem() | ||||
| 	} | ||||
| 	if !isPrimitive { | ||||
| 		b.addModel(fieldType.Elem(), elemTypeName) | ||||
| 	} | ||||
| 	return jsonName, prop | ||||
| } | ||||
| 
 | ||||
| func (b modelBuilder) buildPointerTypeProperty(field reflect.StructField, jsonName, modelName string) (nameJson string, prop ModelProperty) { | ||||
| 	prop.setPropertyMetadata(field) | ||||
| 	// Check for type override in tags
 | ||||
| 	if prop.Type != nil { | ||||
| 		return jsonName, prop | ||||
| 	} | ||||
| 	fieldType := field.Type | ||||
| 
 | ||||
| 	// override type of pointer to list-likes
 | ||||
| 	if fieldType.Elem().Kind() == reflect.Slice || fieldType.Elem().Kind() == reflect.Array { | ||||
| 		var pType = "array" | ||||
| 		prop.Type = &pType | ||||
| 		isPrimitive := b.isPrimitiveType(fieldType.Elem().Elem().Name()) | ||||
| 		elemName := b.getElementTypeName(modelName, jsonName, fieldType.Elem().Elem()) | ||||
| 		if isPrimitive { | ||||
| 			primName := b.jsonSchemaType(elemName) | ||||
| 			prop.Items = &Item{Ref: &primName} | ||||
| 		} else { | ||||
| 			prop.Items = &Item{Ref: &elemName} | ||||
| 		} | ||||
| 		if !isPrimitive { | ||||
| 			// add|overwrite model for element type
 | ||||
| 			b.addModel(fieldType.Elem().Elem(), elemName) | ||||
| 		} | ||||
| 	} else { | ||||
| 		// non-array, pointer type
 | ||||
| 		fieldTypeName := b.keyFrom(fieldType.Elem()) | ||||
| 		var pType = b.jsonSchemaType(fieldTypeName) // no star, include pkg path
 | ||||
| 		if b.isPrimitiveType(fieldTypeName) { | ||||
| 			prop.Type = &pType | ||||
| 			prop.Format = b.jsonSchemaFormat(fieldTypeName) | ||||
| 			return jsonName, prop | ||||
| 		} | ||||
| 		prop.Ref = &pType | ||||
| 		elemName := "" | ||||
| 		if fieldType.Elem().Name() == "" { | ||||
| 			elemName = modelName + "." + jsonName | ||||
| 			prop.Ref = &elemName | ||||
| 		} | ||||
| 		b.addModel(fieldType.Elem(), elemName) | ||||
| 	} | ||||
| 	return jsonName, prop | ||||
| } | ||||
| 
 | ||||
| func (b modelBuilder) getElementTypeName(modelName, jsonName string, t reflect.Type) string { | ||||
| 	if t.Kind() == reflect.Ptr { | ||||
| 		t = t.Elem() | ||||
| 	} | ||||
| 	if t.Name() == "" { | ||||
| 		return modelName + "." + jsonName | ||||
| 	} | ||||
| 	return b.keyFrom(t) | ||||
| } | ||||
| 
 | ||||
| func (b modelBuilder) keyFrom(st reflect.Type) string { | ||||
| 	key := st.String() | ||||
| 	if b.Config != nil && b.Config.ModelTypeNameHandler != nil { | ||||
| 		if name, ok := b.Config.ModelTypeNameHandler(st); ok { | ||||
| 			key = name | ||||
| 		} | ||||
| 	} | ||||
| 	if len(st.Name()) == 0 { // unnamed type
 | ||||
| 		// Swagger UI has special meaning for [
 | ||||
| 		key = strings.Replace(key, "[]", "||", -1) | ||||
| 	} | ||||
| 	return key | ||||
| } | ||||
| 
 | ||||
| // see also https://golang.org/ref/spec#Numeric_types
 | ||||
| func (b modelBuilder) isPrimitiveType(modelName string) bool { | ||||
| 	if len(modelName) == 0 { | ||||
| 		return false | ||||
| 	} | ||||
| 	return strings.Contains("uint uint8 uint16 uint32 uint64 int int8 int16 int32 int64 float32 float64 bool string byte rune time.Time", modelName) | ||||
| } | ||||
| 
 | ||||
| // jsonNameOfField returns the name of the field as it should appear in JSON format
 | ||||
| // An empty string indicates that this field is not part of the JSON representation
 | ||||
| func (b modelBuilder) jsonNameOfField(field reflect.StructField) string { | ||||
| 	if jsonTag := field.Tag.Get("json"); jsonTag != "" { | ||||
| 		s := strings.Split(jsonTag, ",") | ||||
| 		if s[0] == "-" { | ||||
| 			// empty name signals skip property
 | ||||
| 			return "" | ||||
| 		} else if s[0] != "" { | ||||
| 			return s[0] | ||||
| 		} | ||||
| 	} | ||||
| 	return field.Name | ||||
| } | ||||
| 
 | ||||
| // see also http://json-schema.org/latest/json-schema-core.html#anchor8
 | ||||
| func (b modelBuilder) jsonSchemaType(modelName string) string { | ||||
| 	schemaMap := map[string]string{ | ||||
| 		"uint":   "integer", | ||||
| 		"uint8":  "integer", | ||||
| 		"uint16": "integer", | ||||
| 		"uint32": "integer", | ||||
| 		"uint64": "integer", | ||||
| 
 | ||||
| 		"int":   "integer", | ||||
| 		"int8":  "integer", | ||||
| 		"int16": "integer", | ||||
| 		"int32": "integer", | ||||
| 		"int64": "integer", | ||||
| 
 | ||||
| 		"byte":      "integer", | ||||
| 		"float64":   "number", | ||||
| 		"float32":   "number", | ||||
| 		"bool":      "boolean", | ||||
| 		"time.Time": "string", | ||||
| 	} | ||||
| 	mapped, ok := schemaMap[modelName] | ||||
| 	if !ok { | ||||
| 		return modelName // use as is (custom or struct)
 | ||||
| 	} | ||||
| 	return mapped | ||||
| } | ||||
| 
 | ||||
| func (b modelBuilder) jsonSchemaFormat(modelName string) string { | ||||
| 	if b.Config != nil && b.Config.SchemaFormatHandler != nil { | ||||
| 		if mapped := b.Config.SchemaFormatHandler(modelName); mapped != "" { | ||||
| 			return mapped | ||||
| 		} | ||||
| 	} | ||||
| 	schemaMap := map[string]string{ | ||||
| 		"int":        "int32", | ||||
| 		"int32":      "int32", | ||||
| 		"int64":      "int64", | ||||
| 		"byte":       "byte", | ||||
| 		"uint":       "integer", | ||||
| 		"uint8":      "byte", | ||||
| 		"float64":    "double", | ||||
| 		"float32":    "float", | ||||
| 		"time.Time":  "date-time", | ||||
| 		"*time.Time": "date-time", | ||||
| 	} | ||||
| 	mapped, ok := schemaMap[modelName] | ||||
| 	if !ok { | ||||
| 		return "" // no format
 | ||||
| 	} | ||||
| 	return mapped | ||||
| } | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -1,86 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| // Copyright 2015 Ernest Micklei. All rights reserved.
 | ||||
| // Use of this source code is governed by a license
 | ||||
| // that can be found in the LICENSE file.
 | ||||
| 
 | ||||
| import ( | ||||
| 	"bytes" | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // NamedModel associates a name with a Model (not using its Id)
 | ||||
| type NamedModel struct { | ||||
| 	Name  string | ||||
| 	Model Model | ||||
| } | ||||
| 
 | ||||
| // ModelList encapsulates a list of NamedModel (association)
 | ||||
| type ModelList struct { | ||||
| 	List []NamedModel | ||||
| } | ||||
| 
 | ||||
| // Put adds or replaces a Model by its name
 | ||||
| func (l *ModelList) Put(name string, model Model) { | ||||
| 	for i, each := range l.List { | ||||
| 		if each.Name == name { | ||||
| 			// replace
 | ||||
| 			l.List[i] = NamedModel{name, model} | ||||
| 			return | ||||
| 		} | ||||
| 	} | ||||
| 	// add
 | ||||
| 	l.List = append(l.List, NamedModel{name, model}) | ||||
| } | ||||
| 
 | ||||
| // At returns a Model by its name, ok is false if absent
 | ||||
| func (l *ModelList) At(name string) (m Model, ok bool) { | ||||
| 	for _, each := range l.List { | ||||
| 		if each.Name == name { | ||||
| 			return each.Model, true | ||||
| 		} | ||||
| 	} | ||||
| 	return m, false | ||||
| } | ||||
| 
 | ||||
| // Do enumerates all the models, each with its assigned name
 | ||||
| func (l *ModelList) Do(block func(name string, value Model)) { | ||||
| 	for _, each := range l.List { | ||||
| 		block(each.Name, each.Model) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // MarshalJSON writes the ModelList as if it was a map[string]Model
 | ||||
| func (l ModelList) MarshalJSON() ([]byte, error) { | ||||
| 	var buf bytes.Buffer | ||||
| 	encoder := json.NewEncoder(&buf) | ||||
| 	buf.WriteString("{\n") | ||||
| 	for i, each := range l.List { | ||||
| 		buf.WriteString("\"") | ||||
| 		buf.WriteString(each.Name) | ||||
| 		buf.WriteString("\": ") | ||||
| 		encoder.Encode(each.Model) | ||||
| 		if i < len(l.List)-1 { | ||||
| 			buf.WriteString(",\n") | ||||
| 		} | ||||
| 	} | ||||
| 	buf.WriteString("}") | ||||
| 	return buf.Bytes(), nil | ||||
| } | ||||
| 
 | ||||
| // UnmarshalJSON reads back a ModelList. This is an expensive operation.
 | ||||
| func (l *ModelList) UnmarshalJSON(data []byte) error { | ||||
| 	raw := map[string]interface{}{} | ||||
| 	json.NewDecoder(bytes.NewReader(data)).Decode(&raw) | ||||
| 	for k, v := range raw { | ||||
| 		// produces JSON bytes for each value
 | ||||
| 		data, err := json.Marshal(v) | ||||
| 		if err != nil { | ||||
| 			return err | ||||
| 		} | ||||
| 		var m Model | ||||
| 		json.NewDecoder(bytes.NewReader(data)).Decode(&m) | ||||
| 		l.Put(k, m) | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | @ -1,48 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| 	"testing" | ||||
| ) | ||||
| 
 | ||||
| func TestModelList(t *testing.T) { | ||||
| 	m := Model{} | ||||
| 	m.Id = "m" | ||||
| 	l := ModelList{} | ||||
| 	l.Put("m", m) | ||||
| 	k, ok := l.At("m") | ||||
| 	if !ok { | ||||
| 		t.Error("want model back") | ||||
| 	} | ||||
| 	if got, want := k.Id, "m"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func TestModelList_Marshal(t *testing.T) { | ||||
| 	l := ModelList{} | ||||
| 	m := Model{Id: "myid"} | ||||
| 	l.Put("myid", m) | ||||
| 	data, err := json.Marshal(l) | ||||
| 	if err != nil { | ||||
| 		t.Error(err) | ||||
| 	} | ||||
| 	if got, want := string(data), `{"myid":{"id":"myid","properties":{}}}`; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func TestModelList_Unmarshal(t *testing.T) { | ||||
| 	data := `{"myid":{"id":"myid","properties":{}}}` | ||||
| 	l := ModelList{} | ||||
| 	if err := json.Unmarshal([]byte(data), &l); err != nil { | ||||
| 		t.Error(err) | ||||
| 	} | ||||
| 	m, ok := l.At("myid") | ||||
| 	if !ok { | ||||
| 		t.Error("expected myid") | ||||
| 	} | ||||
| 	if got, want := m.Id, "myid"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| } | ||||
|  | @ -1,81 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| import ( | ||||
| 	"reflect" | ||||
| 	"strings" | ||||
| ) | ||||
| 
 | ||||
| func (prop *ModelProperty) setDescription(field reflect.StructField) { | ||||
| 	if tag := field.Tag.Get("description"); tag != "" { | ||||
| 		prop.Description = tag | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func (prop *ModelProperty) setDefaultValue(field reflect.StructField) { | ||||
| 	if tag := field.Tag.Get("default"); tag != "" { | ||||
| 		prop.DefaultValue = Special(tag) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func (prop *ModelProperty) setEnumValues(field reflect.StructField) { | ||||
| 	// We use | to separate the enum values.  This value is chosen
 | ||||
| 	// since its unlikely to be useful in actual enumeration values.
 | ||||
| 	if tag := field.Tag.Get("enum"); tag != "" { | ||||
| 		prop.Enum = strings.Split(tag, "|") | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func (prop *ModelProperty) setMaximum(field reflect.StructField) { | ||||
| 	if tag := field.Tag.Get("maximum"); tag != "" { | ||||
| 		prop.Maximum = tag | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func (prop *ModelProperty) setType(field reflect.StructField) { | ||||
| 	if tag := field.Tag.Get("type"); tag != "" { | ||||
| 		// Check if the first two characters of the type tag are
 | ||||
| 		// intended to emulate slice/array behaviour.
 | ||||
| 		//
 | ||||
| 		// If type is intended to be a slice/array then add the
 | ||||
| 		// overriden type to the array item instead of the main property
 | ||||
| 		if len(tag) > 2 && tag[0:2] == "[]" { | ||||
| 			pType := "array" | ||||
| 			prop.Type = &pType | ||||
| 			prop.Items = new(Item) | ||||
| 
 | ||||
| 			iType := tag[2:] | ||||
| 			prop.Items.Type = &iType | ||||
| 			return | ||||
| 		} | ||||
| 
 | ||||
| 		prop.Type = &tag | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func (prop *ModelProperty) setMinimum(field reflect.StructField) { | ||||
| 	if tag := field.Tag.Get("minimum"); tag != "" { | ||||
| 		prop.Minimum = tag | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func (prop *ModelProperty) setUniqueItems(field reflect.StructField) { | ||||
| 	tag := field.Tag.Get("unique") | ||||
| 	switch tag { | ||||
| 	case "true": | ||||
| 		v := true | ||||
| 		prop.UniqueItems = &v | ||||
| 	case "false": | ||||
| 		v := false | ||||
| 		prop.UniqueItems = &v | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func (prop *ModelProperty) setPropertyMetadata(field reflect.StructField) { | ||||
| 	prop.setDescription(field) | ||||
| 	prop.setEnumValues(field) | ||||
| 	prop.setMinimum(field) | ||||
| 	prop.setMaximum(field) | ||||
| 	prop.setUniqueItems(field) | ||||
| 	prop.setDefaultValue(field) | ||||
| 	prop.setType(field) | ||||
| } | ||||
|  | @ -1,70 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| import ( | ||||
| 	"net" | ||||
| 	"testing" | ||||
| ) | ||||
| 
 | ||||
| // clear && go test -v -test.run TestThatExtraTagsAreReadIntoModel ...swagger
 | ||||
| func TestThatExtraTagsAreReadIntoModel(t *testing.T) { | ||||
| 	type fakeint int | ||||
| 	type fakearray string | ||||
| 	type Anything struct { | ||||
| 		Name      string    `description:"name" modelDescription:"a test"` | ||||
| 		Size      int       `minimum:"0" maximum:"10"` | ||||
| 		Stati     string    `enum:"off|on" default:"on" modelDescription:"more description"` | ||||
| 		ID        string    `unique:"true"` | ||||
| 		FakeInt   fakeint   `type:"integer"` | ||||
| 		FakeArray fakearray `type:"[]string"` | ||||
| 		IP        net.IP    `type:"string"` | ||||
| 		Password  string | ||||
| 	} | ||||
| 	m := modelsFromStruct(Anything{}) | ||||
| 	props, _ := m.At("swagger.Anything") | ||||
| 	p1, _ := props.Properties.At("Name") | ||||
| 	if got, want := p1.Description, "name"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| 	p2, _ := props.Properties.At("Size") | ||||
| 	if got, want := p2.Minimum, "0"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| 	if got, want := p2.Maximum, "10"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| 	p3, _ := props.Properties.At("Stati") | ||||
| 	if got, want := p3.Enum[0], "off"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| 	if got, want := p3.Enum[1], "on"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| 	p4, _ := props.Properties.At("ID") | ||||
| 	if got, want := *p4.UniqueItems, true; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| 	p5, _ := props.Properties.At("Password") | ||||
| 	if got, want := *p5.Type, "string"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| 	p6, _ := props.Properties.At("FakeInt") | ||||
| 	if got, want := *p6.Type, "integer"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| 	p7, _ := props.Properties.At("FakeArray") | ||||
| 	if got, want := *p7.Type, "array"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| 	p7p, _ := props.Properties.At("FakeArray") | ||||
| 	if got, want := *p7p.Items.Type, "string"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| 	p8, _ := props.Properties.At("IP") | ||||
| 	if got, want := *p8.Type, "string"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| 
 | ||||
| 	if got, want := props.Description, "a test\nmore description"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| } | ||||
|  | @ -1,87 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| // Copyright 2015 Ernest Micklei. All rights reserved.
 | ||||
| // Use of this source code is governed by a license
 | ||||
| // that can be found in the LICENSE file.
 | ||||
| 
 | ||||
| import ( | ||||
| 	"bytes" | ||||
| 	"encoding/json" | ||||
| ) | ||||
| 
 | ||||
| // NamedModelProperty associates a name to a ModelProperty
 | ||||
| type NamedModelProperty struct { | ||||
| 	Name     string | ||||
| 	Property ModelProperty | ||||
| } | ||||
| 
 | ||||
| // ModelPropertyList encapsulates a list of NamedModelProperty (association)
 | ||||
| type ModelPropertyList struct { | ||||
| 	List []NamedModelProperty | ||||
| } | ||||
| 
 | ||||
| // At returns the ModelPropety by its name unless absent, then ok is false
 | ||||
| func (l *ModelPropertyList) At(name string) (p ModelProperty, ok bool) { | ||||
| 	for _, each := range l.List { | ||||
| 		if each.Name == name { | ||||
| 			return each.Property, true | ||||
| 		} | ||||
| 	} | ||||
| 	return p, false | ||||
| } | ||||
| 
 | ||||
| // Put adds or replaces a ModelProperty with this name
 | ||||
| func (l *ModelPropertyList) Put(name string, prop ModelProperty) { | ||||
| 	// maybe replace existing
 | ||||
| 	for i, each := range l.List { | ||||
| 		if each.Name == name { | ||||
| 			// replace
 | ||||
| 			l.List[i] = NamedModelProperty{Name: name, Property: prop} | ||||
| 			return | ||||
| 		} | ||||
| 	} | ||||
| 	// add
 | ||||
| 	l.List = append(l.List, NamedModelProperty{Name: name, Property: prop}) | ||||
| } | ||||
| 
 | ||||
| // Do enumerates all the properties, each with its assigned name
 | ||||
| func (l *ModelPropertyList) Do(block func(name string, value ModelProperty)) { | ||||
| 	for _, each := range l.List { | ||||
| 		block(each.Name, each.Property) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // MarshalJSON writes the ModelPropertyList as if it was a map[string]ModelProperty
 | ||||
| func (l ModelPropertyList) MarshalJSON() ([]byte, error) { | ||||
| 	var buf bytes.Buffer | ||||
| 	encoder := json.NewEncoder(&buf) | ||||
| 	buf.WriteString("{\n") | ||||
| 	for i, each := range l.List { | ||||
| 		buf.WriteString("\"") | ||||
| 		buf.WriteString(each.Name) | ||||
| 		buf.WriteString("\": ") | ||||
| 		encoder.Encode(each.Property) | ||||
| 		if i < len(l.List)-1 { | ||||
| 			buf.WriteString(",\n") | ||||
| 		} | ||||
| 	} | ||||
| 	buf.WriteString("}") | ||||
| 	return buf.Bytes(), nil | ||||
| } | ||||
| 
 | ||||
| // UnmarshalJSON reads back a ModelPropertyList. This is an expensive operation.
 | ||||
| func (l *ModelPropertyList) UnmarshalJSON(data []byte) error { | ||||
| 	raw := map[string]interface{}{} | ||||
| 	json.NewDecoder(bytes.NewReader(data)).Decode(&raw) | ||||
| 	for k, v := range raw { | ||||
| 		// produces JSON bytes for each value
 | ||||
| 		data, err := json.Marshal(v) | ||||
| 		if err != nil { | ||||
| 			return err | ||||
| 		} | ||||
| 		var m ModelProperty | ||||
| 		json.NewDecoder(bytes.NewReader(data)).Decode(&m) | ||||
| 		l.Put(k, m) | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | @ -1,47 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| 	"testing" | ||||
| ) | ||||
| 
 | ||||
| func TestModelPropertyList(t *testing.T) { | ||||
| 	l := ModelPropertyList{} | ||||
| 	p := ModelProperty{Description: "d"} | ||||
| 	l.Put("p", p) | ||||
| 	q, ok := l.At("p") | ||||
| 	if !ok { | ||||
| 		t.Error("expected p") | ||||
| 	} | ||||
| 	if got, want := q.Description, "d"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func TestModelPropertyList_Marshal(t *testing.T) { | ||||
| 	l := ModelPropertyList{} | ||||
| 	p := ModelProperty{Description: "d"} | ||||
| 	l.Put("p", p) | ||||
| 	data, err := json.Marshal(l) | ||||
| 	if err != nil { | ||||
| 		t.Error(err) | ||||
| 	} | ||||
| 	if got, want := string(data), `{"p":{"description":"d"}}`; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func TestModelPropertyList_Unmarshal(t *testing.T) { | ||||
| 	data := `{"p":{"description":"d"}}` | ||||
| 	l := ModelPropertyList{} | ||||
| 	if err := json.Unmarshal([]byte(data), &l); err != nil { | ||||
| 		t.Error(err) | ||||
| 	} | ||||
| 	m, ok := l.At("p") | ||||
| 	if !ok { | ||||
| 		t.Error("expected p") | ||||
| 	} | ||||
| 	if got, want := m.Description, "d"; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| } | ||||
|  | @ -1,36 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| // Copyright 2015 Ernest Micklei. All rights reserved.
 | ||||
| // Use of this source code is governed by a license
 | ||||
| // that can be found in the LICENSE file.
 | ||||
| 
 | ||||
| import "github.com/emicklei/go-restful" | ||||
| 
 | ||||
| type orderedRouteMap struct { | ||||
| 	elements map[string][]restful.Route | ||||
| 	keys     []string | ||||
| } | ||||
| 
 | ||||
| func newOrderedRouteMap() *orderedRouteMap { | ||||
| 	return &orderedRouteMap{ | ||||
| 		elements: map[string][]restful.Route{}, | ||||
| 		keys:     []string{}, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func (o *orderedRouteMap) Add(key string, route restful.Route) { | ||||
| 	routes, ok := o.elements[key] | ||||
| 	if ok { | ||||
| 		routes = append(routes, route) | ||||
| 		o.elements[key] = routes | ||||
| 		return | ||||
| 	} | ||||
| 	o.elements[key] = []restful.Route{route} | ||||
| 	o.keys = append(o.keys, key) | ||||
| } | ||||
| 
 | ||||
| func (o *orderedRouteMap) Do(block func(key string, routes []restful.Route)) { | ||||
| 	for _, k := range o.keys { | ||||
| 		block(k, o.elements[k]) | ||||
| 	} | ||||
| } | ||||
|  | @ -1,29 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| import ( | ||||
| 	"testing" | ||||
| 
 | ||||
| 	"github.com/emicklei/go-restful" | ||||
| ) | ||||
| 
 | ||||
| // go test -v -test.run TestOrderedRouteMap ...swagger
 | ||||
| func TestOrderedRouteMap(t *testing.T) { | ||||
| 	m := newOrderedRouteMap() | ||||
| 	r1 := restful.Route{Path: "/r1"} | ||||
| 	r2 := restful.Route{Path: "/r2"} | ||||
| 	m.Add("a", r1) | ||||
| 	m.Add("b", r2) | ||||
| 	m.Add("b", r1) | ||||
| 	m.Add("d", r2) | ||||
| 	m.Add("c", r2) | ||||
| 	order := "" | ||||
| 	m.Do(func(k string, routes []restful.Route) { | ||||
| 		order += k | ||||
| 		if len(routes) == 0 { | ||||
| 			t.Fail() | ||||
| 		} | ||||
| 	}) | ||||
| 	if order != "abdc" { | ||||
| 		t.Fail() | ||||
| 	} | ||||
| } | ||||
|  | @ -1,42 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| import "testing" | ||||
| 
 | ||||
| type Boat struct { | ||||
| 	Length int `json:"-"` // on default, this makes the fields not required
 | ||||
| 	Weight int `json:"-"` | ||||
| } | ||||
| 
 | ||||
| // PostBuildModel is from swagger.ModelBuildable
 | ||||
| func (b Boat) PostBuildModel(m *Model) *Model { | ||||
| 	// override required
 | ||||
| 	m.Required = []string{"Length", "Weight"} | ||||
| 
 | ||||
| 	// add model property (just to test is can be added; is this a real usecase?)
 | ||||
| 	extraType := "string" | ||||
| 	m.Properties.Put("extra", ModelProperty{ | ||||
| 		Description: "extra description", | ||||
| 		DataTypeFields: DataTypeFields{ | ||||
| 			Type: &extraType, | ||||
| 		}, | ||||
| 	}) | ||||
| 	return m | ||||
| } | ||||
| 
 | ||||
| func TestCustomPostModelBuilde(t *testing.T) { | ||||
| 	testJsonFromStruct(t, Boat{}, `{ | ||||
|   "swagger.Boat": { | ||||
|    "id": "swagger.Boat", | ||||
|    "required": [ | ||||
|     "Length", | ||||
|     "Weight" | ||||
|    ], | ||||
|    "properties": { | ||||
|     "extra": { | ||||
|      "type": "string", | ||||
|      "description": "extra description" | ||||
|     } | ||||
|    } | ||||
|   } | ||||
| }`) | ||||
| } | ||||
|  | @ -1,185 +0,0 @@ | |||
| // Package swagger implements the structures of the Swagger
 | ||||
| // https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md
 | ||||
| package swagger | ||||
| 
 | ||||
| const swaggerVersion = "1.2" | ||||
| 
 | ||||
| // 4.3.3 Data Type Fields
 | ||||
| type DataTypeFields struct { | ||||
| 	Type         *string  `json:"type,omitempty"` // if Ref not used
 | ||||
| 	Ref          *string  `json:"$ref,omitempty"` // if Type not used
 | ||||
| 	Format       string   `json:"format,omitempty"` | ||||
| 	DefaultValue Special  `json:"defaultValue,omitempty"` | ||||
| 	Enum         []string `json:"enum,omitempty"` | ||||
| 	Minimum      string   `json:"minimum,omitempty"` | ||||
| 	Maximum      string   `json:"maximum,omitempty"` | ||||
| 	Items        *Item    `json:"items,omitempty"` | ||||
| 	UniqueItems  *bool    `json:"uniqueItems,omitempty"` | ||||
| } | ||||
| 
 | ||||
| type Special string | ||||
| 
 | ||||
| // 4.3.4 Items Object
 | ||||
| type Item struct { | ||||
| 	Type   *string `json:"type,omitempty"` | ||||
| 	Ref    *string `json:"$ref,omitempty"` | ||||
| 	Format string  `json:"format,omitempty"` | ||||
| } | ||||
| 
 | ||||
| // 5.1 Resource Listing
 | ||||
| type ResourceListing struct { | ||||
| 	SwaggerVersion string          `json:"swaggerVersion"` // e.g 1.2
 | ||||
| 	Apis           []Resource      `json:"apis"` | ||||
| 	ApiVersion     string          `json:"apiVersion"` | ||||
| 	Info           Info            `json:"info"` | ||||
| 	Authorizations []Authorization `json:"authorizations,omitempty"` | ||||
| } | ||||
| 
 | ||||
| // 5.1.2 Resource Object
 | ||||
| type Resource struct { | ||||
| 	Path        string `json:"path"` // relative or absolute, must start with /
 | ||||
| 	Description string `json:"description"` | ||||
| } | ||||
| 
 | ||||
| // 5.1.3 Info Object
 | ||||
| type Info struct { | ||||
| 	Title             string `json:"title"` | ||||
| 	Description       string `json:"description"` | ||||
| 	TermsOfServiceUrl string `json:"termsOfServiceUrl,omitempty"` | ||||
| 	Contact           string `json:"contact,omitempty"` | ||||
| 	License           string `json:"license,omitempty"` | ||||
| 	LicenseUrl        string `json:"licenseUrl,omitempty"` | ||||
| } | ||||
| 
 | ||||
| // 5.1.5
 | ||||
| type Authorization struct { | ||||
| 	Type       string      `json:"type"` | ||||
| 	PassAs     string      `json:"passAs"` | ||||
| 	Keyname    string      `json:"keyname"` | ||||
| 	Scopes     []Scope     `json:"scopes"` | ||||
| 	GrantTypes []GrantType `json:"grandTypes"` | ||||
| } | ||||
| 
 | ||||
| // 5.1.6, 5.2.11
 | ||||
| type Scope struct { | ||||
| 	// Required. The name of the scope.
 | ||||
| 	Scope string `json:"scope"` | ||||
| 	// Recommended. A short description of the scope.
 | ||||
| 	Description string `json:"description"` | ||||
| } | ||||
| 
 | ||||
| // 5.1.7
 | ||||
| type GrantType struct { | ||||
| 	Implicit          Implicit          `json:"implicit"` | ||||
| 	AuthorizationCode AuthorizationCode `json:"authorization_code"` | ||||
| } | ||||
| 
 | ||||
| // 5.1.8 Implicit Object
 | ||||
| type Implicit struct { | ||||
| 	// Required. The login endpoint definition.
 | ||||
| 	loginEndpoint LoginEndpoint `json:"loginEndpoint"` | ||||
| 	// An optional alternative name to standard "access_token" OAuth2 parameter.
 | ||||
| 	TokenName string `json:"tokenName"` | ||||
| } | ||||
| 
 | ||||
| // 5.1.9 Authorization Code Object
 | ||||
| type AuthorizationCode struct { | ||||
| 	TokenRequestEndpoint TokenRequestEndpoint `json:"tokenRequestEndpoint"` | ||||
| 	TokenEndpoint        TokenEndpoint        `json:"tokenEndpoint"` | ||||
| } | ||||
| 
 | ||||
| // 5.1.10 Login Endpoint Object
 | ||||
| type LoginEndpoint struct { | ||||
| 	// Required. The URL of the authorization endpoint for the implicit grant flow. The value SHOULD be in a URL format.
 | ||||
| 	Url string `json:"url"` | ||||
| } | ||||
| 
 | ||||
| // 5.1.11 Token Request Endpoint Object
 | ||||
| type TokenRequestEndpoint struct { | ||||
| 	// Required. The URL of the authorization endpoint for the authentication code grant flow. The value SHOULD be in a URL format.
 | ||||
| 	Url string `json:"url"` | ||||
| 	// An optional alternative name to standard "client_id" OAuth2 parameter.
 | ||||
| 	ClientIdName string `json:"clientIdName"` | ||||
| 	// An optional alternative name to the standard "client_secret" OAuth2 parameter.
 | ||||
| 	ClientSecretName string `json:"clientSecretName"` | ||||
| } | ||||
| 
 | ||||
| // 5.1.12 Token Endpoint Object
 | ||||
| type TokenEndpoint struct { | ||||
| 	// Required. The URL of the token endpoint for the authentication code grant flow. The value SHOULD be in a URL format.
 | ||||
| 	Url string `json:"url"` | ||||
| 	// An optional alternative name to standard "access_token" OAuth2 parameter.
 | ||||
| 	TokenName string `json:"tokenName"` | ||||
| } | ||||
| 
 | ||||
| // 5.2 API Declaration
 | ||||
| type ApiDeclaration struct { | ||||
| 	SwaggerVersion string          `json:"swaggerVersion"` | ||||
| 	ApiVersion     string          `json:"apiVersion"` | ||||
| 	BasePath       string          `json:"basePath"` | ||||
| 	ResourcePath   string          `json:"resourcePath"` // must start with /
 | ||||
| 	Info           Info            `json:"info"` | ||||
| 	Apis           []Api           `json:"apis,omitempty"` | ||||
| 	Models         ModelList       `json:"models,omitempty"` | ||||
| 	Produces       []string        `json:"produces,omitempty"` | ||||
| 	Consumes       []string        `json:"consumes,omitempty"` | ||||
| 	Authorizations []Authorization `json:"authorizations,omitempty"` | ||||
| } | ||||
| 
 | ||||
| // 5.2.2 API Object
 | ||||
| type Api struct { | ||||
| 	Path        string      `json:"path"` // relative or absolute, must start with /
 | ||||
| 	Description string      `json:"description"` | ||||
| 	Operations  []Operation `json:"operations,omitempty"` | ||||
| } | ||||
| 
 | ||||
| // 5.2.3 Operation Object
 | ||||
| type Operation struct { | ||||
| 	DataTypeFields | ||||
| 	Method           string            `json:"method"` | ||||
| 	Summary          string            `json:"summary,omitempty"` | ||||
| 	Notes            string            `json:"notes,omitempty"` | ||||
| 	Nickname         string            `json:"nickname"` | ||||
| 	Authorizations   []Authorization   `json:"authorizations,omitempty"` | ||||
| 	Parameters       []Parameter       `json:"parameters"` | ||||
| 	ResponseMessages []ResponseMessage `json:"responseMessages,omitempty"` // optional
 | ||||
| 	Produces         []string          `json:"produces,omitempty"` | ||||
| 	Consumes         []string          `json:"consumes,omitempty"` | ||||
| 	Deprecated       string            `json:"deprecated,omitempty"` | ||||
| } | ||||
| 
 | ||||
| // 5.2.4 Parameter Object
 | ||||
| type Parameter struct { | ||||
| 	DataTypeFields | ||||
| 	ParamType     string `json:"paramType"` // path,query,body,header,form
 | ||||
| 	Name          string `json:"name"` | ||||
| 	Description   string `json:"description"` | ||||
| 	Required      bool   `json:"required"` | ||||
| 	AllowMultiple bool   `json:"allowMultiple"` | ||||
| } | ||||
| 
 | ||||
| // 5.2.5 Response Message Object
 | ||||
| type ResponseMessage struct { | ||||
| 	Code          int    `json:"code"` | ||||
| 	Message       string `json:"message"` | ||||
| 	ResponseModel string `json:"responseModel,omitempty"` | ||||
| } | ||||
| 
 | ||||
| // 5.2.6, 5.2.7 Models Object
 | ||||
| type Model struct { | ||||
| 	Id            string            `json:"id"` | ||||
| 	Description   string            `json:"description,omitempty"` | ||||
| 	Required      []string          `json:"required,omitempty"` | ||||
| 	Properties    ModelPropertyList `json:"properties"` | ||||
| 	SubTypes      []string          `json:"subTypes,omitempty"` | ||||
| 	Discriminator string            `json:"discriminator,omitempty"` | ||||
| } | ||||
| 
 | ||||
| // 5.2.8 Properties Object
 | ||||
| type ModelProperty struct { | ||||
| 	DataTypeFields | ||||
| 	Description string `json:"description,omitempty"` | ||||
| } | ||||
| 
 | ||||
| // 5.2.10
 | ||||
| type Authorizations map[string]Authorization | ||||
|  | @ -1,21 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| type SwaggerBuilder struct { | ||||
| 	SwaggerService | ||||
| } | ||||
| 
 | ||||
| func NewSwaggerBuilder(config Config) *SwaggerBuilder { | ||||
| 	return &SwaggerBuilder{*newSwaggerService(config)} | ||||
| } | ||||
| 
 | ||||
| func (sb SwaggerBuilder) ProduceListing() ResourceListing { | ||||
| 	return sb.SwaggerService.produceListing() | ||||
| } | ||||
| 
 | ||||
| func (sb SwaggerBuilder) ProduceAllDeclarations() map[string]ApiDeclaration { | ||||
| 	return sb.SwaggerService.produceAllDeclarations() | ||||
| } | ||||
| 
 | ||||
| func (sb SwaggerBuilder) ProduceDeclarations(route string) (*ApiDeclaration, bool) { | ||||
| 	return sb.SwaggerService.produceDeclarations(route) | ||||
| } | ||||
|  | @ -1,318 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| 	"testing" | ||||
| 
 | ||||
| 	"github.com/emicklei/go-restful" | ||||
| 	"github.com/emicklei/go-restful-swagger12/test_package" | ||||
| ) | ||||
| 
 | ||||
| func TestInfoStruct_Issue231(t *testing.T) { | ||||
| 	config := Config{ | ||||
| 		Info: Info{ | ||||
| 			Title:             "Title", | ||||
| 			Description:       "Description", | ||||
| 			TermsOfServiceUrl: "http://example.com", | ||||
| 			Contact:           "example@example.com", | ||||
| 			License:           "License", | ||||
| 			LicenseUrl:        "http://example.com/license.txt", | ||||
| 		}, | ||||
| 	} | ||||
| 	sws := newSwaggerService(config) | ||||
| 	str, err := json.MarshalIndent(sws.produceListing(), "", "    ") | ||||
| 	if err != nil { | ||||
| 		t.Fatal(err) | ||||
| 	} | ||||
| 	compareJson(t, string(str), ` | ||||
| 	{ | ||||
| 		"apiVersion": "", | ||||
| 		"swaggerVersion": "1.2", | ||||
| 		"apis": null, | ||||
| 		"info": { | ||||
| 			"title": "Title", | ||||
| 			"description": "Description", | ||||
| 			"termsOfServiceUrl": "http://example.com", | ||||
| 			"contact": "example@example.com", | ||||
| 			"license": "License", | ||||
| 			"licenseUrl": "http://example.com/license.txt" | ||||
| 		} | ||||
| 	} | ||||
| 	`) | ||||
| } | ||||
| 
 | ||||
| // go test -v -test.run TestThatMultiplePathsOnRootAreHandled ...swagger
 | ||||
| func TestThatMultiplePathsOnRootAreHandled(t *testing.T) { | ||||
| 	ws1 := new(restful.WebService) | ||||
| 	ws1.Route(ws1.GET("/_ping").To(dummy)) | ||||
| 	ws1.Route(ws1.GET("/version").To(dummy)) | ||||
| 
 | ||||
| 	cfg := Config{ | ||||
| 		WebServicesUrl: "http://here.com", | ||||
| 		ApiPath:        "/apipath", | ||||
| 		WebServices:    []*restful.WebService{ws1}, | ||||
| 	} | ||||
| 	sws := newSwaggerService(cfg) | ||||
| 	decl := sws.composeDeclaration(ws1, "/") | ||||
| 	if got, want := len(decl.Apis), 2; got != want { | ||||
| 		t.Errorf("got %v want %v", got, want) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func TestWriteSamples(t *testing.T) { | ||||
| 	ws1 := new(restful.WebService) | ||||
| 	ws1.Route(ws1.GET("/object").To(dummy).Writes(test_package.TestStruct{})) | ||||
| 	ws1.Route(ws1.GET("/array").To(dummy).Writes([]test_package.TestStruct{})) | ||||
| 	ws1.Route(ws1.GET("/object_and_array").To(dummy).Writes(struct{ Abc test_package.TestStruct }{})) | ||||
| 
 | ||||
| 	cfg := Config{ | ||||
| 		WebServicesUrl: "http://here.com", | ||||
| 		ApiPath:        "/apipath", | ||||
| 		WebServices:    []*restful.WebService{ws1}, | ||||
| 	} | ||||
| 	sws := newSwaggerService(cfg) | ||||
| 
 | ||||
| 	decl := sws.composeDeclaration(ws1, "/") | ||||
| 
 | ||||
| 	str, err := json.MarshalIndent(decl.Apis, "", "    ") | ||||
| 	if err != nil { | ||||
| 		t.Fatal(err) | ||||
| 	} | ||||
| 
 | ||||
| 	compareJson(t, string(str), ` | ||||
| 	[ | ||||
| 		{ | ||||
| 			"path": "/object", | ||||
| 			"description": "", | ||||
| 			"operations": [ | ||||
| 				{ | ||||
| 					"type": "test_package.TestStruct", | ||||
| 					"method": "GET", | ||||
| 					"nickname": "dummy", | ||||
| 					"parameters": [] | ||||
| 				} | ||||
| 			] | ||||
| 		}, | ||||
| 		{ | ||||
| 			"path": "/array", | ||||
| 			"description": "", | ||||
| 			"operations": [ | ||||
| 				{ | ||||
| 					"type": "array", | ||||
| 					"items": { | ||||
| 						"$ref": "test_package.TestStruct" | ||||
| 					}, | ||||
| 					"method": "GET", | ||||
| 					"nickname": "dummy", | ||||
| 					"parameters": [] | ||||
| 				} | ||||
| 			] | ||||
| 		}, | ||||
| 		{ | ||||
| 			"path": "/object_and_array", | ||||
| 			"description": "", | ||||
| 			"operations": [ | ||||
| 				{ | ||||
| 					"type": "struct { Abc test_package.TestStruct }", | ||||
| 					"method": "GET", | ||||
| 					"nickname": "dummy", | ||||
| 					"parameters": [] | ||||
| 				} | ||||
| 			] | ||||
| 		} | ||||
|     ]`) | ||||
| 
 | ||||
| 	str, err = json.MarshalIndent(decl.Models, "", "    ") | ||||
| 	if err != nil { | ||||
| 		t.Fatal(err) | ||||
| 	} | ||||
| 	compareJson(t, string(str), ` | ||||
| 	{ | ||||
| 		"test_package.TestStruct": { | ||||
| 			"id": "test_package.TestStruct", | ||||
| 			"required": [ | ||||
| 				"TestField" | ||||
| 			], | ||||
| 			"properties": { | ||||
| 				"TestField": { | ||||
| 					"type": "string" | ||||
| 				} | ||||
| 			} | ||||
| 		}, | ||||
| 		"||test_package.TestStruct": { | ||||
| 			"id": "||test_package.TestStruct", | ||||
| 			"properties": {} | ||||
| 		}, | ||||
| 		"struct { Abc test_package.TestStruct }": { | ||||
| 			"id": "struct { Abc test_package.TestStruct }", | ||||
| 			"required": [ | ||||
| 				"Abc" | ||||
| 			], | ||||
| 			"properties": { | ||||
| 				"Abc": { | ||||
| 					"$ref": "test_package.TestStruct" | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
|     }`) | ||||
| } | ||||
| 
 | ||||
| func TestRoutesWithCommonPart(t *testing.T) { | ||||
| 	ws1 := new(restful.WebService) | ||||
| 	ws1.Path("/") | ||||
| 	ws1.Route(ws1.GET("/foobar").To(dummy).Writes(test_package.TestStruct{})) | ||||
| 	ws1.Route(ws1.HEAD("/foobar").To(dummy).Writes(test_package.TestStruct{})) | ||||
| 	ws1.Route(ws1.GET("/foo").To(dummy).Writes([]test_package.TestStruct{})) | ||||
| 	ws1.Route(ws1.HEAD("/foo").To(dummy).Writes(test_package.TestStruct{})) | ||||
| 
 | ||||
| 	cfg := Config{ | ||||
| 		WebServicesUrl: "http://here.com", | ||||
| 		ApiPath:        "/apipath", | ||||
| 		WebServices:    []*restful.WebService{ws1}, | ||||
| 	} | ||||
| 	sws := newSwaggerService(cfg) | ||||
| 
 | ||||
| 	decl := sws.composeDeclaration(ws1, "/foo") | ||||
| 
 | ||||
| 	str, err := json.MarshalIndent(decl.Apis, "", "    ") | ||||
| 	if err != nil { | ||||
| 		t.Fatal(err) | ||||
| 	} | ||||
| 
 | ||||
| 	compareJson(t, string(str), `[ | ||||
| 		{ | ||||
| 			"path": "/foo", | ||||
| 			"description": "", | ||||
| 			"operations": [ | ||||
| 				{ | ||||
| 					"type": "array", | ||||
| 					"items": { | ||||
| 						"$ref": "test_package.TestStruct" | ||||
| 					}, | ||||
| 					"method": "GET", | ||||
| 					"nickname": "dummy", | ||||
| 					"parameters": [] | ||||
| 				}, | ||||
| 				{ | ||||
| 					"type": "test_package.TestStruct", | ||||
| 					"method": "HEAD", | ||||
| 					"nickname": "dummy", | ||||
| 					"parameters": [] | ||||
| 				} | ||||
| 			] | ||||
| 		} | ||||
|     ]`) | ||||
| } | ||||
| 
 | ||||
| // go test -v -test.run TestServiceToApi ...swagger
 | ||||
| func TestServiceToApi(t *testing.T) { | ||||
| 	ws := new(restful.WebService) | ||||
| 	ws.Path("/tests") | ||||
| 	ws.Consumes(restful.MIME_JSON) | ||||
| 	ws.Produces(restful.MIME_XML) | ||||
| 	ws.Route(ws.GET("/a").To(dummy).Writes(sample{})) | ||||
| 	ws.Route(ws.PUT("/b").To(dummy).Writes(sample{})) | ||||
| 	ws.Route(ws.POST("/c").To(dummy).Writes(sample{})) | ||||
| 	ws.Route(ws.DELETE("/d").To(dummy).Writes(sample{})) | ||||
| 
 | ||||
| 	ws.Route(ws.GET("/d").To(dummy).Writes(sample{})) | ||||
| 	ws.Route(ws.PUT("/c").To(dummy).Writes(sample{})) | ||||
| 	ws.Route(ws.POST("/b").To(dummy).Writes(sample{})) | ||||
| 	ws.Route(ws.DELETE("/a").To(dummy).Writes(sample{})) | ||||
| 	ws.ApiVersion("1.2.3") | ||||
| 	cfg := Config{ | ||||
| 		WebServicesUrl:   "http://here.com", | ||||
| 		ApiPath:          "/apipath", | ||||
| 		WebServices:      []*restful.WebService{ws}, | ||||
| 		PostBuildHandler: func(in *ApiDeclarationList) {}, | ||||
| 	} | ||||
| 	sws := newSwaggerService(cfg) | ||||
| 	decl := sws.composeDeclaration(ws, "/tests") | ||||
| 	// checks
 | ||||
| 	if decl.ApiVersion != "1.2.3" { | ||||
| 		t.Errorf("got %v want %v", decl.ApiVersion, "1.2.3") | ||||
| 	} | ||||
| 	if decl.BasePath != "http://here.com" { | ||||
| 		t.Errorf("got %v want %v", decl.BasePath, "http://here.com") | ||||
| 	} | ||||
| 	if len(decl.Apis) != 4 { | ||||
| 		t.Errorf("got %v want %v", len(decl.Apis), 4) | ||||
| 	} | ||||
| 	pathOrder := "" | ||||
| 	for _, each := range decl.Apis { | ||||
| 		pathOrder += each.Path | ||||
| 		for _, other := range each.Operations { | ||||
| 			pathOrder += other.Method | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	if pathOrder != "/tests/aGETDELETE/tests/bPUTPOST/tests/cPOSTPUT/tests/dDELETEGET" { | ||||
| 		t.Errorf("got %v want %v", pathOrder, "see test source") | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func dummy(i *restful.Request, o *restful.Response) {} | ||||
| 
 | ||||
| // go test -v -test.run TestIssue78 ...swagger
 | ||||
| type Response struct { | ||||
| 	Code  int | ||||
| 	Users *[]User | ||||
| 	Items *[]TestItem | ||||
| } | ||||
| type User struct { | ||||
| 	Id, Name string | ||||
| } | ||||
| type TestItem struct { | ||||
| 	Id, Name string | ||||
| } | ||||
| 
 | ||||
| // clear && go test -v -test.run TestComposeResponseMessages ...swagger
 | ||||
| func TestComposeResponseMessages(t *testing.T) { | ||||
| 	responseErrors := map[int]restful.ResponseError{} | ||||
| 	responseErrors[400] = restful.ResponseError{Code: 400, Message: "Bad Request", Model: TestItem{}} | ||||
| 	route := restful.Route{ResponseErrors: responseErrors} | ||||
| 	decl := new(ApiDeclaration) | ||||
| 	decl.Models = ModelList{} | ||||
| 	msgs := composeResponseMessages(route, decl, &Config{}) | ||||
| 	if msgs[0].ResponseModel != "swagger.TestItem" { | ||||
| 		t.Errorf("got %s want swagger.TestItem", msgs[0].ResponseModel) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func TestIssue78(t *testing.T) { | ||||
| 	sws := newSwaggerService(Config{}) | ||||
| 	models := new(ModelList) | ||||
| 	sws.addModelFromSampleTo(&Operation{}, true, Response{Items: &[]TestItem{}}, models) | ||||
| 	model, ok := models.At("swagger.Response") | ||||
| 	if !ok { | ||||
| 		t.Fatal("missing response model") | ||||
| 	} | ||||
| 	if "swagger.Response" != model.Id { | ||||
| 		t.Fatal("wrong model id:" + model.Id) | ||||
| 	} | ||||
| 	code, ok := model.Properties.At("Code") | ||||
| 	if !ok { | ||||
| 		t.Fatal("missing code") | ||||
| 	} | ||||
| 	if "integer" != *code.Type { | ||||
| 		t.Fatal("wrong code type:" + *code.Type) | ||||
| 	} | ||||
| 	items, ok := model.Properties.At("Items") | ||||
| 	if !ok { | ||||
| 		t.Fatal("missing items") | ||||
| 	} | ||||
| 	if "array" != *items.Type { | ||||
| 		t.Fatal("wrong items type:" + *items.Type) | ||||
| 	} | ||||
| 	items_items := items.Items | ||||
| 	if items_items == nil { | ||||
| 		t.Fatal("missing items->items") | ||||
| 	} | ||||
| 	ref := items_items.Ref | ||||
| 	if ref == nil { | ||||
| 		t.Fatal("missing $ref") | ||||
| 	} | ||||
| 	if *ref != "swagger.TestItem" { | ||||
| 		t.Fatal("wrong $ref:" + *ref) | ||||
| 	} | ||||
| } | ||||
|  | @ -1,443 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| import ( | ||||
| 	"fmt" | ||||
| 
 | ||||
| 	"github.com/emicklei/go-restful" | ||||
| 	// "github.com/emicklei/hopwatch"
 | ||||
| 	"net/http" | ||||
| 	"reflect" | ||||
| 	"sort" | ||||
| 	"strings" | ||||
| 
 | ||||
| 	"github.com/emicklei/go-restful/log" | ||||
| ) | ||||
| 
 | ||||
| type SwaggerService struct { | ||||
| 	config            Config | ||||
| 	apiDeclarationMap *ApiDeclarationList | ||||
| } | ||||
| 
 | ||||
| func newSwaggerService(config Config) *SwaggerService { | ||||
| 	sws := &SwaggerService{ | ||||
| 		config:            config, | ||||
| 		apiDeclarationMap: new(ApiDeclarationList)} | ||||
| 
 | ||||
| 	// Build all ApiDeclarations
 | ||||
| 	for _, each := range config.WebServices { | ||||
| 		rootPath := each.RootPath() | ||||
| 		// skip the api service itself
 | ||||
| 		if rootPath != config.ApiPath { | ||||
| 			if rootPath == "" || rootPath == "/" { | ||||
| 				// use routes
 | ||||
| 				for _, route := range each.Routes() { | ||||
| 					entry := staticPathFromRoute(route) | ||||
| 					_, exists := sws.apiDeclarationMap.At(entry) | ||||
| 					if !exists { | ||||
| 						sws.apiDeclarationMap.Put(entry, sws.composeDeclaration(each, entry)) | ||||
| 					} | ||||
| 				} | ||||
| 			} else { // use root path
 | ||||
| 				sws.apiDeclarationMap.Put(each.RootPath(), sws.composeDeclaration(each, each.RootPath())) | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	// if specified then call the PostBuilderHandler
 | ||||
| 	if config.PostBuildHandler != nil { | ||||
| 		config.PostBuildHandler(sws.apiDeclarationMap) | ||||
| 	} | ||||
| 	return sws | ||||
| } | ||||
| 
 | ||||
| // LogInfo is the function that is called when this package needs to log. It defaults to log.Printf
 | ||||
| var LogInfo = func(format string, v ...interface{}) { | ||||
| 	// use the restful package-wide logger
 | ||||
| 	log.Printf(format, v...) | ||||
| } | ||||
| 
 | ||||
| // InstallSwaggerService add the WebService that provides the API documentation of all services
 | ||||
| // conform the Swagger documentation specifcation. (https://github.com/wordnik/swagger-core/wiki).
 | ||||
| func InstallSwaggerService(aSwaggerConfig Config) { | ||||
| 	RegisterSwaggerService(aSwaggerConfig, restful.DefaultContainer) | ||||
| } | ||||
| 
 | ||||
| // RegisterSwaggerService add the WebService that provides the API documentation of all services
 | ||||
| // conform the Swagger documentation specifcation. (https://github.com/wordnik/swagger-core/wiki).
 | ||||
| func RegisterSwaggerService(config Config, wsContainer *restful.Container) { | ||||
| 	sws := newSwaggerService(config) | ||||
| 	ws := new(restful.WebService) | ||||
| 	ws.Path(config.ApiPath) | ||||
| 	ws.Produces(restful.MIME_JSON) | ||||
| 	if config.DisableCORS { | ||||
| 		ws.Filter(enableCORS) | ||||
| 	} | ||||
| 	ws.Route(ws.GET("/").To(sws.getListing)) | ||||
| 	ws.Route(ws.GET("/{a}").To(sws.getDeclarations)) | ||||
| 	ws.Route(ws.GET("/{a}/{b}").To(sws.getDeclarations)) | ||||
| 	ws.Route(ws.GET("/{a}/{b}/{c}").To(sws.getDeclarations)) | ||||
| 	ws.Route(ws.GET("/{a}/{b}/{c}/{d}").To(sws.getDeclarations)) | ||||
| 	ws.Route(ws.GET("/{a}/{b}/{c}/{d}/{e}").To(sws.getDeclarations)) | ||||
| 	ws.Route(ws.GET("/{a}/{b}/{c}/{d}/{e}/{f}").To(sws.getDeclarations)) | ||||
| 	ws.Route(ws.GET("/{a}/{b}/{c}/{d}/{e}/{f}/{g}").To(sws.getDeclarations)) | ||||
| 	LogInfo("[restful/swagger] listing is available at %v%v", config.WebServicesUrl, config.ApiPath) | ||||
| 	wsContainer.Add(ws) | ||||
| 
 | ||||
| 	// Check paths for UI serving
 | ||||
| 	if config.StaticHandler == nil && config.SwaggerFilePath != "" && config.SwaggerPath != "" { | ||||
| 		swaggerPathSlash := config.SwaggerPath | ||||
| 		// path must end with slash /
 | ||||
| 		if "/" != config.SwaggerPath[len(config.SwaggerPath)-1:] { | ||||
| 			LogInfo("[restful/swagger] use corrected SwaggerPath ; must end with slash (/)") | ||||
| 			swaggerPathSlash += "/" | ||||
| 		} | ||||
| 
 | ||||
| 		LogInfo("[restful/swagger] %v%v is mapped to folder %v", config.WebServicesUrl, swaggerPathSlash, config.SwaggerFilePath) | ||||
| 		wsContainer.Handle(swaggerPathSlash, http.StripPrefix(swaggerPathSlash, http.FileServer(http.Dir(config.SwaggerFilePath)))) | ||||
| 
 | ||||
| 		//if we define a custom static handler use it
 | ||||
| 	} else if config.StaticHandler != nil && config.SwaggerPath != "" { | ||||
| 		swaggerPathSlash := config.SwaggerPath | ||||
| 		// path must end with slash /
 | ||||
| 		if "/" != config.SwaggerPath[len(config.SwaggerPath)-1:] { | ||||
| 			LogInfo("[restful/swagger] use corrected SwaggerFilePath ; must end with slash (/)") | ||||
| 			swaggerPathSlash += "/" | ||||
| 
 | ||||
| 		} | ||||
| 		LogInfo("[restful/swagger] %v%v is mapped to custom Handler %T", config.WebServicesUrl, swaggerPathSlash, config.StaticHandler) | ||||
| 		wsContainer.Handle(swaggerPathSlash, config.StaticHandler) | ||||
| 
 | ||||
| 	} else { | ||||
| 		LogInfo("[restful/swagger] Swagger(File)Path is empty ; no UI is served") | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func staticPathFromRoute(r restful.Route) string { | ||||
| 	static := r.Path | ||||
| 	bracket := strings.Index(static, "{") | ||||
| 	if bracket <= 1 { // result cannot be empty
 | ||||
| 		return static | ||||
| 	} | ||||
| 	if bracket != -1 { | ||||
| 		static = r.Path[:bracket] | ||||
| 	} | ||||
| 	if strings.HasSuffix(static, "/") { | ||||
| 		return static[:len(static)-1] | ||||
| 	} else { | ||||
| 		return static | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func enableCORS(req *restful.Request, resp *restful.Response, chain *restful.FilterChain) { | ||||
| 	if origin := req.HeaderParameter(restful.HEADER_Origin); origin != "" { | ||||
| 		// prevent duplicate header
 | ||||
| 		if len(resp.Header().Get(restful.HEADER_AccessControlAllowOrigin)) == 0 { | ||||
| 			resp.AddHeader(restful.HEADER_AccessControlAllowOrigin, origin) | ||||
| 		} | ||||
| 	} | ||||
| 	chain.ProcessFilter(req, resp) | ||||
| } | ||||
| 
 | ||||
| func (sws SwaggerService) getListing(req *restful.Request, resp *restful.Response) { | ||||
| 	listing := sws.produceListing() | ||||
| 	resp.WriteAsJson(listing) | ||||
| } | ||||
| 
 | ||||
| func (sws SwaggerService) produceListing() ResourceListing { | ||||
| 	listing := ResourceListing{SwaggerVersion: swaggerVersion, ApiVersion: sws.config.ApiVersion, Info: sws.config.Info} | ||||
| 	sws.apiDeclarationMap.Do(func(k string, v ApiDeclaration) { | ||||
| 		ref := Resource{Path: k} | ||||
| 		if len(v.Apis) > 0 { // use description of first (could still be empty)
 | ||||
| 			ref.Description = v.Apis[0].Description | ||||
| 		} | ||||
| 		listing.Apis = append(listing.Apis, ref) | ||||
| 	}) | ||||
| 	return listing | ||||
| } | ||||
| 
 | ||||
| func (sws SwaggerService) getDeclarations(req *restful.Request, resp *restful.Response) { | ||||
| 	decl, ok := sws.produceDeclarations(composeRootPath(req)) | ||||
| 	if !ok { | ||||
| 		resp.WriteErrorString(http.StatusNotFound, "ApiDeclaration not found") | ||||
| 		return | ||||
| 	} | ||||
| 	// unless WebServicesUrl is given
 | ||||
| 	if len(sws.config.WebServicesUrl) == 0 { | ||||
| 		// update base path from the actual request
 | ||||
| 		// TODO how to detect https? assume http for now
 | ||||
| 		var host string | ||||
| 		// X-Forwarded-Host or Host or Request.Host
 | ||||
| 		hostvalues, ok := req.Request.Header["X-Forwarded-Host"] // apache specific?
 | ||||
| 		if !ok || len(hostvalues) == 0 { | ||||
| 			forwarded, ok := req.Request.Header["Host"] // without reverse-proxy
 | ||||
| 			if !ok || len(forwarded) == 0 { | ||||
| 				// fallback to Host field
 | ||||
| 				host = req.Request.Host | ||||
| 			} else { | ||||
| 				host = forwarded[0] | ||||
| 			} | ||||
| 		} else { | ||||
| 			host = hostvalues[0] | ||||
| 		} | ||||
| 		// inspect Referer for the scheme (http vs https)
 | ||||
| 		scheme := "http" | ||||
| 		if referer := req.Request.Header["Referer"]; len(referer) > 0 { | ||||
| 			if strings.HasPrefix(referer[0], "https") { | ||||
| 				scheme = "https" | ||||
| 			} | ||||
| 		} | ||||
| 		decl.BasePath = fmt.Sprintf("%s://%s", scheme, host) | ||||
| 	} | ||||
| 	resp.WriteAsJson(decl) | ||||
| } | ||||
| 
 | ||||
| func (sws SwaggerService) produceAllDeclarations() map[string]ApiDeclaration { | ||||
| 	decls := map[string]ApiDeclaration{} | ||||
| 	sws.apiDeclarationMap.Do(func(k string, v ApiDeclaration) { | ||||
| 		decls[k] = v | ||||
| 	}) | ||||
| 	return decls | ||||
| } | ||||
| 
 | ||||
| func (sws SwaggerService) produceDeclarations(route string) (*ApiDeclaration, bool) { | ||||
| 	decl, ok := sws.apiDeclarationMap.At(route) | ||||
| 	if !ok { | ||||
| 		return nil, false | ||||
| 	} | ||||
| 	decl.BasePath = sws.config.WebServicesUrl | ||||
| 	return &decl, true | ||||
| } | ||||
| 
 | ||||
| // composeDeclaration uses all routes and parameters to create a ApiDeclaration
 | ||||
| func (sws SwaggerService) composeDeclaration(ws *restful.WebService, pathPrefix string) ApiDeclaration { | ||||
| 	decl := ApiDeclaration{ | ||||
| 		SwaggerVersion: swaggerVersion, | ||||
| 		BasePath:       sws.config.WebServicesUrl, | ||||
| 		ResourcePath:   pathPrefix, | ||||
| 		Models:         ModelList{}, | ||||
| 		ApiVersion:     ws.Version()} | ||||
| 
 | ||||
| 	// collect any path parameters
 | ||||
| 	rootParams := []Parameter{} | ||||
| 	for _, param := range ws.PathParameters() { | ||||
| 		rootParams = append(rootParams, asSwaggerParameter(param.Data())) | ||||
| 	} | ||||
| 	// aggregate by path
 | ||||
| 	pathToRoutes := newOrderedRouteMap() | ||||
| 	for _, other := range ws.Routes() { | ||||
| 		if strings.HasPrefix(other.Path, pathPrefix) { | ||||
| 			if len(pathPrefix) > 1 && len(other.Path) > len(pathPrefix) && other.Path[len(pathPrefix)] != '/' { | ||||
| 				continue | ||||
| 			} | ||||
| 			pathToRoutes.Add(other.Path, other) | ||||
| 		} | ||||
| 	} | ||||
| 	pathToRoutes.Do(func(path string, routes []restful.Route) { | ||||
| 		api := Api{Path: strings.TrimSuffix(withoutWildcard(path), "/"), Description: ws.Documentation()} | ||||
| 		voidString := "void" | ||||
| 		for _, route := range routes { | ||||
| 			operation := Operation{ | ||||
| 				Method:  route.Method, | ||||
| 				Summary: route.Doc, | ||||
| 				Notes:   route.Notes, | ||||
| 				// Type gets overwritten if there is a write sample
 | ||||
| 				DataTypeFields:   DataTypeFields{Type: &voidString}, | ||||
| 				Parameters:       []Parameter{}, | ||||
| 				Nickname:         route.Operation, | ||||
| 				ResponseMessages: composeResponseMessages(route, &decl, &sws.config)} | ||||
| 
 | ||||
| 			operation.Consumes = route.Consumes | ||||
| 			operation.Produces = route.Produces | ||||
| 
 | ||||
| 			// share root params if any
 | ||||
| 			for _, swparam := range rootParams { | ||||
| 				operation.Parameters = append(operation.Parameters, swparam) | ||||
| 			} | ||||
| 			// route specific params
 | ||||
| 			for _, param := range route.ParameterDocs { | ||||
| 				operation.Parameters = append(operation.Parameters, asSwaggerParameter(param.Data())) | ||||
| 			} | ||||
| 
 | ||||
| 			sws.addModelsFromRouteTo(&operation, route, &decl) | ||||
| 			api.Operations = append(api.Operations, operation) | ||||
| 		} | ||||
| 		decl.Apis = append(decl.Apis, api) | ||||
| 	}) | ||||
| 	return decl | ||||
| } | ||||
| 
 | ||||
| func withoutWildcard(path string) string { | ||||
| 	if strings.HasSuffix(path, ":*}") { | ||||
| 		return path[0:len(path)-3] + "}" | ||||
| 	} | ||||
| 	return path | ||||
| } | ||||
| 
 | ||||
| // composeResponseMessages takes the ResponseErrors (if any) and creates ResponseMessages from them.
 | ||||
| func composeResponseMessages(route restful.Route, decl *ApiDeclaration, config *Config) (messages []ResponseMessage) { | ||||
| 	if route.ResponseErrors == nil { | ||||
| 		return messages | ||||
| 	} | ||||
| 	// sort by code
 | ||||
| 	codes := sort.IntSlice{} | ||||
| 	for code := range route.ResponseErrors { | ||||
| 		codes = append(codes, code) | ||||
| 	} | ||||
| 	codes.Sort() | ||||
| 	for _, code := range codes { | ||||
| 		each := route.ResponseErrors[code] | ||||
| 		message := ResponseMessage{ | ||||
| 			Code:    code, | ||||
| 			Message: each.Message, | ||||
| 		} | ||||
| 		if each.Model != nil { | ||||
| 			st := reflect.TypeOf(each.Model) | ||||
| 			isCollection, st := detectCollectionType(st) | ||||
| 			// collection cannot be in responsemodel
 | ||||
| 			if !isCollection { | ||||
| 				modelName := modelBuilder{}.keyFrom(st) | ||||
| 				modelBuilder{Models: &decl.Models, Config: config}.addModel(st, "") | ||||
| 				message.ResponseModel = modelName | ||||
| 			} | ||||
| 		} | ||||
| 		messages = append(messages, message) | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // addModelsFromRoute takes any read or write sample from the Route and creates a Swagger model from it.
 | ||||
| func (sws SwaggerService) addModelsFromRouteTo(operation *Operation, route restful.Route, decl *ApiDeclaration) { | ||||
| 	if route.ReadSample != nil { | ||||
| 		sws.addModelFromSampleTo(operation, false, route.ReadSample, &decl.Models) | ||||
| 	} | ||||
| 	if route.WriteSample != nil { | ||||
| 		sws.addModelFromSampleTo(operation, true, route.WriteSample, &decl.Models) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func detectCollectionType(st reflect.Type) (bool, reflect.Type) { | ||||
| 	isCollection := false | ||||
| 	if st.Kind() == reflect.Slice || st.Kind() == reflect.Array { | ||||
| 		st = st.Elem() | ||||
| 		isCollection = true | ||||
| 	} else { | ||||
| 		if st.Kind() == reflect.Ptr { | ||||
| 			if st.Elem().Kind() == reflect.Slice || st.Elem().Kind() == reflect.Array { | ||||
| 				st = st.Elem().Elem() | ||||
| 				isCollection = true | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	return isCollection, st | ||||
| } | ||||
| 
 | ||||
| // addModelFromSample creates and adds (or overwrites) a Model from a sample resource
 | ||||
| func (sws SwaggerService) addModelFromSampleTo(operation *Operation, isResponse bool, sample interface{}, models *ModelList) { | ||||
| 	mb := modelBuilder{Models: models, Config: &sws.config} | ||||
| 	if isResponse { | ||||
| 		sampleType, items := asDataType(sample, &sws.config) | ||||
| 		operation.Type = sampleType | ||||
| 		operation.Items = items | ||||
| 	} | ||||
| 	mb.addModelFrom(sample) | ||||
| } | ||||
| 
 | ||||
| func asSwaggerParameter(param restful.ParameterData) Parameter { | ||||
| 	return Parameter{ | ||||
| 		DataTypeFields: DataTypeFields{ | ||||
| 			Type:         ¶m.DataType, | ||||
| 			Format:       asFormat(param.DataType, param.DataFormat), | ||||
| 			DefaultValue: Special(param.DefaultValue), | ||||
| 		}, | ||||
| 		Name:        param.Name, | ||||
| 		Description: param.Description, | ||||
| 		ParamType:   asParamType(param.Kind), | ||||
| 
 | ||||
| 		Required: param.Required} | ||||
| } | ||||
| 
 | ||||
| // Between 1..7 path parameters is supported
 | ||||
| func composeRootPath(req *restful.Request) string { | ||||
| 	path := "/" + req.PathParameter("a") | ||||
| 	b := req.PathParameter("b") | ||||
| 	if b == "" { | ||||
| 		return path | ||||
| 	} | ||||
| 	path = path + "/" + b | ||||
| 	c := req.PathParameter("c") | ||||
| 	if c == "" { | ||||
| 		return path | ||||
| 	} | ||||
| 	path = path + "/" + c | ||||
| 	d := req.PathParameter("d") | ||||
| 	if d == "" { | ||||
| 		return path | ||||
| 	} | ||||
| 	path = path + "/" + d | ||||
| 	e := req.PathParameter("e") | ||||
| 	if e == "" { | ||||
| 		return path | ||||
| 	} | ||||
| 	path = path + "/" + e | ||||
| 	f := req.PathParameter("f") | ||||
| 	if f == "" { | ||||
| 		return path | ||||
| 	} | ||||
| 	path = path + "/" + f | ||||
| 	g := req.PathParameter("g") | ||||
| 	if g == "" { | ||||
| 		return path | ||||
| 	} | ||||
| 	return path + "/" + g | ||||
| } | ||||
| 
 | ||||
| func asFormat(dataType string, dataFormat string) string { | ||||
| 	if dataFormat != "" { | ||||
| 		return dataFormat | ||||
| 	} | ||||
| 	return "" // TODO
 | ||||
| } | ||||
| 
 | ||||
| func asParamType(kind int) string { | ||||
| 	switch { | ||||
| 	case kind == restful.PathParameterKind: | ||||
| 		return "path" | ||||
| 	case kind == restful.QueryParameterKind: | ||||
| 		return "query" | ||||
| 	case kind == restful.BodyParameterKind: | ||||
| 		return "body" | ||||
| 	case kind == restful.HeaderParameterKind: | ||||
| 		return "header" | ||||
| 	case kind == restful.FormParameterKind: | ||||
| 		return "form" | ||||
| 	} | ||||
| 	return "" | ||||
| } | ||||
| 
 | ||||
| func asDataType(any interface{}, config *Config) (*string, *Item) { | ||||
| 	// If it's not a collection, return the suggested model name
 | ||||
| 	st := reflect.TypeOf(any) | ||||
| 	isCollection, st := detectCollectionType(st) | ||||
| 	modelName := modelBuilder{}.keyFrom(st) | ||||
| 	// if it's not a collection we are done
 | ||||
| 	if !isCollection { | ||||
| 		return &modelName, nil | ||||
| 	} | ||||
| 
 | ||||
| 	// XXX: This is not very elegant
 | ||||
| 	// We create an Item object referring to the given model
 | ||||
| 	models := ModelList{} | ||||
| 	mb := modelBuilder{Models: &models, Config: config} | ||||
| 	mb.addModelFrom(any) | ||||
| 
 | ||||
| 	elemTypeName := mb.getElementTypeName(modelName, "", st) | ||||
| 	item := new(Item) | ||||
| 	if mb.isPrimitiveType(elemTypeName) { | ||||
| 		mapped := mb.jsonSchemaType(elemTypeName) | ||||
| 		item.Type = &mapped | ||||
| 	} else { | ||||
| 		item.Ref = &elemTypeName | ||||
| 	} | ||||
| 	tmp := "array" | ||||
| 	return &tmp, item | ||||
| } | ||||
|  | @ -1,5 +0,0 @@ | |||
| package test_package | ||||
| 
 | ||||
| type TestStruct struct { | ||||
| 	TestField string | ||||
| } | ||||
|  | @ -1,86 +0,0 @@ | |||
| package swagger | ||||
| 
 | ||||
| import ( | ||||
| 	"bytes" | ||||
| 	"encoding/json" | ||||
| 	"fmt" | ||||
| 	"reflect" | ||||
| 	"strings" | ||||
| 	"testing" | ||||
| ) | ||||
| 
 | ||||
| func testJsonFromStructWithConfig(t *testing.T, sample interface{}, expectedJson string, config *Config) bool { | ||||
| 	m := modelsFromStructWithConfig(sample, config) | ||||
| 	data, _ := json.MarshalIndent(m, " ", " ") | ||||
| 	return compareJson(t, string(data), expectedJson) | ||||
| } | ||||
| 
 | ||||
| func modelsFromStructWithConfig(sample interface{}, config *Config) *ModelList { | ||||
| 	models := new(ModelList) | ||||
| 	builder := modelBuilder{Models: models, Config: config} | ||||
| 	builder.addModelFrom(sample) | ||||
| 	return models | ||||
| } | ||||
| 
 | ||||
| func testJsonFromStruct(t *testing.T, sample interface{}, expectedJson string) bool { | ||||
| 	return testJsonFromStructWithConfig(t, sample, expectedJson, &Config{}) | ||||
| } | ||||
| 
 | ||||
| func modelsFromStruct(sample interface{}) *ModelList { | ||||
| 	return modelsFromStructWithConfig(sample, &Config{}) | ||||
| } | ||||
| 
 | ||||
| func compareJson(t *testing.T, actualJsonAsString string, expectedJsonAsString string) bool { | ||||
| 	success := false | ||||
| 	var actualMap map[string]interface{} | ||||
| 	json.Unmarshal([]byte(actualJsonAsString), &actualMap) | ||||
| 	var expectedMap map[string]interface{} | ||||
| 	err := json.Unmarshal([]byte(expectedJsonAsString), &expectedMap) | ||||
| 	if err != nil { | ||||
| 		var actualArray []interface{} | ||||
| 		json.Unmarshal([]byte(actualJsonAsString), &actualArray) | ||||
| 		var expectedArray []interface{} | ||||
| 		err := json.Unmarshal([]byte(expectedJsonAsString), &expectedArray) | ||||
| 		success = reflect.DeepEqual(actualArray, expectedArray) | ||||
| 		if err != nil { | ||||
| 			t.Fatalf("Unparsable expected JSON: %s, actual: %v, expected: %v", err, actualJsonAsString, expectedJsonAsString) | ||||
| 		} | ||||
| 	} else { | ||||
| 		success = reflect.DeepEqual(actualMap, expectedMap) | ||||
| 	} | ||||
| 	if !success { | ||||
| 		t.Log("---- expected -----") | ||||
| 		t.Log(withLineNumbers(expectedJsonAsString)) | ||||
| 		t.Log("---- actual -----") | ||||
| 		t.Log(withLineNumbers(actualJsonAsString)) | ||||
| 		t.Log("---- raw -----") | ||||
| 		t.Log(actualJsonAsString) | ||||
| 		t.Error("there are differences") | ||||
| 		return false | ||||
| 	} | ||||
| 	return true | ||||
| } | ||||
| 
 | ||||
| func indexOfNonMatchingLine(actual, expected string) int { | ||||
| 	a := strings.Split(actual, "\n") | ||||
| 	e := strings.Split(expected, "\n") | ||||
| 	size := len(a) | ||||
| 	if len(e) < len(a) { | ||||
| 		size = len(e) | ||||
| 	} | ||||
| 	for i := 0; i < size; i++ { | ||||
| 		if a[i] != e[i] { | ||||
| 			return i | ||||
| 		} | ||||
| 	} | ||||
| 	return -1 | ||||
| } | ||||
| 
 | ||||
| func withLineNumbers(content string) string { | ||||
| 	var buffer bytes.Buffer | ||||
| 	lines := strings.Split(content, "\n") | ||||
| 	for i, each := range lines { | ||||
| 		buffer.WriteString(fmt.Sprintf("%d:%s\n", i, each)) | ||||
| 	} | ||||
| 	return buffer.String() | ||||
| } | ||||
|  | @ -1,6 +1,6 @@ | |||
| { | ||||
| 	"ImportPath": "k8s.io/api", | ||||
| 	"GoVersion": "go1.8", | ||||
| 	"GoVersion": "go1.9", | ||||
| 	"GodepVersion": "v79", | ||||
| 	"Packages": [ | ||||
| 		"./..." | ||||
|  | @ -140,87 +140,91 @@ | |||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/api/resource", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/conversion", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/fields", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/labels", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/runtime", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/selection", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/types", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/util/errors", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/util/intstr", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/util/json", | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/util/net", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/util/runtime", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/util/sets", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/util/validation", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/util/wait", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/pkg/watch", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", | ||||
| 			"Rev": "18a564baac720819100827c16fdebcadb05b2d0d" | ||||
| 			"Rev": "23bc0b9defba312e3b5938fa0d0581f3e882f862" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/kube-openapi/pkg/common", | ||||
| 			"Rev": "61b46af70dfed79c6d24530cd23b41440a7f22a5" | ||||
| 			"Rev": "39a7bf85c140f972372c2a0d1ee40adbf0c8bfe1" | ||||
| 		} | ||||
| 	] | ||||
| } | ||||
|  |  | |||
|  | @ -10,15 +10,15 @@ go_library( | |||
|         "types_swagger_doc_generated.go", | ||||
|         "zz_generated.deepcopy.go", | ||||
|     ], | ||||
|     importpath = "k8s.io/api/admission/v1alpha1", | ||||
|     importpath = "k8s.io/api/admission/v1beta1", | ||||
|     visibility = ["//visibility:public"], | ||||
|     deps = [ | ||||
|         "//vendor/github.com/gogo/protobuf/proto:go_default_library", | ||||
|         "//vendor/k8s.io/api/authentication/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/schema:go_default_library", | ||||
|         "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", | ||||
|     ], | ||||
| ) | ||||
| 
 | ||||
|  | @ -14,8 +14,8 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| // +k8s:deepcopy-gen=package,register
 | ||||
| // +k8s:deepcopy-gen=package
 | ||||
| // +k8s:openapi-gen=false
 | ||||
| 
 | ||||
| // +groupName=admission.k8s.io
 | ||||
| package v1alpha1 // import "k8s.io/api/admission/v1alpha1"
 | ||||
| package v1beta1 // import "k8s.io/api/admission/v1beta1"
 | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -19,7 +19,7 @@ limitations under the License. | |||
| 
 | ||||
| syntax = 'proto2'; | ||||
| 
 | ||||
| package k8s.io.api.admission.v1alpha1; | ||||
| package k8s.io.api.admission.v1beta1; | ||||
| 
 | ||||
| import "k8s.io/api/authentication/v1/generated.proto"; | ||||
| import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; | ||||
|  | @ -28,35 +28,29 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; | |||
| import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; | ||||
| 
 | ||||
| // Package-wide variables from generator "generated". | ||||
| option go_package = "v1alpha1"; | ||||
| option go_package = "v1beta1"; | ||||
| 
 | ||||
| // AdmissionReview describes an admission request. | ||||
| message AdmissionReview { | ||||
|   // Spec describes the attributes for the admission request. | ||||
|   // Since this admission controller is non-mutating the webhook should avoid setting this in its response to avoid the | ||||
|   // cost of deserializing it. | ||||
|   // +optional | ||||
|   optional AdmissionReviewSpec spec = 1; | ||||
| // AdmissionRequest describes the admission.Attributes for the admission request. | ||||
| message AdmissionRequest { | ||||
|   // UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are | ||||
|   // otherwise identical (parallel requests, requests when earlier requests did not modify etc) | ||||
|   // The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request. | ||||
|   // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging. | ||||
|   optional string uid = 1; | ||||
| 
 | ||||
|   // Status is filled in by the webhook and indicates whether the admission request should be permitted. | ||||
|   // +optional | ||||
|   optional AdmissionReviewStatus status = 2; | ||||
| } | ||||
| 
 | ||||
| // AdmissionReviewSpec describes the admission.Attributes for the admission request. | ||||
| message AdmissionReviewSpec { | ||||
|   // Kind is the type of object being manipulated.  For example: Pod | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind kind = 1; | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind kind = 2; | ||||
| 
 | ||||
|   // Object is the object from the incoming request prior to default values being applied | ||||
|   optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 2; | ||||
|   // Resource is the name of the resource being requested.  This is not the kind.  For example: pods | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource resource = 3; | ||||
| 
 | ||||
|   // OldObject is the existing object. Only populated for UPDATE requests. | ||||
|   // SubResource is the name of the subresource being requested.  This is a different resource, scoped to the parent | ||||
|   // resource, but it may have a different kind. For instance, /pods has the resource "pods" and the kind "Pod", while | ||||
|   // /pods/foo/status has the resource "pods", the sub resource "status", and the kind "Pod" (because status operates on | ||||
|   // pods). The binding resource for a pod though may be /pods/foo/binding, which has resource "pods", subresource | ||||
|   // "binding", and kind "Binding". | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.runtime.RawExtension oldObject = 3; | ||||
| 
 | ||||
|   // Operation is the operation being performed | ||||
|   optional string operation = 4; | ||||
|   optional string subResource = 4; | ||||
| 
 | ||||
|   // Name is the name of the object as presented in the request.  On a CREATE operation, the client may omit name and | ||||
|   // rely on the server to generate the name.  If that is the case, this method will return the empty string. | ||||
|  | @ -67,29 +61,52 @@ message AdmissionReviewSpec { | |||
|   // +optional | ||||
|   optional string namespace = 6; | ||||
| 
 | ||||
|   // Resource is the name of the resource being requested.  This is not the kind.  For example: pods | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource resource = 7; | ||||
| 
 | ||||
|   // SubResource is the name of the subresource being requested.  This is a different resource, scoped to the parent | ||||
|   // resource, but it may have a different kind. For instance, /pods has the resource "pods" and the kind "Pod", while | ||||
|   // /pods/foo/status has the resource "pods", the sub resource "status", and the kind "Pod" (because status operates on | ||||
|   // pods). The binding resource for a pod though may be /pods/foo/binding, which has resource "pods", subresource | ||||
|   // "binding", and kind "Binding". | ||||
|   // +optional | ||||
|   optional string subResource = 8; | ||||
|   // Operation is the operation being performed | ||||
|   optional string operation = 7; | ||||
| 
 | ||||
|   // UserInfo is information about the requesting user | ||||
|   optional k8s.io.api.authentication.v1.UserInfo userInfo = 9; | ||||
|   optional k8s.io.api.authentication.v1.UserInfo userInfo = 8; | ||||
| 
 | ||||
|   // Object is the object from the incoming request prior to default values being applied | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 9; | ||||
| 
 | ||||
|   // OldObject is the existing object. Only populated for UPDATE requests. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.runtime.RawExtension oldObject = 10; | ||||
| } | ||||
| 
 | ||||
| // AdmissionReviewStatus describes the status of the admission request. | ||||
| message AdmissionReviewStatus { | ||||
| // AdmissionResponse describes an admission response. | ||||
| message AdmissionResponse { | ||||
|   // UID is an identifier for the individual request/response. | ||||
|   // This should be copied over from the corresponding AdmissionRequest. | ||||
|   optional string uid = 1; | ||||
| 
 | ||||
|   // Allowed indicates whether or not the admission request was permitted. | ||||
|   optional bool allowed = 1; | ||||
|   optional bool allowed = 2; | ||||
| 
 | ||||
|   // Result contains extra details into why an admission request was denied. | ||||
|   // This field IS NOT consulted in any way if "Allowed" is "true". | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 2; | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3; | ||||
| 
 | ||||
|   // The patch body. Currently we only support "JSONPatch" which implements RFC 6902. | ||||
|   // +optional | ||||
|   optional bytes patch = 4; | ||||
| 
 | ||||
|   // The type of Patch. Currently we only allow "JSONPatch". | ||||
|   // +optional | ||||
|   optional string patchType = 5; | ||||
| } | ||||
| 
 | ||||
| // AdmissionReview describes an admission review request/response. | ||||
| message AdmissionReview { | ||||
|   // Request describes the attributes for the admission request. | ||||
|   // +optional | ||||
|   optional AdmissionRequest request = 1; | ||||
| 
 | ||||
|   // Response describes the attributes for the admission response. | ||||
|   // +optional | ||||
|   optional AdmissionResponse response = 2; | ||||
| } | ||||
| 
 | ||||
|  | @ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| package v1alpha1 | ||||
| package v1beta1 | ||||
| 
 | ||||
| import ( | ||||
| 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
|  | @ -26,7 +26,7 @@ import ( | |||
| const GroupName = "admission.k8s.io" | ||||
| 
 | ||||
| // SchemeGroupVersion is group version used to register these objects
 | ||||
| var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} | ||||
| var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} | ||||
| 
 | ||||
| // Resource takes an unqualified resource and returns a Group qualified GroupResource
 | ||||
| func Resource(resource string) schema.GroupResource { | ||||
|  | @ -41,7 +41,7 @@ var ( | |||
| 	AddToScheme        = localSchemeBuilder.AddToScheme | ||||
| ) | ||||
| 
 | ||||
| // Adds the list of known types to api.Scheme.
 | ||||
| // Adds the list of known types to the given scheme.
 | ||||
| func addKnownTypes(scheme *runtime.Scheme) error { | ||||
| 	scheme.AddKnownTypes(SchemeGroupVersion, | ||||
| 		&AdmissionReview{}, | ||||
|  | @ -14,40 +14,46 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| package v1alpha1 | ||||
| package v1beta1 | ||||
| 
 | ||||
| import ( | ||||
| 	authenticationv1 "k8s.io/api/authentication/v1" | ||||
| 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
| 	"k8s.io/apimachinery/pkg/runtime" | ||||
| 	"k8s.io/apimachinery/pkg/types" | ||||
| ) | ||||
| 
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // AdmissionReview describes an admission request.
 | ||||
| // AdmissionReview describes an admission review request/response.
 | ||||
| type AdmissionReview struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// Spec describes the attributes for the admission request.
 | ||||
| 	// Since this admission controller is non-mutating the webhook should avoid setting this in its response to avoid the
 | ||||
| 	// cost of deserializing it.
 | ||||
| 	// Request describes the attributes for the admission request.
 | ||||
| 	// +optional
 | ||||
| 	Spec AdmissionReviewSpec `json:"spec,omitempty" protobuf:"bytes,1,opt,name=spec"` | ||||
| 	// Status is filled in by the webhook and indicates whether the admission request should be permitted.
 | ||||
| 	Request *AdmissionRequest `json:"request,omitempty" protobuf:"bytes,1,opt,name=request"` | ||||
| 	// Response describes the attributes for the admission response.
 | ||||
| 	// +optional
 | ||||
| 	Status AdmissionReviewStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` | ||||
| 	Response *AdmissionResponse `json:"response,omitempty" protobuf:"bytes,2,opt,name=response"` | ||||
| } | ||||
| 
 | ||||
| // AdmissionReviewSpec describes the admission.Attributes for the admission request.
 | ||||
| type AdmissionReviewSpec struct { | ||||
| // AdmissionRequest describes the admission.Attributes for the admission request.
 | ||||
| type AdmissionRequest struct { | ||||
| 	// UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
 | ||||
| 	// otherwise identical (parallel requests, requests when earlier requests did not modify etc)
 | ||||
| 	// The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
 | ||||
| 	// It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
 | ||||
| 	UID types.UID `json:"uid" protobuf:"bytes,1,opt,name=uid"` | ||||
| 	// Kind is the type of object being manipulated.  For example: Pod
 | ||||
| 	Kind metav1.GroupVersionKind `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` | ||||
| 	// Object is the object from the incoming request prior to default values being applied
 | ||||
| 	Object runtime.RawExtension `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"` | ||||
| 	// OldObject is the existing object. Only populated for UPDATE requests.
 | ||||
| 	Kind metav1.GroupVersionKind `json:"kind" protobuf:"bytes,2,opt,name=kind"` | ||||
| 	// Resource is the name of the resource being requested.  This is not the kind.  For example: pods
 | ||||
| 	Resource metav1.GroupVersionResource `json:"resource" protobuf:"bytes,3,opt,name=resource"` | ||||
| 	// SubResource is the name of the subresource being requested.  This is a different resource, scoped to the parent
 | ||||
| 	// resource, but it may have a different kind. For instance, /pods has the resource "pods" and the kind "Pod", while
 | ||||
| 	// /pods/foo/status has the resource "pods", the sub resource "status", and the kind "Pod" (because status operates on
 | ||||
| 	// pods). The binding resource for a pod though may be /pods/foo/binding, which has resource "pods", subresource
 | ||||
| 	// "binding", and kind "Binding".
 | ||||
| 	// +optional
 | ||||
| 	OldObject runtime.RawExtension `json:"oldObject,omitempty" protobuf:"bytes,3,opt,name=oldObject"` | ||||
| 	// Operation is the operation being performed
 | ||||
| 	Operation Operation `json:"operation,omitempty" protobuf:"bytes,4,opt,name=operation"` | ||||
| 	SubResource string `json:"subResource,omitempty" protobuf:"bytes,4,opt,name=subResource"` | ||||
| 	// Name is the name of the object as presented in the request.  On a CREATE operation, the client may omit name and
 | ||||
| 	// rely on the server to generate the name.  If that is the case, this method will return the empty string.
 | ||||
| 	// +optional
 | ||||
|  | @ -55,29 +61,49 @@ type AdmissionReviewSpec struct { | |||
| 	// Namespace is the namespace associated with the request (if any).
 | ||||
| 	// +optional
 | ||||
| 	Namespace string `json:"namespace,omitempty" protobuf:"bytes,6,opt,name=namespace"` | ||||
| 	// Resource is the name of the resource being requested.  This is not the kind.  For example: pods
 | ||||
| 	Resource metav1.GroupVersionResource `json:"resource,omitempty" protobuf:"bytes,7,opt,name=resource"` | ||||
| 	// SubResource is the name of the subresource being requested.  This is a different resource, scoped to the parent
 | ||||
| 	// resource, but it may have a different kind. For instance, /pods has the resource "pods" and the kind "Pod", while
 | ||||
| 	// /pods/foo/status has the resource "pods", the sub resource "status", and the kind "Pod" (because status operates on
 | ||||
| 	// pods). The binding resource for a pod though may be /pods/foo/binding, which has resource "pods", subresource
 | ||||
| 	// "binding", and kind "Binding".
 | ||||
| 	// +optional
 | ||||
| 	SubResource string `json:"subResource,omitempty" protobuf:"bytes,8,opt,name=subResource"` | ||||
| 	// Operation is the operation being performed
 | ||||
| 	Operation Operation `json:"operation" protobuf:"bytes,7,opt,name=operation"` | ||||
| 	// UserInfo is information about the requesting user
 | ||||
| 	UserInfo authenticationv1.UserInfo `json:"userInfo,omitempty" protobuf:"bytes,9,opt,name=userInfo"` | ||||
| 	UserInfo authenticationv1.UserInfo `json:"userInfo" protobuf:"bytes,8,opt,name=userInfo"` | ||||
| 	// Object is the object from the incoming request prior to default values being applied
 | ||||
| 	// +optional
 | ||||
| 	Object runtime.RawExtension `json:"object,omitempty" protobuf:"bytes,9,opt,name=object"` | ||||
| 	// OldObject is the existing object. Only populated for UPDATE requests.
 | ||||
| 	// +optional
 | ||||
| 	OldObject runtime.RawExtension `json:"oldObject,omitempty" protobuf:"bytes,10,opt,name=oldObject"` | ||||
| } | ||||
| 
 | ||||
| // AdmissionReviewStatus describes the status of the admission request.
 | ||||
| type AdmissionReviewStatus struct { | ||||
| // AdmissionResponse describes an admission response.
 | ||||
| type AdmissionResponse struct { | ||||
| 	// UID is an identifier for the individual request/response.
 | ||||
| 	// This should be copied over from the corresponding AdmissionRequest.
 | ||||
| 	UID types.UID `json:"uid" protobuf:"bytes,1,opt,name=uid"` | ||||
| 
 | ||||
| 	// Allowed indicates whether or not the admission request was permitted.
 | ||||
| 	Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"` | ||||
| 	Allowed bool `json:"allowed" protobuf:"varint,2,opt,name=allowed"` | ||||
| 
 | ||||
| 	// Result contains extra details into why an admission request was denied.
 | ||||
| 	// This field IS NOT consulted in any way if "Allowed" is "true".
 | ||||
| 	// +optional
 | ||||
| 	Result *metav1.Status `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` | ||||
| 	Result *metav1.Status `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` | ||||
| 
 | ||||
| 	// The patch body. Currently we only support "JSONPatch" which implements RFC 6902.
 | ||||
| 	// +optional
 | ||||
| 	Patch []byte `json:"patch,omitempty" protobuf:"bytes,4,opt,name=patch"` | ||||
| 
 | ||||
| 	// The type of Patch. Currently we only allow "JSONPatch".
 | ||||
| 	// +optional
 | ||||
| 	PatchType *PatchType `json:"patchType,omitempty" protobuf:"bytes,5,opt,name=patchType"` | ||||
| } | ||||
| 
 | ||||
| // PatchType is the type of patch being used to represent the mutated object
 | ||||
| type PatchType string | ||||
| 
 | ||||
| // PatchType constants.
 | ||||
| const ( | ||||
| 	PatchTypeJSONPatch PatchType = "JSONPatch" | ||||
| ) | ||||
| 
 | ||||
| // Operation is the type of resource operation being checked for admission control
 | ||||
| type Operation string | ||||
| 
 | ||||
|  | @ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| package v1alpha1 | ||||
| package v1beta1 | ||||
| 
 | ||||
| // This file contains a collection of methods that can be used from go-restful to
 | ||||
| // generate Swagger API documentation for its models. Please read this PR for more
 | ||||
|  | @ -27,41 +27,45 @@ package v1alpha1 | |||
| // Those methods can be generated by using hack/update-generated-swagger-docs.sh
 | ||||
| 
 | ||||
| // AUTO-GENERATED FUNCTIONS START HERE
 | ||||
| var map_AdmissionRequest = map[string]string{ | ||||
| 	"":            "AdmissionRequest describes the admission.Attributes for the admission request.", | ||||
| 	"uid":         "UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are otherwise identical (parallel requests, requests when earlier requests did not modify etc) The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.", | ||||
| 	"kind":        "Kind is the type of object being manipulated.  For example: Pod", | ||||
| 	"resource":    "Resource is the name of the resource being requested.  This is not the kind.  For example: pods", | ||||
| 	"subResource": "SubResource is the name of the subresource being requested.  This is a different resource, scoped to the parent resource, but it may have a different kind. For instance, /pods has the resource \"pods\" and the kind \"Pod\", while /pods/foo/status has the resource \"pods\", the sub resource \"status\", and the kind \"Pod\" (because status operates on pods). The binding resource for a pod though may be /pods/foo/binding, which has resource \"pods\", subresource \"binding\", and kind \"Binding\".", | ||||
| 	"name":        "Name is the name of the object as presented in the request.  On a CREATE operation, the client may omit name and rely on the server to generate the name.  If that is the case, this method will return the empty string.", | ||||
| 	"namespace":   "Namespace is the namespace associated with the request (if any).", | ||||
| 	"operation":   "Operation is the operation being performed", | ||||
| 	"userInfo":    "UserInfo is information about the requesting user", | ||||
| 	"object":      "Object is the object from the incoming request prior to default values being applied", | ||||
| 	"oldObject":   "OldObject is the existing object. Only populated for UPDATE requests.", | ||||
| } | ||||
| 
 | ||||
| func (AdmissionRequest) SwaggerDoc() map[string]string { | ||||
| 	return map_AdmissionRequest | ||||
| } | ||||
| 
 | ||||
| var map_AdmissionResponse = map[string]string{ | ||||
| 	"":          "AdmissionResponse describes an admission response.", | ||||
| 	"uid":       "UID is an identifier for the individual request/response. This should be copied over from the corresponding AdmissionRequest.", | ||||
| 	"allowed":   "Allowed indicates whether or not the admission request was permitted.", | ||||
| 	"status":    "Result contains extra details into why an admission request was denied. This field IS NOT consulted in any way if \"Allowed\" is \"true\".", | ||||
| 	"patch":     "The patch body. Currently we only support \"JSONPatch\" which implements RFC 6902.", | ||||
| 	"patchType": "The type of Patch. Currently we only allow \"JSONPatch\".", | ||||
| } | ||||
| 
 | ||||
| func (AdmissionResponse) SwaggerDoc() map[string]string { | ||||
| 	return map_AdmissionResponse | ||||
| } | ||||
| 
 | ||||
| var map_AdmissionReview = map[string]string{ | ||||
| 	"":       "AdmissionReview describes an admission request.", | ||||
| 	"spec":   "Spec describes the attributes for the admission request. Since this admission controller is non-mutating the webhook should avoid setting this in its response to avoid the cost of deserializing it.", | ||||
| 	"status": "Status is filled in by the webhook and indicates whether the admission request should be permitted.", | ||||
| 	"":         "AdmissionReview describes an admission review request/response.", | ||||
| 	"request":  "Request describes the attributes for the admission request.", | ||||
| 	"response": "Response describes the attributes for the admission response.", | ||||
| } | ||||
| 
 | ||||
| func (AdmissionReview) SwaggerDoc() map[string]string { | ||||
| 	return map_AdmissionReview | ||||
| } | ||||
| 
 | ||||
| var map_AdmissionReviewSpec = map[string]string{ | ||||
| 	"":            "AdmissionReviewSpec describes the admission.Attributes for the admission request.", | ||||
| 	"kind":        "Kind is the type of object being manipulated.  For example: Pod", | ||||
| 	"object":      "Object is the object from the incoming request prior to default values being applied", | ||||
| 	"oldObject":   "OldObject is the existing object. Only populated for UPDATE requests.", | ||||
| 	"operation":   "Operation is the operation being performed", | ||||
| 	"name":        "Name is the name of the object as presented in the request.  On a CREATE operation, the client may omit name and rely on the server to generate the name.  If that is the case, this method will return the empty string.", | ||||
| 	"namespace":   "Namespace is the namespace associated with the request (if any).", | ||||
| 	"resource":    "Resource is the name of the resource being requested.  This is not the kind.  For example: pods", | ||||
| 	"subResource": "SubResource is the name of the subresource being requested.  This is a different resource, scoped to the parent resource, but it may have a different kind. For instance, /pods has the resource \"pods\" and the kind \"Pod\", while /pods/foo/status has the resource \"pods\", the sub resource \"status\", and the kind \"Pod\" (because status operates on pods). The binding resource for a pod though may be /pods/foo/binding, which has resource \"pods\", subresource \"binding\", and kind \"Binding\".", | ||||
| 	"userInfo":    "UserInfo is information about the requesting user", | ||||
| } | ||||
| 
 | ||||
| func (AdmissionReviewSpec) SwaggerDoc() map[string]string { | ||||
| 	return map_AdmissionReviewSpec | ||||
| } | ||||
| 
 | ||||
| var map_AdmissionReviewStatus = map[string]string{ | ||||
| 	"":        "AdmissionReviewStatus describes the status of the admission request.", | ||||
| 	"allowed": "Allowed indicates whether or not the admission request was permitted.", | ||||
| 	"status":  "Result contains extra details into why an admission request was denied. This field IS NOT consulted in any way if \"Allowed\" is \"true\".", | ||||
| } | ||||
| 
 | ||||
| func (AdmissionReviewStatus) SwaggerDoc() map[string]string { | ||||
| 	return map_AdmissionReviewStatus | ||||
| } | ||||
| 
 | ||||
| // AUTO-GENERATED FUNCTIONS END HERE
 | ||||
|  | @ -18,46 +18,95 @@ limitations under the License. | |||
| 
 | ||||
| // This file was autogenerated by deepcopy-gen. Do not edit it manually!
 | ||||
| 
 | ||||
| package v1alpha1 | ||||
| package v1beta1 | ||||
| 
 | ||||
| import ( | ||||
| 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
| 	conversion "k8s.io/apimachinery/pkg/conversion" | ||||
| 	runtime "k8s.io/apimachinery/pkg/runtime" | ||||
| 	reflect "reflect" | ||||
| ) | ||||
| 
 | ||||
| func init() { | ||||
| 	SchemeBuilder.Register(RegisterDeepCopies) | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *AdmissionRequest) DeepCopyInto(out *AdmissionRequest) { | ||||
| 	*out = *in | ||||
| 	out.Kind = in.Kind | ||||
| 	out.Resource = in.Resource | ||||
| 	in.UserInfo.DeepCopyInto(&out.UserInfo) | ||||
| 	in.Object.DeepCopyInto(&out.Object) | ||||
| 	in.OldObject.DeepCopyInto(&out.OldObject) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
 | ||||
| // to allow building arbitrary schemes.
 | ||||
| //
 | ||||
| // Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
 | ||||
| func RegisterDeepCopies(scheme *runtime.Scheme) error { | ||||
| 	return scheme.AddGeneratedDeepCopyFuncs( | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*AdmissionReview).DeepCopyInto(out.(*AdmissionReview)) | ||||
| 			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 is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionRequest.
 | ||||
| func (in *AdmissionRequest) DeepCopy() *AdmissionRequest { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(AdmissionRequest) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *AdmissionResponse) DeepCopyInto(out *AdmissionResponse) { | ||||
| 	*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) | ||||
| 		} | ||||
| 	} | ||||
| 	if in.Patch != nil { | ||||
| 		in, out := &in.Patch, &out.Patch | ||||
| 		*out = make([]byte, len(*in)) | ||||
| 		copy(*out, *in) | ||||
| 	} | ||||
| 	if in.PatchType != nil { | ||||
| 		in, out := &in.PatchType, &out.PatchType | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(PatchType) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionResponse.
 | ||||
| func (in *AdmissionResponse) DeepCopy() *AdmissionResponse { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(AdmissionResponse) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *AdmissionReview) DeepCopyInto(out *AdmissionReview) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	in.Spec.DeepCopyInto(&out.Spec) | ||||
| 	in.Status.DeepCopyInto(&out.Status) | ||||
| 	if in.Request != nil { | ||||
| 		in, out := &in.Request, &out.Request | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(AdmissionRequest) | ||||
| 			(*in).DeepCopyInto(*out) | ||||
| 		} | ||||
| 	} | ||||
| 	if in.Response != nil { | ||||
| 		in, out := &in.Response, &out.Response | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(AdmissionResponse) | ||||
| 			(*in).DeepCopyInto(*out) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
|  | @ -79,49 +128,3 @@ func (in *AdmissionReview) DeepCopyObject() runtime.Object { | |||
| 		return nil | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *AdmissionReviewSpec) DeepCopyInto(out *AdmissionReviewSpec) { | ||||
| 	*out = *in | ||||
| 	out.Kind = in.Kind | ||||
| 	in.Object.DeepCopyInto(&out.Object) | ||||
| 	in.OldObject.DeepCopyInto(&out.OldObject) | ||||
| 	out.Resource = in.Resource | ||||
| 	in.UserInfo.DeepCopyInto(&out.UserInfo) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionReviewSpec.
 | ||||
| func (in *AdmissionReviewSpec) DeepCopy() *AdmissionReviewSpec { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(AdmissionReviewSpec) | ||||
| 	in.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 | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionReviewStatus.
 | ||||
| func (in *AdmissionReviewStatus) DeepCopy() *AdmissionReviewStatus { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(AdmissionReviewStatus) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
|  | @ -19,7 +19,6 @@ go_library( | |||
|     deps = [ | ||||
|         "//vendor/github.com/gogo/protobuf/proto: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/schema:go_default_library", | ||||
|     ], | ||||
|  |  | |||
|  | @ -14,12 +14,12 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| // +k8s:deepcopy-gen=package,register
 | ||||
| // +k8s:deepcopy-gen=package
 | ||||
| // +k8s:openapi-gen=true
 | ||||
| 
 | ||||
| // Package v1alpha1 is the v1alpha1 version of the API.
 | ||||
| // AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration
 | ||||
| // InitializerConfiguration and ExternalAdmissionHookConfiguration is for the
 | ||||
| // InitializerConfiguration and validatingWebhookConfiguration is for the
 | ||||
| // new dynamic admission controller configuration.
 | ||||
| // +groupName=admissionregistration.k8s.io
 | ||||
| package v1alpha1 // import "k8s.io/api/admissionregistration/v1alpha1"
 | ||||
|  |  | |||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -29,72 +29,6 @@ import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; | |||
| // Package-wide variables from generator "generated". | ||||
| option go_package = "v1alpha1"; | ||||
| 
 | ||||
| // AdmissionHookClientConfig contains the information to make a TLS | ||||
| // connection with the webhook | ||||
| message AdmissionHookClientConfig { | ||||
|   // Service is a reference to the service for this webhook. If there is only | ||||
|   // one port open for the service, that port will be used. If there are multiple | ||||
|   // ports open, port 443 will be used if it is open, otherwise it is an error. | ||||
|   // Required | ||||
|   optional ServiceReference service = 1; | ||||
| 
 | ||||
|   // URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object. | ||||
|   optional string urlPath = 3; | ||||
| 
 | ||||
|   // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. | ||||
|   // Required | ||||
|   optional bytes caBundle = 2; | ||||
| } | ||||
| 
 | ||||
| // ExternalAdmissionHook describes an external admission webhook and the | ||||
| // resources and operations it applies to. | ||||
| message ExternalAdmissionHook { | ||||
|   // The name of the external admission webhook. | ||||
|   // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where | ||||
|   // "imagepolicy" is the name of the webhook, and kubernetes.io is the name | ||||
|   // of the organization. | ||||
|   // Required. | ||||
|   optional string name = 1; | ||||
| 
 | ||||
|   // ClientConfig defines how to communicate with the hook. | ||||
|   // Required | ||||
|   optional AdmissionHookClientConfig clientConfig = 2; | ||||
| 
 | ||||
|   // Rules describes what operations on what resources/subresources the webhook cares about. | ||||
|   // The webhook cares about an operation if it matches _any_ Rule. | ||||
|   repeated RuleWithOperations rules = 3; | ||||
| 
 | ||||
|   // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - | ||||
|   // allowed values are Ignore or Fail. Defaults to Ignore. | ||||
|   // +optional | ||||
|   optional string failurePolicy = 4; | ||||
| } | ||||
| 
 | ||||
| // ExternalAdmissionHookConfiguration describes the configuration of initializers. | ||||
| message ExternalAdmissionHookConfiguration { | ||||
|   // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; | ||||
| 
 | ||||
|   // ExternalAdmissionHooks is a list of external admission webhooks and the | ||||
|   // affected resources and operations. | ||||
|   // +optional | ||||
|   // +patchMergeKey=name | ||||
|   // +patchStrategy=merge | ||||
|   repeated ExternalAdmissionHook externalAdmissionHooks = 2; | ||||
| } | ||||
| 
 | ||||
| // ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration. | ||||
| message ExternalAdmissionHookConfigurationList { | ||||
|   // Standard list metadata. | ||||
|   // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; | ||||
| 
 | ||||
|   // List of ExternalAdmissionHookConfiguration. | ||||
|   repeated ExternalAdmissionHookConfiguration items = 2; | ||||
| } | ||||
| 
 | ||||
| // Initializer describes the name and the failure policy of an initializer, and | ||||
| // what resources it applies to. | ||||
| message Initializer { | ||||
|  | @ -172,28 +106,3 @@ message Rule { | |||
|   repeated string resources = 3; | ||||
| } | ||||
| 
 | ||||
| // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make | ||||
| // sure that all the tuple expansions are valid. | ||||
| message RuleWithOperations { | ||||
|   // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * | ||||
|   // for all operations. | ||||
|   // If '*' is present, the length of the slice must be one. | ||||
|   // Required. | ||||
|   repeated string operations = 1; | ||||
| 
 | ||||
|   // Rule is embedded, it describes other criteria of the rule, like | ||||
|   // APIGroups, APIVersions, Resources, etc. | ||||
|   optional Rule rule = 2; | ||||
| } | ||||
| 
 | ||||
| // ServiceReference holds a reference to Service.legacy.k8s.io | ||||
| message ServiceReference { | ||||
|   // Namespace is the namespace of the service | ||||
|   // Required | ||||
|   optional string namespace = 1; | ||||
| 
 | ||||
|   // Name is the name of the service | ||||
|   // Required | ||||
|   optional string name = 2; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -45,8 +45,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { | |||
| 	scheme.AddKnownTypes(SchemeGroupVersion, | ||||
| 		&InitializerConfiguration{}, | ||||
| 		&InitializerConfigurationList{}, | ||||
| 		&ExternalAdmissionHookConfiguration{}, | ||||
| 		&ExternalAdmissionHookConfigurationList{}, | ||||
| 	) | ||||
| 	metav1.AddToGroupVersion(scheme, SchemeGroupVersion) | ||||
| 	return nil | ||||
|  |  | |||
|  | @ -104,120 +104,3 @@ type Rule struct { | |||
| 	// Required.
 | ||||
| 	Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"` | ||||
| } | ||||
| 
 | ||||
| type FailurePolicyType string | ||||
| 
 | ||||
| const ( | ||||
| 	// Ignore means the initializer is removed from the initializers list of an
 | ||||
| 	// object if the initializer is timed out.
 | ||||
| 	Ignore FailurePolicyType = "Ignore" | ||||
| 	// For 1.7, only "Ignore" is allowed. "Fail" will be allowed when the
 | ||||
| 	// extensible admission feature is beta.
 | ||||
| 	Fail FailurePolicyType = "Fail" | ||||
| ) | ||||
| 
 | ||||
| // +genclient
 | ||||
| // +genclient:nonNamespaced
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // ExternalAdmissionHookConfiguration describes the configuration of initializers.
 | ||||
| type ExternalAdmissionHookConfiguration struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
 | ||||
| 	// +optional
 | ||||
| 	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 	// ExternalAdmissionHooks is a list of external admission webhooks and the
 | ||||
| 	// affected resources and operations.
 | ||||
| 	// +optional
 | ||||
| 	// +patchMergeKey=name
 | ||||
| 	// +patchStrategy=merge
 | ||||
| 	ExternalAdmissionHooks []ExternalAdmissionHook `json:"externalAdmissionHooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=externalAdmissionHooks"` | ||||
| } | ||||
| 
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.
 | ||||
| type ExternalAdmissionHookConfigurationList struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// Standard list metadata.
 | ||||
| 	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
 | ||||
| 	// +optional
 | ||||
| 	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 	// List of ExternalAdmissionHookConfiguration.
 | ||||
| 	Items []ExternalAdmissionHookConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"` | ||||
| } | ||||
| 
 | ||||
| // ExternalAdmissionHook describes an external admission webhook and the
 | ||||
| // resources and operations it applies to.
 | ||||
| type ExternalAdmissionHook struct { | ||||
| 	// The name of the external admission webhook.
 | ||||
| 	// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
 | ||||
| 	// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
 | ||||
| 	// of the organization.
 | ||||
| 	// Required.
 | ||||
| 	Name string `json:"name" protobuf:"bytes,1,opt,name=name"` | ||||
| 
 | ||||
| 	// ClientConfig defines how to communicate with the hook.
 | ||||
| 	// Required
 | ||||
| 	ClientConfig AdmissionHookClientConfig `json:"clientConfig" protobuf:"bytes,2,opt,name=clientConfig"` | ||||
| 
 | ||||
| 	// Rules describes what operations on what resources/subresources the webhook cares about.
 | ||||
| 	// The webhook cares about an operation if it matches _any_ Rule.
 | ||||
| 	Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` | ||||
| 
 | ||||
| 	// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
 | ||||
| 	// allowed values are Ignore or Fail. Defaults to Ignore.
 | ||||
| 	// +optional
 | ||||
| 	FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,4,opt,name=failurePolicy,casttype=FailurePolicyType"` | ||||
| } | ||||
| 
 | ||||
| // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
 | ||||
| // sure that all the tuple expansions are valid.
 | ||||
| type RuleWithOperations struct { | ||||
| 	// Operations is the operations the admission hook cares about - CREATE, UPDATE, or *
 | ||||
| 	// for all operations.
 | ||||
| 	// If '*' is present, the length of the slice must be one.
 | ||||
| 	// Required.
 | ||||
| 	Operations []OperationType `json:"operations,omitempty" protobuf:"bytes,1,rep,name=operations,casttype=OperationType"` | ||||
| 	// Rule is embedded, it describes other criteria of the rule, like
 | ||||
| 	// APIGroups, APIVersions, Resources, etc.
 | ||||
| 	Rule `json:",inline" protobuf:"bytes,2,opt,name=rule"` | ||||
| } | ||||
| 
 | ||||
| type OperationType string | ||||
| 
 | ||||
| // The constants should be kept in sync with those defined in k8s.io/kubernetes/pkg/admission/interface.go.
 | ||||
| const ( | ||||
| 	OperationAll OperationType = "*" | ||||
| 	Create       OperationType = "CREATE" | ||||
| 	Update       OperationType = "UPDATE" | ||||
| 	Delete       OperationType = "DELETE" | ||||
| 	Connect      OperationType = "CONNECT" | ||||
| ) | ||||
| 
 | ||||
| // AdmissionHookClientConfig contains the information to make a TLS
 | ||||
| // connection with the webhook
 | ||||
| type AdmissionHookClientConfig struct { | ||||
| 	// Service is a reference to the service for this webhook. If there is only
 | ||||
| 	// one port open for the service, that port will be used. If there are multiple
 | ||||
| 	// ports open, port 443 will be used if it is open, otherwise it is an error.
 | ||||
| 	// Required
 | ||||
| 	Service ServiceReference `json:"service" protobuf:"bytes,1,opt,name=service"` | ||||
| 
 | ||||
| 	// URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object.
 | ||||
| 	URLPath string `json:"urlPath" protobuf:"bytes,3,opt,name=urlPath"` | ||||
| 
 | ||||
| 	// CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate.
 | ||||
| 	// Required
 | ||||
| 	CABundle []byte `json:"caBundle" protobuf:"bytes,2,opt,name=caBundle"` | ||||
| } | ||||
| 
 | ||||
| // ServiceReference holds a reference to Service.legacy.k8s.io
 | ||||
| type ServiceReference struct { | ||||
| 	// Namespace is the namespace of the service
 | ||||
| 	// Required
 | ||||
| 	Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` | ||||
| 	// Name is the name of the service
 | ||||
| 	// Required
 | ||||
| 	Name string `json:"name" protobuf:"bytes,2,opt,name=name"` | ||||
| } | ||||
|  |  | |||
							
								
								
									
										62
									
								
								vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go
								
								
									generated
								
								
									vendored
								
								
							
							
						
						
									
										62
									
								
								vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go
								
								
									generated
								
								
									vendored
								
								
							|  | @ -27,49 +27,6 @@ package v1alpha1 | |||
| // Those methods can be generated by using hack/update-generated-swagger-docs.sh
 | ||||
| 
 | ||||
| // AUTO-GENERATED FUNCTIONS START HERE
 | ||||
| var map_AdmissionHookClientConfig = map[string]string{ | ||||
| 	"":         "AdmissionHookClientConfig contains the information to make a TLS connection with the webhook", | ||||
| 	"service":  "Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required", | ||||
| 	"urlPath":  "URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object.", | ||||
| 	"caBundle": "CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required", | ||||
| } | ||||
| 
 | ||||
| func (AdmissionHookClientConfig) SwaggerDoc() map[string]string { | ||||
| 	return map_AdmissionHookClientConfig | ||||
| } | ||||
| 
 | ||||
| var map_ExternalAdmissionHook = map[string]string{ | ||||
| 	"":              "ExternalAdmissionHook describes an external admission webhook and the resources and operations it applies to.", | ||||
| 	"name":          "The name of the external admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", | ||||
| 	"clientConfig":  "ClientConfig defines how to communicate with the hook. Required", | ||||
| 	"rules":         "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule.", | ||||
| 	"failurePolicy": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", | ||||
| } | ||||
| 
 | ||||
| func (ExternalAdmissionHook) SwaggerDoc() map[string]string { | ||||
| 	return map_ExternalAdmissionHook | ||||
| } | ||||
| 
 | ||||
| var map_ExternalAdmissionHookConfiguration = map[string]string{ | ||||
| 	"":                       "ExternalAdmissionHookConfiguration describes the configuration of initializers.", | ||||
| 	"metadata":               "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", | ||||
| 	"externalAdmissionHooks": "ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations.", | ||||
| } | ||||
| 
 | ||||
| func (ExternalAdmissionHookConfiguration) SwaggerDoc() map[string]string { | ||||
| 	return map_ExternalAdmissionHookConfiguration | ||||
| } | ||||
| 
 | ||||
| var map_ExternalAdmissionHookConfigurationList = map[string]string{ | ||||
| 	"":         "ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.", | ||||
| 	"metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", | ||||
| 	"items":    "List of ExternalAdmissionHookConfiguration.", | ||||
| } | ||||
| 
 | ||||
| func (ExternalAdmissionHookConfigurationList) SwaggerDoc() map[string]string { | ||||
| 	return map_ExternalAdmissionHookConfigurationList | ||||
| } | ||||
| 
 | ||||
| var map_Initializer = map[string]string{ | ||||
| 	"":      "Initializer describes the name and the failure policy of an initializer, and what resources it applies to.", | ||||
| 	"name":  "Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where \"alwayspullimages\" is the name of the webhook, and kubernetes.io is the name of the organization. Required", | ||||
|  | @ -111,23 +68,4 @@ func (Rule) SwaggerDoc() map[string]string { | |||
| 	return map_Rule | ||||
| } | ||||
| 
 | ||||
| var map_RuleWithOperations = map[string]string{ | ||||
| 	"":           "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.", | ||||
| 	"operations": "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.", | ||||
| } | ||||
| 
 | ||||
| func (RuleWithOperations) SwaggerDoc() map[string]string { | ||||
| 	return map_RuleWithOperations | ||||
| } | ||||
| 
 | ||||
| var map_ServiceReference = map[string]string{ | ||||
| 	"":          "ServiceReference holds a reference to Service.legacy.k8s.io", | ||||
| 	"namespace": "Namespace is the namespace of the service Required", | ||||
| 	"name":      "Name is the name of the service Required", | ||||
| } | ||||
| 
 | ||||
| func (ServiceReference) SwaggerDoc() map[string]string { | ||||
| 	return map_ServiceReference | ||||
| } | ||||
| 
 | ||||
| // AUTO-GENERATED FUNCTIONS END HERE
 | ||||
|  |  | |||
|  | @ -21,187 +21,9 @@ limitations under the License. | |||
| package v1alpha1 | ||||
| 
 | ||||
| import ( | ||||
| 	conversion "k8s.io/apimachinery/pkg/conversion" | ||||
| 	runtime "k8s.io/apimachinery/pkg/runtime" | ||||
| 	reflect "reflect" | ||||
| ) | ||||
| 
 | ||||
| func init() { | ||||
| 	SchemeBuilder.Register(RegisterDeepCopies) | ||||
| } | ||||
| 
 | ||||
| // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
 | ||||
| // to allow building arbitrary schemes.
 | ||||
| //
 | ||||
| // Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
 | ||||
| func RegisterDeepCopies(scheme *runtime.Scheme) error { | ||||
| 	return scheme.AddGeneratedDeepCopyFuncs( | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*AdmissionHookClientConfig).DeepCopyInto(out.(*AdmissionHookClientConfig)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&AdmissionHookClientConfig{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ExternalAdmissionHook).DeepCopyInto(out.(*ExternalAdmissionHook)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ExternalAdmissionHook{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ExternalAdmissionHookConfiguration).DeepCopyInto(out.(*ExternalAdmissionHookConfiguration)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ExternalAdmissionHookConfiguration{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ExternalAdmissionHookConfigurationList).DeepCopyInto(out.(*ExternalAdmissionHookConfigurationList)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ExternalAdmissionHookConfigurationList{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*Initializer).DeepCopyInto(out.(*Initializer)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&Initializer{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*InitializerConfiguration).DeepCopyInto(out.(*InitializerConfiguration)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&InitializerConfiguration{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*InitializerConfigurationList).DeepCopyInto(out.(*InitializerConfigurationList)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&InitializerConfigurationList{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*Rule).DeepCopyInto(out.(*Rule)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&Rule{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*RuleWithOperations).DeepCopyInto(out.(*RuleWithOperations)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&RuleWithOperations{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ServiceReference).DeepCopyInto(out.(*ServiceReference)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ServiceReference{})}, | ||||
| 	) | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *AdmissionHookClientConfig) DeepCopyInto(out *AdmissionHookClientConfig) { | ||||
| 	*out = *in | ||||
| 	out.Service = in.Service | ||||
| 	if in.CABundle != nil { | ||||
| 		in, out := &in.CABundle, &out.CABundle | ||||
| 		*out = make([]byte, len(*in)) | ||||
| 		copy(*out, *in) | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionHookClientConfig.
 | ||||
| func (in *AdmissionHookClientConfig) DeepCopy() *AdmissionHookClientConfig { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(AdmissionHookClientConfig) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *ExternalAdmissionHook) DeepCopyInto(out *ExternalAdmissionHook) { | ||||
| 	*out = *in | ||||
| 	in.ClientConfig.DeepCopyInto(&out.ClientConfig) | ||||
| 	if in.Rules != nil { | ||||
| 		in, out := &in.Rules, &out.Rules | ||||
| 		*out = make([]RuleWithOperations, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	if in.FailurePolicy != nil { | ||||
| 		in, out := &in.FailurePolicy, &out.FailurePolicy | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(FailurePolicyType) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAdmissionHook.
 | ||||
| func (in *ExternalAdmissionHook) DeepCopy() *ExternalAdmissionHook { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ExternalAdmissionHook) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *ExternalAdmissionHookConfiguration) DeepCopyInto(out *ExternalAdmissionHookConfiguration) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) | ||||
| 	if in.ExternalAdmissionHooks != nil { | ||||
| 		in, out := &in.ExternalAdmissionHooks, &out.ExternalAdmissionHooks | ||||
| 		*out = make([]ExternalAdmissionHook, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAdmissionHookConfiguration.
 | ||||
| func (in *ExternalAdmissionHookConfiguration) DeepCopy() *ExternalAdmissionHookConfiguration { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ExternalAdmissionHookConfiguration) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *ExternalAdmissionHookConfiguration) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *ExternalAdmissionHookConfigurationList) DeepCopyInto(out *ExternalAdmissionHookConfigurationList) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	out.ListMeta = in.ListMeta | ||||
| 	if in.Items != nil { | ||||
| 		in, out := &in.Items, &out.Items | ||||
| 		*out = make([]ExternalAdmissionHookConfiguration, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAdmissionHookConfigurationList.
 | ||||
| func (in *ExternalAdmissionHookConfigurationList) DeepCopy() *ExternalAdmissionHookConfigurationList { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ExternalAdmissionHookConfigurationList) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *ExternalAdmissionHookConfigurationList) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *Initializer) DeepCopyInto(out *Initializer) { | ||||
| 	*out = *in | ||||
|  | @ -323,41 +145,3 @@ func (in *Rule) DeepCopy() *Rule { | |||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *RuleWithOperations) DeepCopyInto(out *RuleWithOperations) { | ||||
| 	*out = *in | ||||
| 	if in.Operations != nil { | ||||
| 		in, out := &in.Operations, &out.Operations | ||||
| 		*out = make([]OperationType, len(*in)) | ||||
| 		copy(*out, *in) | ||||
| 	} | ||||
| 	in.Rule.DeepCopyInto(&out.Rule) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleWithOperations.
 | ||||
| func (in *RuleWithOperations) DeepCopy() *RuleWithOperations { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(RuleWithOperations) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { | ||||
| 	*out = *in | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference.
 | ||||
| func (in *ServiceReference) DeepCopy() *ServiceReference { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ServiceReference) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
|  |  | |||
|  | @ -0,0 +1,44 @@ | |||
| package(default_visibility = ["//visibility:public"]) | ||||
| 
 | ||||
| load( | ||||
|     "@io_bazel_rules_go//go:def.bzl", | ||||
|     "go_library", | ||||
| ) | ||||
| 
 | ||||
| go_library( | ||||
|     name = "go_default_library", | ||||
|     srcs = [ | ||||
|         "doc.go", | ||||
|         "generated.pb.go", | ||||
|         "register.go", | ||||
|         "types.go", | ||||
|         "types_swagger_doc_generated.go", | ||||
|         "zz_generated.deepcopy.go", | ||||
|     ], | ||||
|     importpath = "k8s.io/api/admissionregistration/v1beta1", | ||||
|     deps = [ | ||||
|         "//vendor/github.com/gogo/protobuf/proto:go_default_library", | ||||
|         "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", | ||||
|         "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", | ||||
|         "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", | ||||
|     ], | ||||
| ) | ||||
| 
 | ||||
| filegroup( | ||||
|     name = "package-srcs", | ||||
|     srcs = glob(["**"]), | ||||
|     tags = ["automanaged"], | ||||
|     visibility = ["//visibility:private"], | ||||
| ) | ||||
| 
 | ||||
| filegroup( | ||||
|     name = "all-srcs", | ||||
|     srcs = [":package-srcs"], | ||||
|     tags = ["automanaged"], | ||||
| ) | ||||
| 
 | ||||
| filegroup( | ||||
|     name = "go_default_library_protos", | ||||
|     srcs = ["generated.proto"], | ||||
|     visibility = ["//visibility:public"], | ||||
| ) | ||||
|  | @ -0,0 +1,25 @@ | |||
| /* | ||||
| 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. | ||||
| */ | ||||
| 
 | ||||
| // +k8s:deepcopy-gen=package
 | ||||
| // +k8s:openapi-gen=true
 | ||||
| 
 | ||||
| // Package v1beta1 is the v1beta1 version of the API.
 | ||||
| // AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration
 | ||||
| // InitializerConfiguration and validatingWebhookConfiguration is for the
 | ||||
| // new dynamic admission controller configuration.
 | ||||
| // +groupName=admissionregistration.k8s.io
 | ||||
| package v1beta1 // import "k8s.io/api/admissionregistration/v1beta1"
 | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -0,0 +1,261 @@ | |||
| /* | ||||
| 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 go-to-protobuf. Do not edit it manually! | ||||
| 
 | ||||
| syntax = 'proto2'; | ||||
| 
 | ||||
| package k8s.io.api.admissionregistration.v1beta1; | ||||
| 
 | ||||
| import "k8s.io/api/core/v1/generated.proto"; | ||||
| import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto"; | ||||
| import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; | ||||
| import "k8s.io/apimachinery/pkg/runtime/generated.proto"; | ||||
| import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; | ||||
| import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; | ||||
| 
 | ||||
| // Package-wide variables from generator "generated". | ||||
| option go_package = "v1beta1"; | ||||
| 
 | ||||
| // MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. | ||||
| message MutatingWebhookConfiguration { | ||||
|   // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; | ||||
| 
 | ||||
|   // Webhooks is a list of webhooks and the affected resources and operations. | ||||
|   // +optional | ||||
|   // +patchMergeKey=name | ||||
|   // +patchStrategy=merge | ||||
|   repeated Webhook Webhooks = 2; | ||||
| } | ||||
| 
 | ||||
| // MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. | ||||
| message MutatingWebhookConfigurationList { | ||||
|   // Standard list metadata. | ||||
|   // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; | ||||
| 
 | ||||
|   // List of MutatingWebhookConfiguration. | ||||
|   repeated MutatingWebhookConfiguration items = 2; | ||||
| } | ||||
| 
 | ||||
| // Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended | ||||
| // to make sure that all the tuple expansions are valid. | ||||
| message Rule { | ||||
|   // APIGroups is the API groups the resources belong to. '*' is all groups. | ||||
|   // If '*' is present, the length of the slice must be one. | ||||
|   // Required. | ||||
|   repeated string apiGroups = 1; | ||||
| 
 | ||||
|   // APIVersions is the API versions the resources belong to. '*' is all versions. | ||||
|   // If '*' is present, the length of the slice must be one. | ||||
|   // Required. | ||||
|   repeated string apiVersions = 2; | ||||
| 
 | ||||
|   // Resources is a list of resources this rule applies to. | ||||
|   //  | ||||
|   // For example: | ||||
|   // 'pods' means pods. | ||||
|   // 'pods/log' means the log subresource of pods. | ||||
|   // '*' means all resources, but not subresources. | ||||
|   // 'pods/*' means all subresources of pods. | ||||
|   // '*/scale' means all scale subresources. | ||||
|   // '*/*' means all resources and their subresources. | ||||
|   //  | ||||
|   // If wildcard is present, the validation rule will ensure resources do not | ||||
|   // overlap with each other. | ||||
|   //  | ||||
|   // Depending on the enclosing object, subresources might not be allowed. | ||||
|   // Required. | ||||
|   repeated string resources = 3; | ||||
| } | ||||
| 
 | ||||
| // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make | ||||
| // sure that all the tuple expansions are valid. | ||||
| message RuleWithOperations { | ||||
|   // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * | ||||
|   // for all operations. | ||||
|   // If '*' is present, the length of the slice must be one. | ||||
|   // Required. | ||||
|   repeated string operations = 1; | ||||
| 
 | ||||
|   // Rule is embedded, it describes other criteria of the rule, like | ||||
|   // APIGroups, APIVersions, Resources, etc. | ||||
|   optional Rule rule = 2; | ||||
| } | ||||
| 
 | ||||
| // ServiceReference holds a reference to Service.legacy.k8s.io | ||||
| message ServiceReference { | ||||
|   // `namespace` is the namespace of the service. | ||||
|   // Required | ||||
|   optional string namespace = 1; | ||||
| 
 | ||||
|   // `name` is the name of the service. | ||||
|   // Required | ||||
|   optional string name = 2; | ||||
| 
 | ||||
|   // `path` is an optional URL path which will be sent in any request to | ||||
|   // this service. | ||||
|   // +optional | ||||
|   optional string path = 3; | ||||
| } | ||||
| 
 | ||||
| // ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. | ||||
| message ValidatingWebhookConfiguration { | ||||
|   // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; | ||||
| 
 | ||||
|   // Webhooks is a list of webhooks and the affected resources and operations. | ||||
|   // +optional | ||||
|   // +patchMergeKey=name | ||||
|   // +patchStrategy=merge | ||||
|   repeated Webhook Webhooks = 2; | ||||
| } | ||||
| 
 | ||||
| // ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. | ||||
| message ValidatingWebhookConfigurationList { | ||||
|   // Standard list metadata. | ||||
|   // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; | ||||
| 
 | ||||
|   // List of ValidatingWebhookConfiguration. | ||||
|   repeated ValidatingWebhookConfiguration items = 2; | ||||
| } | ||||
| 
 | ||||
| // Webhook describes an admission webhook and the resources and operations it applies to. | ||||
| message Webhook { | ||||
|   // The name of the admission webhook. | ||||
|   // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where | ||||
|   // "imagepolicy" is the name of the webhook, and kubernetes.io is the name | ||||
|   // of the organization. | ||||
|   // Required. | ||||
|   optional string name = 1; | ||||
| 
 | ||||
|   // ClientConfig defines how to communicate with the hook. | ||||
|   // Required | ||||
|   optional WebhookClientConfig clientConfig = 2; | ||||
| 
 | ||||
|   // Rules describes what operations on what resources/subresources the webhook cares about. | ||||
|   // The webhook cares about an operation if it matches _any_ Rule. | ||||
|   repeated RuleWithOperations rules = 3; | ||||
| 
 | ||||
|   // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - | ||||
|   // allowed values are Ignore or Fail. Defaults to Ignore. | ||||
|   // +optional | ||||
|   optional string failurePolicy = 4; | ||||
| 
 | ||||
|   // NamespaceSelector decides whether to run the webhook on an object based | ||||
|   // on whether the namespace for that object matches the selector. If the | ||||
|   // object itself is a namespace, the matching is performed on | ||||
|   // object.metadata.labels. If the object is other cluster scoped resource, | ||||
|   // it is not subjected to the webhook. | ||||
|   //  | ||||
|   // For example, to run the webhook on any objects whose namespace is not | ||||
|   // associated with "runlevel" of "0" or "1";  you will set the selector as | ||||
|   // follows: | ||||
|   // "namespaceSelector": { | ||||
|   //   "matchExpressions": [ | ||||
|   //     { | ||||
|   //       "key": "runlevel", | ||||
|   //       "operator": "NotIn", | ||||
|   //       "values": [ | ||||
|   //         "0", | ||||
|   //         "1" | ||||
|   //       ] | ||||
|   //     } | ||||
|   //   ] | ||||
|   // } | ||||
|   //  | ||||
|   // If instead you want to only run the webhook on any objects whose | ||||
|   // namespace is associated with the "environment" of "prod" or "staging"; | ||||
|   // you will set the selector as follows: | ||||
|   // "namespaceSelector": { | ||||
|   //   "matchExpressions": [ | ||||
|   //     { | ||||
|   //       "key": "environment", | ||||
|   //       "operator": "In", | ||||
|   //       "values": [ | ||||
|   //         "prod", | ||||
|   //         "staging" | ||||
|   //       ] | ||||
|   //     } | ||||
|   //   ] | ||||
|   // } | ||||
|   //  | ||||
|   // See | ||||
|   // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ | ||||
|   // for more examples of label selectors. | ||||
|   //  | ||||
|   // Default to the empty LabelSelector, which matches everything. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 5; | ||||
| } | ||||
| 
 | ||||
| // WebhookClientConfig contains the information to make a TLS | ||||
| // connection with the webhook | ||||
| message WebhookClientConfig { | ||||
|   // `url` gives the location of the webhook, in standard URL form | ||||
|   // (`[scheme://]host:port/path`). Exactly one of `url` or `service` | ||||
|   // must be specified. | ||||
|   //  | ||||
|   // The `host` should not refer to a service running in the cluster; use | ||||
|   // the `service` field instead. The host might be resolved via external | ||||
|   // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve | ||||
|   // in-cluster DNS as that would be a layering violation). `host` may | ||||
|   // also be an IP address. | ||||
|   //  | ||||
|   // Please note that using `localhost` or `127.0.0.1` as a `host` is | ||||
|   // risky unless you take great care to run this webhook on all hosts | ||||
|   // which run an apiserver which might need to make calls to this | ||||
|   // webhook. Such installs are likely to be non-portable, i.e., not easy | ||||
|   // to turn up in a new cluster. | ||||
|   //  | ||||
|   // The scheme must be "https"; the URL must begin with "https://". | ||||
|   //  | ||||
|   // A path is optional, and if present may be any string permissible in | ||||
|   // a URL. You may use the path to pass an arbitrary string to the | ||||
|   // webhook, for example, a cluster identifier. | ||||
|   //  | ||||
|   // Attempting to use a user or basic auth e.g. "user:password@" is not | ||||
|   // allowed. Fragments ("#...") and query parameters ("?...") are not | ||||
|   // allowed, either. | ||||
|   //  | ||||
|   // +optional | ||||
|   optional string url = 3; | ||||
| 
 | ||||
|   // `service` is a reference to the service for this webhook. Either | ||||
|   // `service` or `url` must be specified. | ||||
|   //  | ||||
|   // If the webhook is running within the cluster, then you should use `service`. | ||||
|   //  | ||||
|   // If there is only one port open for the service, that port will be | ||||
|   // used. If there are multiple ports open, port 443 will be used if it | ||||
|   // is open, otherwise it is an error. | ||||
|   //  | ||||
|   // +optional | ||||
|   optional ServiceReference service = 1; | ||||
| 
 | ||||
|   // `caBundle` is a PEM encoded CA bundle which will be used to validate | ||||
|   // the webhook's server certificate. | ||||
|   // Required. | ||||
|   optional bytes caBundle = 2; | ||||
| } | ||||
| 
 | ||||
|  | @ -0,0 +1,53 @@ | |||
| /* | ||||
| 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. | ||||
| */ | ||||
| 
 | ||||
| package v1beta1 | ||||
| 
 | ||||
| import ( | ||||
| 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
| 	"k8s.io/apimachinery/pkg/runtime" | ||||
| 	"k8s.io/apimachinery/pkg/runtime/schema" | ||||
| ) | ||||
| 
 | ||||
| const GroupName = "admissionregistration.k8s.io" | ||||
| 
 | ||||
| // SchemeGroupVersion is group version used to register these objects
 | ||||
| var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} | ||||
| 
 | ||||
| // Resource takes an unqualified resource and returns a Group qualified GroupResource
 | ||||
| func Resource(resource string) schema.GroupResource { | ||||
| 	return SchemeGroupVersion.WithResource(resource).GroupResource() | ||||
| } | ||||
| 
 | ||||
| var ( | ||||
| 	// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
 | ||||
| 	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
 | ||||
| 	SchemeBuilder      = runtime.NewSchemeBuilder(addKnownTypes) | ||||
| 	localSchemeBuilder = &SchemeBuilder | ||||
| 	AddToScheme        = localSchemeBuilder.AddToScheme | ||||
| ) | ||||
| 
 | ||||
| // Adds the list of known types to scheme.
 | ||||
| func addKnownTypes(scheme *runtime.Scheme) error { | ||||
| 	scheme.AddKnownTypes(SchemeGroupVersion, | ||||
| 		&ValidatingWebhookConfiguration{}, | ||||
| 		&ValidatingWebhookConfigurationList{}, | ||||
| 		&MutatingWebhookConfiguration{}, | ||||
| 		&MutatingWebhookConfigurationList{}, | ||||
| 	) | ||||
| 	metav1.AddToGroupVersion(scheme, SchemeGroupVersion) | ||||
| 	return nil | ||||
| } | ||||
|  | @ -0,0 +1,281 @@ | |||
| /* | ||||
| 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. | ||||
| */ | ||||
| 
 | ||||
| package v1beta1 | ||||
| 
 | ||||
| import ( | ||||
| 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
| ) | ||||
| 
 | ||||
| // Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
 | ||||
| // to make sure that all the tuple expansions are valid.
 | ||||
| type Rule struct { | ||||
| 	// APIGroups is the API groups the resources belong to. '*' is all groups.
 | ||||
| 	// If '*' is present, the length of the slice must be one.
 | ||||
| 	// Required.
 | ||||
| 	APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,1,rep,name=apiGroups"` | ||||
| 
 | ||||
| 	// APIVersions is the API versions the resources belong to. '*' is all versions.
 | ||||
| 	// If '*' is present, the length of the slice must be one.
 | ||||
| 	// Required.
 | ||||
| 	APIVersions []string `json:"apiVersions,omitempty" protobuf:"bytes,2,rep,name=apiVersions"` | ||||
| 
 | ||||
| 	// Resources is a list of resources this rule applies to.
 | ||||
| 	//
 | ||||
| 	// For example:
 | ||||
| 	// 'pods' means pods.
 | ||||
| 	// 'pods/log' means the log subresource of pods.
 | ||||
| 	// '*' means all resources, but not subresources.
 | ||||
| 	// 'pods/*' means all subresources of pods.
 | ||||
| 	// '*/scale' means all scale subresources.
 | ||||
| 	// '*/*' means all resources and their subresources.
 | ||||
| 	//
 | ||||
| 	// If wildcard is present, the validation rule will ensure resources do not
 | ||||
| 	// overlap with each other.
 | ||||
| 	//
 | ||||
| 	// Depending on the enclosing object, subresources might not be allowed.
 | ||||
| 	// Required.
 | ||||
| 	Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"` | ||||
| } | ||||
| 
 | ||||
| type FailurePolicyType string | ||||
| 
 | ||||
| const ( | ||||
| 	// Ignore means the initializer is removed from the initializers list of an
 | ||||
| 	// object if the initializer is timed out.
 | ||||
| 	Ignore FailurePolicyType = "Ignore" | ||||
| 	// For 1.7, only "Ignore" is allowed. "Fail" will be allowed when the
 | ||||
| 	// extensible admission feature is beta.
 | ||||
| 	Fail FailurePolicyType = "Fail" | ||||
| ) | ||||
| 
 | ||||
| // +genclient
 | ||||
| // +genclient:nonNamespaced
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
 | ||||
| type ValidatingWebhookConfiguration struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
 | ||||
| 	// +optional
 | ||||
| 	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 	// Webhooks is a list of webhooks and the affected resources and operations.
 | ||||
| 	// +optional
 | ||||
| 	// +patchMergeKey=name
 | ||||
| 	// +patchStrategy=merge
 | ||||
| 	Webhooks []Webhook `json:"webhooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=Webhooks"` | ||||
| } | ||||
| 
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.
 | ||||
| type ValidatingWebhookConfigurationList struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// Standard list metadata.
 | ||||
| 	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
 | ||||
| 	// +optional
 | ||||
| 	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 	// List of ValidatingWebhookConfiguration.
 | ||||
| 	Items []ValidatingWebhookConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"` | ||||
| } | ||||
| 
 | ||||
| // +genclient
 | ||||
| // +genclient:nonNamespaced
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
 | ||||
| type MutatingWebhookConfiguration struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
 | ||||
| 	// +optional
 | ||||
| 	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 	// Webhooks is a list of webhooks and the affected resources and operations.
 | ||||
| 	// +optional
 | ||||
| 	// +patchMergeKey=name
 | ||||
| 	// +patchStrategy=merge
 | ||||
| 	Webhooks []Webhook `json:"webhooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=Webhooks"` | ||||
| } | ||||
| 
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
 | ||||
| type MutatingWebhookConfigurationList struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// Standard list metadata.
 | ||||
| 	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
 | ||||
| 	// +optional
 | ||||
| 	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 	// List of MutatingWebhookConfiguration.
 | ||||
| 	Items []MutatingWebhookConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"` | ||||
| } | ||||
| 
 | ||||
| // Webhook describes an admission webhook and the resources and operations it applies to.
 | ||||
| type Webhook struct { | ||||
| 	// The name of the admission webhook.
 | ||||
| 	// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
 | ||||
| 	// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
 | ||||
| 	// of the organization.
 | ||||
| 	// Required.
 | ||||
| 	Name string `json:"name" protobuf:"bytes,1,opt,name=name"` | ||||
| 
 | ||||
| 	// ClientConfig defines how to communicate with the hook.
 | ||||
| 	// Required
 | ||||
| 	ClientConfig WebhookClientConfig `json:"clientConfig" protobuf:"bytes,2,opt,name=clientConfig"` | ||||
| 
 | ||||
| 	// Rules describes what operations on what resources/subresources the webhook cares about.
 | ||||
| 	// The webhook cares about an operation if it matches _any_ Rule.
 | ||||
| 	Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` | ||||
| 
 | ||||
| 	// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
 | ||||
| 	// allowed values are Ignore or Fail. Defaults to Ignore.
 | ||||
| 	// +optional
 | ||||
| 	FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,4,opt,name=failurePolicy,casttype=FailurePolicyType"` | ||||
| 
 | ||||
| 	// NamespaceSelector decides whether to run the webhook on an object based
 | ||||
| 	// on whether the namespace for that object matches the selector. If the
 | ||||
| 	// object itself is a namespace, the matching is performed on
 | ||||
| 	// object.metadata.labels. If the object is other cluster scoped resource,
 | ||||
| 	// it is not subjected to the webhook.
 | ||||
| 	//
 | ||||
| 	// For example, to run the webhook on any objects whose namespace is not
 | ||||
| 	// associated with "runlevel" of "0" or "1";  you will set the selector as
 | ||||
| 	// follows:
 | ||||
| 	// "namespaceSelector": {
 | ||||
| 	//   "matchExpressions": [
 | ||||
| 	//     {
 | ||||
| 	//       "key": "runlevel",
 | ||||
| 	//       "operator": "NotIn",
 | ||||
| 	//       "values": [
 | ||||
| 	//         "0",
 | ||||
| 	//         "1"
 | ||||
| 	//       ]
 | ||||
| 	//     }
 | ||||
| 	//   ]
 | ||||
| 	// }
 | ||||
| 	//
 | ||||
| 	// If instead you want to only run the webhook on any objects whose
 | ||||
| 	// namespace is associated with the "environment" of "prod" or "staging";
 | ||||
| 	// you will set the selector as follows:
 | ||||
| 	// "namespaceSelector": {
 | ||||
| 	//   "matchExpressions": [
 | ||||
| 	//     {
 | ||||
| 	//       "key": "environment",
 | ||||
| 	//       "operator": "In",
 | ||||
| 	//       "values": [
 | ||||
| 	//         "prod",
 | ||||
| 	//         "staging"
 | ||||
| 	//       ]
 | ||||
| 	//     }
 | ||||
| 	//   ]
 | ||||
| 	// }
 | ||||
| 	//
 | ||||
| 	// See
 | ||||
| 	// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
 | ||||
| 	// for more examples of label selectors.
 | ||||
| 	//
 | ||||
| 	// Default to the empty LabelSelector, which matches everything.
 | ||||
| 	// +optional
 | ||||
| 	NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,5,opt,name=namespaceSelector"` | ||||
| } | ||||
| 
 | ||||
| // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
 | ||||
| // sure that all the tuple expansions are valid.
 | ||||
| type RuleWithOperations struct { | ||||
| 	// Operations is the operations the admission hook cares about - CREATE, UPDATE, or *
 | ||||
| 	// for all operations.
 | ||||
| 	// If '*' is present, the length of the slice must be one.
 | ||||
| 	// Required.
 | ||||
| 	Operations []OperationType `json:"operations,omitempty" protobuf:"bytes,1,rep,name=operations,casttype=OperationType"` | ||||
| 	// Rule is embedded, it describes other criteria of the rule, like
 | ||||
| 	// APIGroups, APIVersions, Resources, etc.
 | ||||
| 	Rule `json:",inline" protobuf:"bytes,2,opt,name=rule"` | ||||
| } | ||||
| 
 | ||||
| type OperationType string | ||||
| 
 | ||||
| // The constants should be kept in sync with those defined in k8s.io/kubernetes/pkg/admission/interface.go.
 | ||||
| const ( | ||||
| 	OperationAll OperationType = "*" | ||||
| 	Create       OperationType = "CREATE" | ||||
| 	Update       OperationType = "UPDATE" | ||||
| 	Delete       OperationType = "DELETE" | ||||
| 	Connect      OperationType = "CONNECT" | ||||
| ) | ||||
| 
 | ||||
| // WebhookClientConfig contains the information to make a TLS
 | ||||
| // connection with the webhook
 | ||||
| type WebhookClientConfig struct { | ||||
| 	// `url` gives the location of the webhook, in standard URL form
 | ||||
| 	// (`[scheme://]host:port/path`). Exactly one of `url` or `service`
 | ||||
| 	// must be specified.
 | ||||
| 	//
 | ||||
| 	// The `host` should not refer to a service running in the cluster; use
 | ||||
| 	// the `service` field instead. The host might be resolved via external
 | ||||
| 	// DNS in some apiservers (e.g., `kube-apiserver` cannot resolve
 | ||||
| 	// in-cluster DNS as that would be a layering violation). `host` may
 | ||||
| 	// also be an IP address.
 | ||||
| 	//
 | ||||
| 	// Please note that using `localhost` or `127.0.0.1` as a `host` is
 | ||||
| 	// risky unless you take great care to run this webhook on all hosts
 | ||||
| 	// which run an apiserver which might need to make calls to this
 | ||||
| 	// webhook. Such installs are likely to be non-portable, i.e., not easy
 | ||||
| 	// to turn up in a new cluster.
 | ||||
| 	//
 | ||||
| 	// The scheme must be "https"; the URL must begin with "https://".
 | ||||
| 	//
 | ||||
| 	// A path is optional, and if present may be any string permissible in
 | ||||
| 	// a URL. You may use the path to pass an arbitrary string to the
 | ||||
| 	// webhook, for example, a cluster identifier.
 | ||||
| 	//
 | ||||
| 	// Attempting to use a user or basic auth e.g. "user:password@" is not
 | ||||
| 	// allowed. Fragments ("#...") and query parameters ("?...") are not
 | ||||
| 	// allowed, either.
 | ||||
| 	//
 | ||||
| 	// +optional
 | ||||
| 	URL *string `json:"url,omitempty" protobuf:"bytes,3,opt,name=url"` | ||||
| 
 | ||||
| 	// `service` is a reference to the service for this webhook. Either
 | ||||
| 	// `service` or `url` must be specified.
 | ||||
| 	//
 | ||||
| 	// If the webhook is running within the cluster, then you should use `service`.
 | ||||
| 	//
 | ||||
| 	// If there is only one port open for the service, that port will be
 | ||||
| 	// used. If there are multiple ports open, port 443 will be used if it
 | ||||
| 	// is open, otherwise it is an error.
 | ||||
| 	//
 | ||||
| 	// +optional
 | ||||
| 	Service *ServiceReference `json:"service" protobuf:"bytes,1,opt,name=service"` | ||||
| 
 | ||||
| 	// `caBundle` is a PEM encoded CA bundle which will be used to validate
 | ||||
| 	// the webhook's server certificate.
 | ||||
| 	// Required.
 | ||||
| 	CABundle []byte `json:"caBundle" protobuf:"bytes,2,opt,name=caBundle"` | ||||
| } | ||||
| 
 | ||||
| // ServiceReference holds a reference to Service.legacy.k8s.io
 | ||||
| type ServiceReference struct { | ||||
| 	// `namespace` is the namespace of the service.
 | ||||
| 	// Required
 | ||||
| 	Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` | ||||
| 	// `name` is the name of the service.
 | ||||
| 	// Required
 | ||||
| 	Name string `json:"name" protobuf:"bytes,2,opt,name=name"` | ||||
| 
 | ||||
| 	// `path` is an optional URL path which will be sent in any request to
 | ||||
| 	// this service.
 | ||||
| 	// +optional
 | ||||
| 	Path *string `json:"path,omitempty" protobuf:"bytes,3,opt,name=path"` | ||||
| } | ||||
							
								
								
									
										125
									
								
								vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go
								
								
									generated
								
								
									vendored
								
								
									Normal file
								
							
							
						
						
									
										125
									
								
								vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go
								
								
									generated
								
								
									vendored
								
								
									Normal file
								
							|  | @ -0,0 +1,125 @@ | |||
| /* | ||||
| 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. | ||||
| */ | ||||
| 
 | ||||
| package v1beta1 | ||||
| 
 | ||||
| // This file contains a collection of methods that can be used from go-restful to
 | ||||
| // generate Swagger API documentation for its models. Please read this PR for more
 | ||||
| // information on the implementation: https://github.com/emicklei/go-restful/pull/215
 | ||||
| //
 | ||||
| // TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
 | ||||
| // they are on one line! For multiple line or blocks that you want to ignore use ---.
 | ||||
| // Any context after a --- is ignored.
 | ||||
| //
 | ||||
| // Those methods can be generated by using hack/update-generated-swagger-docs.sh
 | ||||
| 
 | ||||
| // AUTO-GENERATED FUNCTIONS START HERE
 | ||||
| var map_MutatingWebhookConfiguration = map[string]string{ | ||||
| 	"":         "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.", | ||||
| 	"metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", | ||||
| 	"webhooks": "Webhooks is a list of webhooks and the affected resources and operations.", | ||||
| } | ||||
| 
 | ||||
| func (MutatingWebhookConfiguration) SwaggerDoc() map[string]string { | ||||
| 	return map_MutatingWebhookConfiguration | ||||
| } | ||||
| 
 | ||||
| var map_MutatingWebhookConfigurationList = map[string]string{ | ||||
| 	"":         "MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.", | ||||
| 	"metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", | ||||
| 	"items":    "List of MutatingWebhookConfiguration.", | ||||
| } | ||||
| 
 | ||||
| func (MutatingWebhookConfigurationList) SwaggerDoc() map[string]string { | ||||
| 	return map_MutatingWebhookConfigurationList | ||||
| } | ||||
| 
 | ||||
| var map_Rule = map[string]string{ | ||||
| 	"":            "Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.", | ||||
| 	"apiGroups":   "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", | ||||
| 	"apiVersions": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", | ||||
| 	"resources":   "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", | ||||
| } | ||||
| 
 | ||||
| func (Rule) SwaggerDoc() map[string]string { | ||||
| 	return map_Rule | ||||
| } | ||||
| 
 | ||||
| var map_RuleWithOperations = map[string]string{ | ||||
| 	"":           "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.", | ||||
| 	"operations": "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.", | ||||
| } | ||||
| 
 | ||||
| func (RuleWithOperations) SwaggerDoc() map[string]string { | ||||
| 	return map_RuleWithOperations | ||||
| } | ||||
| 
 | ||||
| var map_ServiceReference = map[string]string{ | ||||
| 	"":          "ServiceReference holds a reference to Service.legacy.k8s.io", | ||||
| 	"namespace": "`namespace` is the namespace of the service. Required", | ||||
| 	"name":      "`name` is the name of the service. Required", | ||||
| 	"path":      "`path` is an optional URL path which will be sent in any request to this service.", | ||||
| } | ||||
| 
 | ||||
| func (ServiceReference) SwaggerDoc() map[string]string { | ||||
| 	return map_ServiceReference | ||||
| } | ||||
| 
 | ||||
| var map_ValidatingWebhookConfiguration = map[string]string{ | ||||
| 	"":         "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.", | ||||
| 	"metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", | ||||
| 	"webhooks": "Webhooks is a list of webhooks and the affected resources and operations.", | ||||
| } | ||||
| 
 | ||||
| func (ValidatingWebhookConfiguration) SwaggerDoc() map[string]string { | ||||
| 	return map_ValidatingWebhookConfiguration | ||||
| } | ||||
| 
 | ||||
| var map_ValidatingWebhookConfigurationList = map[string]string{ | ||||
| 	"":         "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.", | ||||
| 	"metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", | ||||
| 	"items":    "List of ValidatingWebhookConfiguration.", | ||||
| } | ||||
| 
 | ||||
| func (ValidatingWebhookConfigurationList) SwaggerDoc() map[string]string { | ||||
| 	return map_ValidatingWebhookConfigurationList | ||||
| } | ||||
| 
 | ||||
| var map_Webhook = map[string]string{ | ||||
| 	"":                  "Webhook describes an admission webhook and the resources and operations it applies to.", | ||||
| 	"name":              "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", | ||||
| 	"clientConfig":      "ClientConfig defines how to communicate with the hook. Required", | ||||
| 	"rules":             "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule.", | ||||
| 	"failurePolicy":     "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", | ||||
| 	"namespaceSelector": "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is other cluster scoped resource, it is not subjected to the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\";  you will set the selector as follows: \"namespaceSelector\": {\n  \"matchExpressions\": [\n    {\n      \"key\": \"runlevel\",\n      \"operator\": \"NotIn\",\n      \"values\": [\n        \"0\",\n        \"1\"\n      ]\n    }\n  ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n  \"matchExpressions\": [\n    {\n      \"key\": \"environment\",\n      \"operator\": \"In\",\n      \"values\": [\n        \"prod\",\n        \"staging\"\n      ]\n    }\n  ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", | ||||
| } | ||||
| 
 | ||||
| func (Webhook) SwaggerDoc() map[string]string { | ||||
| 	return map_Webhook | ||||
| } | ||||
| 
 | ||||
| var map_WebhookClientConfig = map[string]string{ | ||||
| 	"":         "WebhookClientConfig contains the information to make a TLS connection with the webhook", | ||||
| 	"url":      "`url` gives the location of the webhook, in standard URL form (`[scheme://]host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", | ||||
| 	"service":  "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.\n\nIf there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error.", | ||||
| 	"caBundle": "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. Required.", | ||||
| } | ||||
| 
 | ||||
| func (WebhookClientConfig) SwaggerDoc() map[string]string { | ||||
| 	return map_WebhookClientConfig | ||||
| } | ||||
| 
 | ||||
| // AUTO-GENERATED FUNCTIONS END HERE
 | ||||
							
								
								
									
										321
									
								
								vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go
								
								
									generated
								
								
									vendored
								
								
									Normal file
								
							
							
						
						
									
										321
									
								
								vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go
								
								
									generated
								
								
									vendored
								
								
									Normal file
								
							|  | @ -0,0 +1,321 @@ | |||
| // +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 v1beta1 | ||||
| 
 | ||||
| import ( | ||||
| 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
| 	runtime "k8s.io/apimachinery/pkg/runtime" | ||||
| ) | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *MutatingWebhookConfiguration) DeepCopyInto(out *MutatingWebhookConfiguration) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) | ||||
| 	if in.Webhooks != nil { | ||||
| 		in, out := &in.Webhooks, &out.Webhooks | ||||
| 		*out = make([]Webhook, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfiguration.
 | ||||
| func (in *MutatingWebhookConfiguration) DeepCopy() *MutatingWebhookConfiguration { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(MutatingWebhookConfiguration) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *MutatingWebhookConfiguration) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *MutatingWebhookConfigurationList) DeepCopyInto(out *MutatingWebhookConfigurationList) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	out.ListMeta = in.ListMeta | ||||
| 	if in.Items != nil { | ||||
| 		in, out := &in.Items, &out.Items | ||||
| 		*out = make([]MutatingWebhookConfiguration, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfigurationList.
 | ||||
| func (in *MutatingWebhookConfigurationList) DeepCopy() *MutatingWebhookConfigurationList { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(MutatingWebhookConfigurationList) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *MutatingWebhookConfigurationList) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *Rule) DeepCopyInto(out *Rule) { | ||||
| 	*out = *in | ||||
| 	if in.APIGroups != nil { | ||||
| 		in, out := &in.APIGroups, &out.APIGroups | ||||
| 		*out = make([]string, len(*in)) | ||||
| 		copy(*out, *in) | ||||
| 	} | ||||
| 	if in.APIVersions != nil { | ||||
| 		in, out := &in.APIVersions, &out.APIVersions | ||||
| 		*out = make([]string, len(*in)) | ||||
| 		copy(*out, *in) | ||||
| 	} | ||||
| 	if in.Resources != nil { | ||||
| 		in, out := &in.Resources, &out.Resources | ||||
| 		*out = make([]string, len(*in)) | ||||
| 		copy(*out, *in) | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
 | ||||
| func (in *Rule) DeepCopy() *Rule { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(Rule) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *RuleWithOperations) DeepCopyInto(out *RuleWithOperations) { | ||||
| 	*out = *in | ||||
| 	if in.Operations != nil { | ||||
| 		in, out := &in.Operations, &out.Operations | ||||
| 		*out = make([]OperationType, len(*in)) | ||||
| 		copy(*out, *in) | ||||
| 	} | ||||
| 	in.Rule.DeepCopyInto(&out.Rule) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleWithOperations.
 | ||||
| func (in *RuleWithOperations) DeepCopy() *RuleWithOperations { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(RuleWithOperations) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { | ||||
| 	*out = *in | ||||
| 	if in.Path != nil { | ||||
| 		in, out := &in.Path, &out.Path | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(string) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference.
 | ||||
| func (in *ServiceReference) DeepCopy() *ServiceReference { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ServiceReference) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *ValidatingWebhookConfiguration) DeepCopyInto(out *ValidatingWebhookConfiguration) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) | ||||
| 	if in.Webhooks != nil { | ||||
| 		in, out := &in.Webhooks, &out.Webhooks | ||||
| 		*out = make([]Webhook, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfiguration.
 | ||||
| func (in *ValidatingWebhookConfiguration) DeepCopy() *ValidatingWebhookConfiguration { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ValidatingWebhookConfiguration) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *ValidatingWebhookConfiguration) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *ValidatingWebhookConfigurationList) DeepCopyInto(out *ValidatingWebhookConfigurationList) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	out.ListMeta = in.ListMeta | ||||
| 	if in.Items != nil { | ||||
| 		in, out := &in.Items, &out.Items | ||||
| 		*out = make([]ValidatingWebhookConfiguration, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfigurationList.
 | ||||
| func (in *ValidatingWebhookConfigurationList) DeepCopy() *ValidatingWebhookConfigurationList { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ValidatingWebhookConfigurationList) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *ValidatingWebhookConfigurationList) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *Webhook) DeepCopyInto(out *Webhook) { | ||||
| 	*out = *in | ||||
| 	in.ClientConfig.DeepCopyInto(&out.ClientConfig) | ||||
| 	if in.Rules != nil { | ||||
| 		in, out := &in.Rules, &out.Rules | ||||
| 		*out = make([]RuleWithOperations, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	if in.FailurePolicy != nil { | ||||
| 		in, out := &in.FailurePolicy, &out.FailurePolicy | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(FailurePolicyType) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	if in.NamespaceSelector != nil { | ||||
| 		in, out := &in.NamespaceSelector, &out.NamespaceSelector | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(v1.LabelSelector) | ||||
| 			(*in).DeepCopyInto(*out) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webhook.
 | ||||
| func (in *Webhook) DeepCopy() *Webhook { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(Webhook) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { | ||||
| 	*out = *in | ||||
| 	if in.URL != nil { | ||||
| 		in, out := &in.URL, &out.URL | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(string) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	if in.Service != nil { | ||||
| 		in, out := &in.Service, &out.Service | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(ServiceReference) | ||||
| 			(*in).DeepCopyInto(*out) | ||||
| 		} | ||||
| 	} | ||||
| 	if in.CABundle != nil { | ||||
| 		in, out := &in.CABundle, &out.CABundle | ||||
| 		*out = make([]byte, len(*in)) | ||||
| 		copy(*out, *in) | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig.
 | ||||
| func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(WebhookClientConfig) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
|  | @ -16,7 +16,6 @@ go_library( | |||
|         "//vendor/github.com/gogo/protobuf/proto:go_default_library", | ||||
|         "//vendor/k8s.io/api/core/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/schema:go_default_library", | ||||
|         "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| // +k8s:deepcopy-gen=package,register
 | ||||
| // +k8s:deepcopy-gen=package
 | ||||
| // +k8s:openapi-gen=true
 | ||||
| 
 | ||||
| package v1 // import "k8s.io/api/apps/v1"
 | ||||
|  |  | |||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -31,6 +31,38 @@ import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; | |||
| // Package-wide variables from generator "generated". | ||||
| option go_package = "v1"; | ||||
| 
 | ||||
| // ControllerRevision implements an immutable snapshot of state data. Clients | ||||
| // are responsible for serializing and deserializing the objects that contain | ||||
| // their internal state. | ||||
| // Once a ControllerRevision has been successfully created, it can not be updated. | ||||
| // The API Server will fail validation of all requests that attempt to mutate | ||||
| // the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both | ||||
| // the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, | ||||
| // it may be subject to name and representation changes in future releases, and clients should not | ||||
| // depend on its stability. It is primarily for internal use by controllers. | ||||
| message ControllerRevision { | ||||
|   // Standard object's metadata. | ||||
|   // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; | ||||
| 
 | ||||
|   // Data is the serialized representation of the state. | ||||
|   optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2; | ||||
| 
 | ||||
|   // Revision indicates the revision of the state represented by Data. | ||||
|   optional int64 revision = 3; | ||||
| } | ||||
| 
 | ||||
| // ControllerRevisionList is a resource containing a list of ControllerRevision objects. | ||||
| message ControllerRevisionList { | ||||
|   // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; | ||||
| 
 | ||||
|   // Items is the list of ControllerRevisions | ||||
|   repeated ControllerRevision items = 2; | ||||
| } | ||||
| 
 | ||||
| // DaemonSet represents the configuration of a daemon set. | ||||
| message DaemonSet { | ||||
|   // Standard object's metadata. | ||||
|  | @ -52,6 +84,27 @@ message DaemonSet { | |||
|   optional DaemonSetStatus status = 3; | ||||
| } | ||||
| 
 | ||||
| // DaemonSetCondition describes the state of a DaemonSet at a certain point. | ||||
| message DaemonSetCondition { | ||||
|   // Type of DaemonSet condition. | ||||
|   optional string type = 1; | ||||
| 
 | ||||
|   // Status of the condition, one of True, False, Unknown. | ||||
|   optional string status = 2; | ||||
| 
 | ||||
|   // Last time the condition transitioned from one status to another. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; | ||||
| 
 | ||||
|   // The reason for the condition's last transition. | ||||
|   // +optional | ||||
|   optional string reason = 4; | ||||
| 
 | ||||
|   // A human readable message indicating details about the transition. | ||||
|   // +optional | ||||
|   optional string message = 5; | ||||
| } | ||||
| 
 | ||||
| // DaemonSetList is a collection of daemon sets. | ||||
| message DaemonSetList { | ||||
|   // Standard list metadata. | ||||
|  | @ -67,9 +120,8 @@ message DaemonSetList { | |||
| message DaemonSetSpec { | ||||
|   // A label query over pods that are managed by the daemon set. | ||||
|   // Must match in order to be controlled. | ||||
|   // If empty, defaulted to labels on Pod template. | ||||
|   // It must match the pod template's labels. | ||||
|   // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1; | ||||
| 
 | ||||
|   // An object that describes the pod that will be created. | ||||
|  | @ -143,6 +195,12 @@ message DaemonSetStatus { | |||
|   // create the name for the newest ControllerRevision. | ||||
|   // +optional | ||||
|   optional int32 collisionCount = 9; | ||||
| 
 | ||||
|   // Represents the latest available observations of a DaemonSet's current state. | ||||
|   // +optional | ||||
|   // +patchMergeKey=type | ||||
|   // +patchStrategy=merge | ||||
|   repeated DaemonSetCondition conditions = 10; | ||||
| } | ||||
| 
 | ||||
| // DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. | ||||
|  | @ -160,6 +218,262 @@ message DaemonSetUpdateStrategy { | |||
|   optional RollingUpdateDaemonSet rollingUpdate = 2; | ||||
| } | ||||
| 
 | ||||
| // Deployment enables declarative updates for Pods and ReplicaSets. | ||||
| message Deployment { | ||||
|   // Standard object metadata. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; | ||||
| 
 | ||||
|   // Specification of the desired behavior of the Deployment. | ||||
|   // +optional | ||||
|   optional DeploymentSpec spec = 2; | ||||
| 
 | ||||
|   // Most recently observed status of the Deployment. | ||||
|   // +optional | ||||
|   optional DeploymentStatus status = 3; | ||||
| } | ||||
| 
 | ||||
| // DeploymentCondition describes the state of a deployment at a certain point. | ||||
| message DeploymentCondition { | ||||
|   // Type of deployment condition. | ||||
|   optional string type = 1; | ||||
| 
 | ||||
|   // Status of the condition, one of True, False, Unknown. | ||||
|   optional string status = 2; | ||||
| 
 | ||||
|   // The last time this condition was updated. | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6; | ||||
| 
 | ||||
|   // Last time the condition transitioned from one status to another. | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7; | ||||
| 
 | ||||
|   // The reason for the condition's last transition. | ||||
|   optional string reason = 4; | ||||
| 
 | ||||
|   // A human readable message indicating details about the transition. | ||||
|   optional string message = 5; | ||||
| } | ||||
| 
 | ||||
| // DeploymentList is a list of Deployments. | ||||
| message DeploymentList { | ||||
|   // Standard list metadata. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; | ||||
| 
 | ||||
|   // Items is the list of Deployments. | ||||
|   repeated Deployment items = 2; | ||||
| } | ||||
| 
 | ||||
| // DeploymentSpec is the specification of the desired behavior of the Deployment. | ||||
| message DeploymentSpec { | ||||
|   // Number of desired pods. This is a pointer to distinguish between explicit | ||||
|   // zero and not specified. Defaults to 1. | ||||
|   // +optional | ||||
|   optional int32 replicas = 1; | ||||
| 
 | ||||
|   // Label selector for pods. Existing ReplicaSets whose pods are | ||||
|   // selected by this will be the ones affected by this deployment. | ||||
|   // It must match the pod template's labels. | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; | ||||
| 
 | ||||
|   // Template describes the pods that will be created. | ||||
|   optional k8s.io.api.core.v1.PodTemplateSpec template = 3; | ||||
| 
 | ||||
|   // The deployment strategy to use to replace existing pods with new ones. | ||||
|   // +optional | ||||
|   optional DeploymentStrategy strategy = 4; | ||||
| 
 | ||||
|   // Minimum number of seconds for which a newly created pod should be ready | ||||
|   // without any of its container crashing, for it to be considered available. | ||||
|   // Defaults to 0 (pod will be considered available as soon as it is ready) | ||||
|   // +optional | ||||
|   optional int32 minReadySeconds = 5; | ||||
| 
 | ||||
|   // The number of old ReplicaSets to retain to allow rollback. | ||||
|   // This is a pointer to distinguish between explicit zero and not specified. | ||||
|   // Defaults to 10. | ||||
|   // +optional | ||||
|   optional int32 revisionHistoryLimit = 6; | ||||
| 
 | ||||
|   // Indicates that the deployment is paused. | ||||
|   // +optional | ||||
|   optional bool paused = 7; | ||||
| 
 | ||||
|   // The maximum time in seconds for a deployment to make progress before it | ||||
|   // is considered to be failed. The deployment controller will continue to | ||||
|   // process failed deployments and a condition with a ProgressDeadlineExceeded | ||||
|   // reason will be surfaced in the deployment status. Note that progress will | ||||
|   // not be estimated during the time a deployment is paused. Defaults to 600s. | ||||
|   optional int32 progressDeadlineSeconds = 9; | ||||
| } | ||||
| 
 | ||||
| // DeploymentStatus is the most recently observed status of the Deployment. | ||||
| message DeploymentStatus { | ||||
|   // The generation observed by the deployment controller. | ||||
|   // +optional | ||||
|   optional int64 observedGeneration = 1; | ||||
| 
 | ||||
|   // Total number of non-terminated pods targeted by this deployment (their labels match the selector). | ||||
|   // +optional | ||||
|   optional int32 replicas = 2; | ||||
| 
 | ||||
|   // Total number of non-terminated pods targeted by this deployment that have the desired template spec. | ||||
|   // +optional | ||||
|   optional int32 updatedReplicas = 3; | ||||
| 
 | ||||
|   // Total number of ready pods targeted by this deployment. | ||||
|   // +optional | ||||
|   optional int32 readyReplicas = 7; | ||||
| 
 | ||||
|   // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. | ||||
|   // +optional | ||||
|   optional int32 availableReplicas = 4; | ||||
| 
 | ||||
|   // Total number of unavailable pods targeted by this deployment. This is the total number of | ||||
|   // pods that are still required for the deployment to have 100% available capacity. They may | ||||
|   // either be pods that are running but not yet available or pods that still have not been created. | ||||
|   // +optional | ||||
|   optional int32 unavailableReplicas = 5; | ||||
| 
 | ||||
|   // Represents the latest available observations of a deployment's current state. | ||||
|   // +patchMergeKey=type | ||||
|   // +patchStrategy=merge | ||||
|   repeated DeploymentCondition conditions = 6; | ||||
| 
 | ||||
|   // Count of hash collisions for the Deployment. The Deployment controller uses this | ||||
|   // field as a collision avoidance mechanism when it needs to create the name for the | ||||
|   // newest ReplicaSet. | ||||
|   // +optional | ||||
|   optional int32 collisionCount = 8; | ||||
| } | ||||
| 
 | ||||
| // DeploymentStrategy describes how to replace existing pods with new ones. | ||||
| message DeploymentStrategy { | ||||
|   // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. | ||||
|   // +optional | ||||
|   optional string type = 1; | ||||
| 
 | ||||
|   // Rolling update config params. Present only if DeploymentStrategyType = | ||||
|   // RollingUpdate. | ||||
|   // --- | ||||
|   // TODO: Update this to follow our convention for oneOf, whatever we decide it | ||||
|   // to be. | ||||
|   // +optional | ||||
|   optional RollingUpdateDeployment rollingUpdate = 2; | ||||
| } | ||||
| 
 | ||||
| // ReplicaSet ensures that a specified number of pod replicas are running at any given time. | ||||
| message ReplicaSet { | ||||
|   // If the Labels of a ReplicaSet are empty, they are defaulted to | ||||
|   // be the same as the Pod(s) that the ReplicaSet manages. | ||||
|   // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; | ||||
| 
 | ||||
|   // Spec defines the specification of the desired behavior of the ReplicaSet. | ||||
|   // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status | ||||
|   // +optional | ||||
|   optional ReplicaSetSpec spec = 2; | ||||
| 
 | ||||
|   // Status is the most recently observed status of the ReplicaSet. | ||||
|   // This data may be out of date by some window of time. | ||||
|   // Populated by the system. | ||||
|   // Read-only. | ||||
|   // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status | ||||
|   // +optional | ||||
|   optional ReplicaSetStatus status = 3; | ||||
| } | ||||
| 
 | ||||
| // ReplicaSetCondition describes the state of a replica set at a certain point. | ||||
| message ReplicaSetCondition { | ||||
|   // Type of replica set condition. | ||||
|   optional string type = 1; | ||||
| 
 | ||||
|   // Status of the condition, one of True, False, Unknown. | ||||
|   optional string status = 2; | ||||
| 
 | ||||
|   // The last time the condition transitioned from one status to another. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; | ||||
| 
 | ||||
|   // The reason for the condition's last transition. | ||||
|   // +optional | ||||
|   optional string reason = 4; | ||||
| 
 | ||||
|   // A human readable message indicating details about the transition. | ||||
|   // +optional | ||||
|   optional string message = 5; | ||||
| } | ||||
| 
 | ||||
| // ReplicaSetList is a collection of ReplicaSets. | ||||
| message ReplicaSetList { | ||||
|   // Standard list metadata. | ||||
|   // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; | ||||
| 
 | ||||
|   // List of ReplicaSets. | ||||
|   // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller | ||||
|   repeated ReplicaSet items = 2; | ||||
| } | ||||
| 
 | ||||
| // ReplicaSetSpec is the specification of a ReplicaSet. | ||||
| message ReplicaSetSpec { | ||||
|   // Replicas is the number of desired replicas. | ||||
|   // This is a pointer to distinguish between explicit zero and unspecified. | ||||
|   // Defaults to 1. | ||||
|   // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller | ||||
|   // +optional | ||||
|   optional int32 replicas = 1; | ||||
| 
 | ||||
|   // Minimum number of seconds for which a newly created pod should be ready | ||||
|   // without any of its container crashing, for it to be considered available. | ||||
|   // Defaults to 0 (pod will be considered available as soon as it is ready) | ||||
|   // +optional | ||||
|   optional int32 minReadySeconds = 4; | ||||
| 
 | ||||
|   // Selector is a label query over pods that should match the replica count. | ||||
|   // Label keys and values that must match in order to be controlled by this replica set. | ||||
|   // It must match the pod template's labels. | ||||
|   // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; | ||||
| 
 | ||||
|   // Template is the object that describes the pod that will be created if | ||||
|   // insufficient replicas are detected. | ||||
|   // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template | ||||
|   // +optional | ||||
|   optional k8s.io.api.core.v1.PodTemplateSpec template = 3; | ||||
| } | ||||
| 
 | ||||
| // ReplicaSetStatus represents the current status of a ReplicaSet. | ||||
| message ReplicaSetStatus { | ||||
|   // Replicas is the most recently oberved number of replicas. | ||||
|   // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller | ||||
|   optional int32 replicas = 1; | ||||
| 
 | ||||
|   // The number of pods that have labels matching the labels of the pod template of the replicaset. | ||||
|   // +optional | ||||
|   optional int32 fullyLabeledReplicas = 2; | ||||
| 
 | ||||
|   // The number of ready replicas for this replica set. | ||||
|   // +optional | ||||
|   optional int32 readyReplicas = 4; | ||||
| 
 | ||||
|   // The number of available replicas (ready for at least minReadySeconds) for this replica set. | ||||
|   // +optional | ||||
|   optional int32 availableReplicas = 5; | ||||
| 
 | ||||
|   // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. | ||||
|   // +optional | ||||
|   optional int64 observedGeneration = 3; | ||||
| 
 | ||||
|   // Represents the latest available observations of a replica set's current state. | ||||
|   // +optional | ||||
|   // +patchMergeKey=type | ||||
|   // +patchStrategy=merge | ||||
|   repeated ReplicaSetCondition conditions = 6; | ||||
| } | ||||
| 
 | ||||
| // Spec to control the desired behavior of daemon set rolling update. | ||||
| message RollingUpdateDaemonSet { | ||||
|   // The maximum number of DaemonSet pods that can be unavailable during the | ||||
|  | @ -180,3 +494,208 @@ message RollingUpdateDaemonSet { | |||
|   optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1; | ||||
| } | ||||
| 
 | ||||
| // Spec to control the desired behavior of rolling update. | ||||
| message RollingUpdateDeployment { | ||||
|   // The maximum number of pods that can be unavailable during the update. | ||||
|   // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). | ||||
|   // Absolute number is calculated from percentage by rounding down. | ||||
|   // This can not be 0 if MaxSurge is 0. | ||||
|   // Defaults to 25%. | ||||
|   // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods | ||||
|   // immediately when the rolling update starts. Once new pods are ready, old RC | ||||
|   // can be scaled down further, followed by scaling up the new RC, ensuring | ||||
|   // that the total number of pods available at all times during the update is at | ||||
|   // least 70% of desired pods. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1; | ||||
| 
 | ||||
|   // The maximum number of pods that can be scheduled above the desired number of | ||||
|   // pods. | ||||
|   // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). | ||||
|   // This can not be 0 if MaxUnavailable is 0. | ||||
|   // Absolute number is calculated from percentage by rounding up. | ||||
|   // Defaults to 25%. | ||||
|   // Example: when this is set to 30%, the new RC can be scaled up immediately when | ||||
|   // the rolling update starts, such that the total number of old and new pods do not exceed | ||||
|   // 130% of desired pods. Once old pods have been killed, | ||||
|   // new RC can be scaled up further, ensuring that total number of pods running | ||||
|   // at any time during the update is atmost 130% of desired pods. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2; | ||||
| } | ||||
| 
 | ||||
| // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. | ||||
| message RollingUpdateStatefulSetStrategy { | ||||
|   // Partition indicates the ordinal at which the StatefulSet should be | ||||
|   // partitioned. | ||||
|   // Default value is 0. | ||||
|   // +optional | ||||
|   optional int32 partition = 1; | ||||
| } | ||||
| 
 | ||||
| // StatefulSet represents a set of pods with consistent identities. | ||||
| // Identities are defined as: | ||||
| //  - Network: A single stable DNS and hostname. | ||||
| //  - Storage: As many VolumeClaims as requested. | ||||
| // The StatefulSet guarantees that a given network identity will always | ||||
| // map to the same storage identity. | ||||
| message StatefulSet { | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; | ||||
| 
 | ||||
|   // Spec defines the desired identities of pods in this set. | ||||
|   // +optional | ||||
|   optional StatefulSetSpec spec = 2; | ||||
| 
 | ||||
|   // Status is the current status of Pods in this StatefulSet. This data | ||||
|   // may be out of date by some window of time. | ||||
|   // +optional | ||||
|   optional StatefulSetStatus status = 3; | ||||
| } | ||||
| 
 | ||||
| // StatefulSetCondition describes the state of a statefulset at a certain point. | ||||
| message StatefulSetCondition { | ||||
|   // Type of statefulset condition. | ||||
|   optional string type = 1; | ||||
| 
 | ||||
|   // Status of the condition, one of True, False, Unknown. | ||||
|   optional string status = 2; | ||||
| 
 | ||||
|   // Last time the condition transitioned from one status to another. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; | ||||
| 
 | ||||
|   // The reason for the condition's last transition. | ||||
|   // +optional | ||||
|   optional string reason = 4; | ||||
| 
 | ||||
|   // A human readable message indicating details about the transition. | ||||
|   // +optional | ||||
|   optional string message = 5; | ||||
| } | ||||
| 
 | ||||
| // StatefulSetList is a collection of StatefulSets. | ||||
| message StatefulSetList { | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; | ||||
| 
 | ||||
|   repeated StatefulSet items = 2; | ||||
| } | ||||
| 
 | ||||
| // A StatefulSetSpec is the specification of a StatefulSet. | ||||
| message StatefulSetSpec { | ||||
|   // replicas is the desired number of replicas of the given Template. | ||||
|   // These are replicas in the sense that they are instantiations of the | ||||
|   // same Template, but individual replicas also have a consistent identity. | ||||
|   // If unspecified, defaults to 1. | ||||
|   // TODO: Consider a rename of this field. | ||||
|   // +optional | ||||
|   optional int32 replicas = 1; | ||||
| 
 | ||||
|   // selector is a label query over pods that should match the replica count. | ||||
|   // It must match the pod template's labels. | ||||
|   // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; | ||||
| 
 | ||||
|   // template is the object that describes the pod that will be created if | ||||
|   // insufficient replicas are detected. Each pod stamped out by the StatefulSet | ||||
|   // will fulfill this Template, but have a unique identity from the rest | ||||
|   // of the StatefulSet. | ||||
|   optional k8s.io.api.core.v1.PodTemplateSpec template = 3; | ||||
| 
 | ||||
|   // volumeClaimTemplates is a list of claims that pods are allowed to reference. | ||||
|   // The StatefulSet controller is responsible for mapping network identities to | ||||
|   // claims in a way that maintains the identity of a pod. Every claim in | ||||
|   // this list must have at least one matching (by name) volumeMount in one | ||||
|   // container in the template. A claim in this list takes precedence over | ||||
|   // any volumes in the template, with the same name. | ||||
|   // TODO: Define the behavior if a claim already exists with the same name. | ||||
|   // +optional | ||||
|   repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4; | ||||
| 
 | ||||
|   // serviceName is the name of the service that governs this StatefulSet. | ||||
|   // This service must exist before the StatefulSet, and is responsible for | ||||
|   // the network identity of the set. Pods get DNS/hostnames that follow the | ||||
|   // pattern: pod-specific-string.serviceName.default.svc.cluster.local | ||||
|   // where "pod-specific-string" is managed by the StatefulSet controller. | ||||
|   optional string serviceName = 5; | ||||
| 
 | ||||
|   // podManagementPolicy controls how pods are created during initial scale up, | ||||
|   // when replacing pods on nodes, or when scaling down. The default policy is | ||||
|   // `OrderedReady`, where pods are created in increasing order (pod-0, then | ||||
|   // pod-1, etc) and the controller will wait until each pod is ready before | ||||
|   // continuing. When scaling down, the pods are removed in the opposite order. | ||||
|   // The alternative policy is `Parallel` which will create pods in parallel | ||||
|   // to match the desired scale without waiting, and on scale down will delete | ||||
|   // all pods at once. | ||||
|   // +optional | ||||
|   optional string podManagementPolicy = 6; | ||||
| 
 | ||||
|   // updateStrategy indicates the StatefulSetUpdateStrategy that will be | ||||
|   // employed to update Pods in the StatefulSet when a revision is made to | ||||
|   // Template. | ||||
|   optional StatefulSetUpdateStrategy updateStrategy = 7; | ||||
| 
 | ||||
|   // revisionHistoryLimit is the maximum number of revisions that will | ||||
|   // be maintained in the StatefulSet's revision history. The revision history | ||||
|   // consists of all revisions not represented by a currently applied | ||||
|   // StatefulSetSpec version. The default value is 10. | ||||
|   optional int32 revisionHistoryLimit = 8; | ||||
| } | ||||
| 
 | ||||
| // StatefulSetStatus represents the current state of a StatefulSet. | ||||
| message StatefulSetStatus { | ||||
|   // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the | ||||
|   // StatefulSet's generation, which is updated on mutation by the API Server. | ||||
|   // +optional | ||||
|   optional int64 observedGeneration = 1; | ||||
| 
 | ||||
|   // replicas is the number of Pods created by the StatefulSet controller. | ||||
|   optional int32 replicas = 2; | ||||
| 
 | ||||
|   // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. | ||||
|   optional int32 readyReplicas = 3; | ||||
| 
 | ||||
|   // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version | ||||
|   // indicated by currentRevision. | ||||
|   optional int32 currentReplicas = 4; | ||||
| 
 | ||||
|   // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version | ||||
|   // indicated by updateRevision. | ||||
|   optional int32 updatedReplicas = 5; | ||||
| 
 | ||||
|   // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the | ||||
|   // sequence [0,currentReplicas). | ||||
|   optional string currentRevision = 6; | ||||
| 
 | ||||
|   // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence | ||||
|   // [replicas-updatedReplicas,replicas) | ||||
|   optional string updateRevision = 7; | ||||
| 
 | ||||
|   // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller | ||||
|   // uses this field as a collision avoidance mechanism when it needs to create the name for the | ||||
|   // newest ControllerRevision. | ||||
|   // +optional | ||||
|   optional int32 collisionCount = 9; | ||||
| 
 | ||||
|   // Represents the latest available observations of a statefulset's current state. | ||||
|   // +optional | ||||
|   // +patchMergeKey=type | ||||
|   // +patchStrategy=merge | ||||
|   repeated StatefulSetCondition conditions = 10; | ||||
| } | ||||
| 
 | ||||
| // StatefulSetUpdateStrategy indicates the strategy that the StatefulSet | ||||
| // controller will use to perform updates. It includes any additional parameters | ||||
| // necessary to perform the update for the indicated strategy. | ||||
| message StatefulSetUpdateStrategy { | ||||
|   // Type indicates the type of the StatefulSetUpdateStrategy. | ||||
|   // Default is RollingUpdate. | ||||
|   // +optional | ||||
|   optional string type = 1; | ||||
| 
 | ||||
|   // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. | ||||
|   // +optional | ||||
|   optional RollingUpdateStatefulSetStrategy rollingUpdate = 2; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -41,11 +41,19 @@ var ( | |||
| 	AddToScheme        = localSchemeBuilder.AddToScheme | ||||
| ) | ||||
| 
 | ||||
| // Adds the list of known types to api.Scheme.
 | ||||
| // Adds the list of known types to the given scheme.
 | ||||
| func addKnownTypes(scheme *runtime.Scheme) error { | ||||
| 	scheme.AddKnownTypes(SchemeGroupVersion, | ||||
| 		&Deployment{}, | ||||
| 		&DeploymentList{}, | ||||
| 		&StatefulSet{}, | ||||
| 		&StatefulSetList{}, | ||||
| 		&DaemonSet{}, | ||||
| 		&DaemonSetList{}, | ||||
| 		&ReplicaSet{}, | ||||
| 		&ReplicaSetList{}, | ||||
| 		&ControllerRevision{}, | ||||
| 		&ControllerRevisionList{}, | ||||
| 	) | ||||
| 	metav1.AddToGroupVersion(scheme, SchemeGroupVersion) | ||||
| 	return nil | ||||
|  |  | |||
|  | @ -19,14 +19,440 @@ package v1 | |||
| import ( | ||||
| 	"k8s.io/api/core/v1" | ||||
| 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
| 	runtime "k8s.io/apimachinery/pkg/runtime" | ||||
| 	"k8s.io/apimachinery/pkg/util/intstr" | ||||
| ) | ||||
| 
 | ||||
| const ( | ||||
| 	ControllerRevisionHashLabelKey = "controller-revision-hash" | ||||
| 	StatefulSetRevisionLabel       = ControllerRevisionHashLabelKey | ||||
| 	DeprecatedRollbackTo           = "deprecated.deployment.rollback.to" | ||||
| 	DeprecatedTemplateGeneration   = "deprecated.daemonset.template.generation" | ||||
| 	StatefulSetPodNameLabel        = "statefulset.kubernetes.io/pod-name" | ||||
| ) | ||||
| 
 | ||||
| // +genclient
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // StatefulSet represents a set of pods with consistent identities.
 | ||||
| // Identities are defined as:
 | ||||
| //  - Network: A single stable DNS and hostname.
 | ||||
| //  - Storage: As many VolumeClaims as requested.
 | ||||
| // The StatefulSet guarantees that a given network identity will always
 | ||||
| // map to the same storage identity.
 | ||||
| type StatefulSet struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// +optional
 | ||||
| 	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 
 | ||||
| 	// Spec defines the desired identities of pods in this set.
 | ||||
| 	// +optional
 | ||||
| 	Spec StatefulSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` | ||||
| 
 | ||||
| 	// Status is the current status of Pods in this StatefulSet. This data
 | ||||
| 	// may be out of date by some window of time.
 | ||||
| 	// +optional
 | ||||
| 	Status StatefulSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` | ||||
| } | ||||
| 
 | ||||
| // PodManagementPolicyType defines the policy for creating pods under a stateful set.
 | ||||
| type PodManagementPolicyType string | ||||
| 
 | ||||
| const ( | ||||
| 	// OrderedReadyPodManagement will create pods in strictly increasing order on
 | ||||
| 	// scale up and strictly decreasing order on scale down, progressing only when
 | ||||
| 	// the previous pod is ready or terminated. At most one pod will be changed
 | ||||
| 	// at any time.
 | ||||
| 	OrderedReadyPodManagement PodManagementPolicyType = "OrderedReady" | ||||
| 	// ParallelPodManagement will create and delete pods as soon as the stateful set
 | ||||
| 	// replica count is changed, and will not wait for pods to be ready or complete
 | ||||
| 	// termination.
 | ||||
| 	ParallelPodManagement = "Parallel" | ||||
| ) | ||||
| 
 | ||||
| // StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
 | ||||
| // controller will use to perform updates. It includes any additional parameters
 | ||||
| // necessary to perform the update for the indicated strategy.
 | ||||
| type StatefulSetUpdateStrategy struct { | ||||
| 	// Type indicates the type of the StatefulSetUpdateStrategy.
 | ||||
| 	// Default is RollingUpdate.
 | ||||
| 	// +optional
 | ||||
| 	Type StatefulSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetStrategyType"` | ||||
| 	// RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
 | ||||
| 	// +optional
 | ||||
| 	RollingUpdate *RollingUpdateStatefulSetStrategy `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"` | ||||
| } | ||||
| 
 | ||||
| // StatefulSetUpdateStrategyType is a string enumeration type that enumerates
 | ||||
| // all possible update strategies for the StatefulSet controller.
 | ||||
| type StatefulSetUpdateStrategyType string | ||||
| 
 | ||||
| const ( | ||||
| 	// RollingUpdateStatefulSetStrategyType indicates that update will be
 | ||||
| 	// applied to all Pods in the StatefulSet with respect to the StatefulSet
 | ||||
| 	// ordering constraints. When a scale operation is performed with this
 | ||||
| 	// strategy, new Pods will be created from the specification version indicated
 | ||||
| 	// by the StatefulSet's updateRevision.
 | ||||
| 	RollingUpdateStatefulSetStrategyType = "RollingUpdate" | ||||
| 	// OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version
 | ||||
| 	// tracking and ordered rolling restarts are disabled. Pods are recreated
 | ||||
| 	// from the StatefulSetSpec when they are manually deleted. When a scale
 | ||||
| 	// operation is performed with this strategy,specification version indicated
 | ||||
| 	// by the StatefulSet's currentRevision.
 | ||||
| 	OnDeleteStatefulSetStrategyType = "OnDelete" | ||||
| ) | ||||
| 
 | ||||
| // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
 | ||||
| type RollingUpdateStatefulSetStrategy struct { | ||||
| 	// Partition indicates the ordinal at which the StatefulSet should be
 | ||||
| 	// partitioned.
 | ||||
| 	// Default value is 0.
 | ||||
| 	// +optional
 | ||||
| 	Partition *int32 `json:"partition,omitempty" protobuf:"varint,1,opt,name=partition"` | ||||
| } | ||||
| 
 | ||||
| // A StatefulSetSpec is the specification of a StatefulSet.
 | ||||
| type StatefulSetSpec struct { | ||||
| 	// replicas is the desired number of replicas of the given Template.
 | ||||
| 	// These are replicas in the sense that they are instantiations of the
 | ||||
| 	// same Template, but individual replicas also have a consistent identity.
 | ||||
| 	// If unspecified, defaults to 1.
 | ||||
| 	// TODO: Consider a rename of this field.
 | ||||
| 	// +optional
 | ||||
| 	Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` | ||||
| 
 | ||||
| 	// selector is a label query over pods that should match the replica count.
 | ||||
| 	// It must match the pod template's labels.
 | ||||
| 	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
 | ||||
| 	Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"` | ||||
| 
 | ||||
| 	// template is the object that describes the pod that will be created if
 | ||||
| 	// insufficient replicas are detected. Each pod stamped out by the StatefulSet
 | ||||
| 	// will fulfill this Template, but have a unique identity from the rest
 | ||||
| 	// of the StatefulSet.
 | ||||
| 	Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"` | ||||
| 
 | ||||
| 	// volumeClaimTemplates is a list of claims that pods are allowed to reference.
 | ||||
| 	// The StatefulSet controller is responsible for mapping network identities to
 | ||||
| 	// claims in a way that maintains the identity of a pod. Every claim in
 | ||||
| 	// this list must have at least one matching (by name) volumeMount in one
 | ||||
| 	// container in the template. A claim in this list takes precedence over
 | ||||
| 	// any volumes in the template, with the same name.
 | ||||
| 	// TODO: Define the behavior if a claim already exists with the same name.
 | ||||
| 	// +optional
 | ||||
| 	VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"` | ||||
| 
 | ||||
| 	// serviceName is the name of the service that governs this StatefulSet.
 | ||||
| 	// This service must exist before the StatefulSet, and is responsible for
 | ||||
| 	// the network identity of the set. Pods get DNS/hostnames that follow the
 | ||||
| 	// pattern: pod-specific-string.serviceName.default.svc.cluster.local
 | ||||
| 	// where "pod-specific-string" is managed by the StatefulSet controller.
 | ||||
| 	ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"` | ||||
| 
 | ||||
| 	// podManagementPolicy controls how pods are created during initial scale up,
 | ||||
| 	// when replacing pods on nodes, or when scaling down. The default policy is
 | ||||
| 	// `OrderedReady`, where pods are created in increasing order (pod-0, then
 | ||||
| 	// pod-1, etc) and the controller will wait until each pod is ready before
 | ||||
| 	// continuing. When scaling down, the pods are removed in the opposite order.
 | ||||
| 	// The alternative policy is `Parallel` which will create pods in parallel
 | ||||
| 	// to match the desired scale without waiting, and on scale down will delete
 | ||||
| 	// all pods at once.
 | ||||
| 	// +optional
 | ||||
| 	PodManagementPolicy PodManagementPolicyType `json:"podManagementPolicy,omitempty" protobuf:"bytes,6,opt,name=podManagementPolicy,casttype=PodManagementPolicyType"` | ||||
| 
 | ||||
| 	// updateStrategy indicates the StatefulSetUpdateStrategy that will be
 | ||||
| 	// employed to update Pods in the StatefulSet when a revision is made to
 | ||||
| 	// Template.
 | ||||
| 	UpdateStrategy StatefulSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,7,opt,name=updateStrategy"` | ||||
| 
 | ||||
| 	// revisionHistoryLimit is the maximum number of revisions that will
 | ||||
| 	// be maintained in the StatefulSet's revision history. The revision history
 | ||||
| 	// consists of all revisions not represented by a currently applied
 | ||||
| 	// StatefulSetSpec version. The default value is 10.
 | ||||
| 	RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,8,opt,name=revisionHistoryLimit"` | ||||
| } | ||||
| 
 | ||||
| // StatefulSetStatus represents the current state of a StatefulSet.
 | ||||
| type StatefulSetStatus struct { | ||||
| 	// observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
 | ||||
| 	// StatefulSet's generation, which is updated on mutation by the API Server.
 | ||||
| 	// +optional
 | ||||
| 	ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` | ||||
| 
 | ||||
| 	// replicas is the number of Pods created by the StatefulSet controller.
 | ||||
| 	Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"` | ||||
| 
 | ||||
| 	// readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
 | ||||
| 	ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,3,opt,name=readyReplicas"` | ||||
| 
 | ||||
| 	// currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
 | ||||
| 	// indicated by currentRevision.
 | ||||
| 	CurrentReplicas int32 `json:"currentReplicas,omitempty" protobuf:"varint,4,opt,name=currentReplicas"` | ||||
| 
 | ||||
| 	// updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
 | ||||
| 	// indicated by updateRevision.
 | ||||
| 	UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,5,opt,name=updatedReplicas"` | ||||
| 
 | ||||
| 	// currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
 | ||||
| 	// sequence [0,currentReplicas).
 | ||||
| 	CurrentRevision string `json:"currentRevision,omitempty" protobuf:"bytes,6,opt,name=currentRevision"` | ||||
| 
 | ||||
| 	// updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
 | ||||
| 	// [replicas-updatedReplicas,replicas)
 | ||||
| 	UpdateRevision string `json:"updateRevision,omitempty" protobuf:"bytes,7,opt,name=updateRevision"` | ||||
| 
 | ||||
| 	// collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
 | ||||
| 	// uses this field as a collision avoidance mechanism when it needs to create the name for the
 | ||||
| 	// newest ControllerRevision.
 | ||||
| 	// +optional
 | ||||
| 	CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"` | ||||
| 
 | ||||
| 	// Represents the latest available observations of a statefulset's current state.
 | ||||
| 	// +optional
 | ||||
| 	// +patchMergeKey=type
 | ||||
| 	// +patchStrategy=merge
 | ||||
| 	Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` | ||||
| } | ||||
| 
 | ||||
| type StatefulSetConditionType string | ||||
| 
 | ||||
| // StatefulSetCondition describes the state of a statefulset at a certain point.
 | ||||
| type StatefulSetCondition struct { | ||||
| 	// Type of statefulset condition.
 | ||||
| 	Type StatefulSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetConditionType"` | ||||
| 	// Status of the condition, one of True, False, Unknown.
 | ||||
| 	Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` | ||||
| 	// Last time the condition transitioned from one status to another.
 | ||||
| 	// +optional
 | ||||
| 	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` | ||||
| 	// The reason for the condition's last transition.
 | ||||
| 	// +optional
 | ||||
| 	Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` | ||||
| 	// A human readable message indicating details about the transition.
 | ||||
| 	// +optional
 | ||||
| 	Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` | ||||
| } | ||||
| 
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // StatefulSetList is a collection of StatefulSets.
 | ||||
| type StatefulSetList struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// +optional
 | ||||
| 	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 	Items           []StatefulSet `json:"items" protobuf:"bytes,2,rep,name=items"` | ||||
| } | ||||
| 
 | ||||
| // +genclient
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // Deployment enables declarative updates for Pods and ReplicaSets.
 | ||||
| type Deployment struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// Standard object metadata.
 | ||||
| 	// +optional
 | ||||
| 	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 
 | ||||
| 	// Specification of the desired behavior of the Deployment.
 | ||||
| 	// +optional
 | ||||
| 	Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` | ||||
| 
 | ||||
| 	// Most recently observed status of the Deployment.
 | ||||
| 	// +optional
 | ||||
| 	Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` | ||||
| } | ||||
| 
 | ||||
| // DeploymentSpec is the specification of the desired behavior of the Deployment.
 | ||||
| type DeploymentSpec struct { | ||||
| 	// Number of desired pods. This is a pointer to distinguish between explicit
 | ||||
| 	// zero and not specified. Defaults to 1.
 | ||||
| 	// +optional
 | ||||
| 	Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` | ||||
| 
 | ||||
| 	// Label selector for pods. Existing ReplicaSets whose pods are
 | ||||
| 	// selected by this will be the ones affected by this deployment.
 | ||||
| 	// It must match the pod template's labels.
 | ||||
| 	Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"` | ||||
| 
 | ||||
| 	// Template describes the pods that will be created.
 | ||||
| 	Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"` | ||||
| 
 | ||||
| 	// The deployment strategy to use to replace existing pods with new ones.
 | ||||
| 	// +optional
 | ||||
| 	Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"` | ||||
| 
 | ||||
| 	// Minimum number of seconds for which a newly created pod should be ready
 | ||||
| 	// without any of its container crashing, for it to be considered available.
 | ||||
| 	// Defaults to 0 (pod will be considered available as soon as it is ready)
 | ||||
| 	// +optional
 | ||||
| 	MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"` | ||||
| 
 | ||||
| 	// The number of old ReplicaSets to retain to allow rollback.
 | ||||
| 	// This is a pointer to distinguish between explicit zero and not specified.
 | ||||
| 	// Defaults to 10.
 | ||||
| 	// +optional
 | ||||
| 	RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"` | ||||
| 
 | ||||
| 	// Indicates that the deployment is paused.
 | ||||
| 	// +optional
 | ||||
| 	Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"` | ||||
| 
 | ||||
| 	// The maximum time in seconds for a deployment to make progress before it
 | ||||
| 	// is considered to be failed. The deployment controller will continue to
 | ||||
| 	// process failed deployments and a condition with a ProgressDeadlineExceeded
 | ||||
| 	// reason will be surfaced in the deployment status. Note that progress will
 | ||||
| 	// not be estimated during the time a deployment is paused. Defaults to 600s.
 | ||||
| 	ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"` | ||||
| } | ||||
| 
 | ||||
| const ( | ||||
| 	// DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
 | ||||
| 	// to existing RCs (and label key that is added to its pods) to prevent the existing RCs
 | ||||
| 	// to select new pods (and old pods being select by new RC).
 | ||||
| 	DefaultDeploymentUniqueLabelKey string = "pod-template-hash" | ||||
| ) | ||||
| 
 | ||||
| // DeploymentStrategy describes how to replace existing pods with new ones.
 | ||||
| type DeploymentStrategy struct { | ||||
| 	// Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
 | ||||
| 	// +optional
 | ||||
| 	Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"` | ||||
| 
 | ||||
| 	// Rolling update config params. Present only if DeploymentStrategyType =
 | ||||
| 	// RollingUpdate.
 | ||||
| 	//---
 | ||||
| 	// TODO: Update this to follow our convention for oneOf, whatever we decide it
 | ||||
| 	// to be.
 | ||||
| 	// +optional
 | ||||
| 	RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"` | ||||
| } | ||||
| 
 | ||||
| type DeploymentStrategyType string | ||||
| 
 | ||||
| const ( | ||||
| 	// Kill all existing pods before creating new ones.
 | ||||
| 	RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate" | ||||
| 
 | ||||
| 	// Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
 | ||||
| 	RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate" | ||||
| ) | ||||
| 
 | ||||
| // Spec to control the desired behavior of rolling update.
 | ||||
| type RollingUpdateDeployment struct { | ||||
| 	// The maximum number of pods that can be unavailable during the update.
 | ||||
| 	// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
 | ||||
| 	// Absolute number is calculated from percentage by rounding down.
 | ||||
| 	// This can not be 0 if MaxSurge is 0.
 | ||||
| 	// Defaults to 25%.
 | ||||
| 	// Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
 | ||||
| 	// immediately when the rolling update starts. Once new pods are ready, old RC
 | ||||
| 	// can be scaled down further, followed by scaling up the new RC, ensuring
 | ||||
| 	// that the total number of pods available at all times during the update is at
 | ||||
| 	// least 70% of desired pods.
 | ||||
| 	// +optional
 | ||||
| 	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"` | ||||
| 
 | ||||
| 	// The maximum number of pods that can be scheduled above the desired number of
 | ||||
| 	// pods.
 | ||||
| 	// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
 | ||||
| 	// This can not be 0 if MaxUnavailable is 0.
 | ||||
| 	// Absolute number is calculated from percentage by rounding up.
 | ||||
| 	// Defaults to 25%.
 | ||||
| 	// Example: when this is set to 30%, the new RC can be scaled up immediately when
 | ||||
| 	// the rolling update starts, such that the total number of old and new pods do not exceed
 | ||||
| 	// 130% of desired pods. Once old pods have been killed,
 | ||||
| 	// new RC can be scaled up further, ensuring that total number of pods running
 | ||||
| 	// at any time during the update is atmost 130% of desired pods.
 | ||||
| 	// +optional
 | ||||
| 	MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"` | ||||
| } | ||||
| 
 | ||||
| // DeploymentStatus is the most recently observed status of the Deployment.
 | ||||
| type DeploymentStatus struct { | ||||
| 	// The generation observed by the deployment controller.
 | ||||
| 	// +optional
 | ||||
| 	ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` | ||||
| 
 | ||||
| 	// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
 | ||||
| 	// +optional
 | ||||
| 	Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"` | ||||
| 
 | ||||
| 	// Total number of non-terminated pods targeted by this deployment that have the desired template spec.
 | ||||
| 	// +optional
 | ||||
| 	UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"` | ||||
| 
 | ||||
| 	// Total number of ready pods targeted by this deployment.
 | ||||
| 	// +optional
 | ||||
| 	ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"` | ||||
| 
 | ||||
| 	// Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
 | ||||
| 	// +optional
 | ||||
| 	AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"` | ||||
| 
 | ||||
| 	// Total number of unavailable pods targeted by this deployment. This is the total number of
 | ||||
| 	// pods that are still required for the deployment to have 100% available capacity. They may
 | ||||
| 	// either be pods that are running but not yet available or pods that still have not been created.
 | ||||
| 	// +optional
 | ||||
| 	UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` | ||||
| 
 | ||||
| 	// Represents the latest available observations of a deployment's current state.
 | ||||
| 	// +patchMergeKey=type
 | ||||
| 	// +patchStrategy=merge
 | ||||
| 	Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` | ||||
| 
 | ||||
| 	// Count of hash collisions for the Deployment. The Deployment controller uses this
 | ||||
| 	// field as a collision avoidance mechanism when it needs to create the name for the
 | ||||
| 	// newest ReplicaSet.
 | ||||
| 	// +optional
 | ||||
| 	CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,8,opt,name=collisionCount"` | ||||
| } | ||||
| 
 | ||||
| type DeploymentConditionType string | ||||
| 
 | ||||
| // These are valid conditions of a deployment.
 | ||||
| const ( | ||||
| 	// Available means the deployment is available, ie. at least the minimum available
 | ||||
| 	// replicas required are up and running for at least minReadySeconds.
 | ||||
| 	DeploymentAvailable DeploymentConditionType = "Available" | ||||
| 	// Progressing means the deployment is progressing. Progress for a deployment is
 | ||||
| 	// considered when a new replica set is created or adopted, and when new pods scale
 | ||||
| 	// up or old pods scale down. Progress is not estimated for paused deployments or
 | ||||
| 	// when progressDeadlineSeconds is not specified.
 | ||||
| 	DeploymentProgressing DeploymentConditionType = "Progressing" | ||||
| 	// ReplicaFailure is added in a deployment when one of its pods fails to be created
 | ||||
| 	// or deleted.
 | ||||
| 	DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure" | ||||
| ) | ||||
| 
 | ||||
| // DeploymentCondition describes the state of a deployment at a certain point.
 | ||||
| type DeploymentCondition struct { | ||||
| 	// Type of deployment condition.
 | ||||
| 	Type DeploymentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentConditionType"` | ||||
| 	// Status of the condition, one of True, False, Unknown.
 | ||||
| 	Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` | ||||
| 	// The last time this condition was updated.
 | ||||
| 	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"` | ||||
| 	// Last time the condition transitioned from one status to another.
 | ||||
| 	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,7,opt,name=lastTransitionTime"` | ||||
| 	// The reason for the condition's last transition.
 | ||||
| 	Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` | ||||
| 	// A human readable message indicating details about the transition.
 | ||||
| 	Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` | ||||
| } | ||||
| 
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // DeploymentList is a list of Deployments.
 | ||||
| type DeploymentList struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// Standard list metadata.
 | ||||
| 	// +optional
 | ||||
| 	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 
 | ||||
| 	// Items is the list of Deployments.
 | ||||
| 	Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"` | ||||
| } | ||||
| 
 | ||||
| // DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
 | ||||
| type DaemonSetUpdateStrategy struct { | ||||
| 	// Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
 | ||||
|  | @ -76,10 +502,9 @@ type RollingUpdateDaemonSet struct { | |||
| type DaemonSetSpec struct { | ||||
| 	// A label query over pods that are managed by the daemon set.
 | ||||
| 	// Must match in order to be controlled.
 | ||||
| 	// If empty, defaulted to labels on Pod template.
 | ||||
| 	// It must match the pod template's labels.
 | ||||
| 	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
 | ||||
| 	// +optional
 | ||||
| 	Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"` | ||||
| 	Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,1,opt,name=selector"` | ||||
| 
 | ||||
| 	// An object that describes the pod that will be created.
 | ||||
| 	// The DaemonSet will create exactly one copy of this pod on every node
 | ||||
|  | @ -152,6 +577,33 @@ type DaemonSetStatus struct { | |||
| 	// create the name for the newest ControllerRevision.
 | ||||
| 	// +optional
 | ||||
| 	CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"` | ||||
| 
 | ||||
| 	// Represents the latest available observations of a DaemonSet's current state.
 | ||||
| 	// +optional
 | ||||
| 	// +patchMergeKey=type
 | ||||
| 	// +patchStrategy=merge
 | ||||
| 	Conditions []DaemonSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` | ||||
| } | ||||
| 
 | ||||
| type DaemonSetConditionType string | ||||
| 
 | ||||
| // TODO: Add valid condition types of a DaemonSet.
 | ||||
| 
 | ||||
| // DaemonSetCondition describes the state of a DaemonSet at a certain point.
 | ||||
| type DaemonSetCondition struct { | ||||
| 	// Type of DaemonSet condition.
 | ||||
| 	Type DaemonSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DaemonSetConditionType"` | ||||
| 	// Status of the condition, one of True, False, Unknown.
 | ||||
| 	Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` | ||||
| 	// Last time the condition transitioned from one status to another.
 | ||||
| 	// +optional
 | ||||
| 	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` | ||||
| 	// The reason for the condition's last transition.
 | ||||
| 	// +optional
 | ||||
| 	Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` | ||||
| 	// A human readable message indicating details about the transition.
 | ||||
| 	// +optional
 | ||||
| 	Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` | ||||
| } | ||||
| 
 | ||||
| // +genclient
 | ||||
|  | @ -199,3 +651,169 @@ type DaemonSetList struct { | |||
| 	// A list of daemon sets.
 | ||||
| 	Items []DaemonSet `json:"items" protobuf:"bytes,2,rep,name=items"` | ||||
| } | ||||
| 
 | ||||
| // +genclient
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // ReplicaSet ensures that a specified number of pod replicas are running at any given time.
 | ||||
| type ReplicaSet struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 
 | ||||
| 	// If the Labels of a ReplicaSet are empty, they are defaulted to
 | ||||
| 	// be the same as the Pod(s) that the ReplicaSet manages.
 | ||||
| 	// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
 | ||||
| 	// +optional
 | ||||
| 	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 
 | ||||
| 	// Spec defines the specification of the desired behavior of the ReplicaSet.
 | ||||
| 	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
 | ||||
| 	// +optional
 | ||||
| 	Spec ReplicaSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` | ||||
| 
 | ||||
| 	// Status is the most recently observed status of the ReplicaSet.
 | ||||
| 	// This data may be out of date by some window of time.
 | ||||
| 	// Populated by the system.
 | ||||
| 	// Read-only.
 | ||||
| 	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
 | ||||
| 	// +optional
 | ||||
| 	Status ReplicaSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` | ||||
| } | ||||
| 
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // ReplicaSetList is a collection of ReplicaSets.
 | ||||
| type ReplicaSetList struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// Standard list metadata.
 | ||||
| 	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
 | ||||
| 	// +optional
 | ||||
| 	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 
 | ||||
| 	// List of ReplicaSets.
 | ||||
| 	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
 | ||||
| 	Items []ReplicaSet `json:"items" protobuf:"bytes,2,rep,name=items"` | ||||
| } | ||||
| 
 | ||||
| // ReplicaSetSpec is the specification of a ReplicaSet.
 | ||||
| type ReplicaSetSpec struct { | ||||
| 	// Replicas is the number of desired replicas.
 | ||||
| 	// This is a pointer to distinguish between explicit zero and unspecified.
 | ||||
| 	// Defaults to 1.
 | ||||
| 	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
 | ||||
| 	// +optional
 | ||||
| 	Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` | ||||
| 
 | ||||
| 	// Minimum number of seconds for which a newly created pod should be ready
 | ||||
| 	// without any of its container crashing, for it to be considered available.
 | ||||
| 	// Defaults to 0 (pod will be considered available as soon as it is ready)
 | ||||
| 	// +optional
 | ||||
| 	MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"` | ||||
| 
 | ||||
| 	// Selector is a label query over pods that should match the replica count.
 | ||||
| 	// Label keys and values that must match in order to be controlled by this replica set.
 | ||||
| 	// It must match the pod template's labels.
 | ||||
| 	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
 | ||||
| 	Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"` | ||||
| 
 | ||||
| 	// Template is the object that describes the pod that will be created if
 | ||||
| 	// insufficient replicas are detected.
 | ||||
| 	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
 | ||||
| 	// +optional
 | ||||
| 	Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"` | ||||
| } | ||||
| 
 | ||||
| // ReplicaSetStatus represents the current status of a ReplicaSet.
 | ||||
| type ReplicaSetStatus struct { | ||||
| 	// Replicas is the most recently oberved number of replicas.
 | ||||
| 	// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
 | ||||
| 	Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"` | ||||
| 
 | ||||
| 	// The number of pods that have labels matching the labels of the pod template of the replicaset.
 | ||||
| 	// +optional
 | ||||
| 	FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"` | ||||
| 
 | ||||
| 	// The number of ready replicas for this replica set.
 | ||||
| 	// +optional
 | ||||
| 	ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"` | ||||
| 
 | ||||
| 	// The number of available replicas (ready for at least minReadySeconds) for this replica set.
 | ||||
| 	// +optional
 | ||||
| 	AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"` | ||||
| 
 | ||||
| 	// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
 | ||||
| 	// +optional
 | ||||
| 	ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` | ||||
| 
 | ||||
| 	// Represents the latest available observations of a replica set's current state.
 | ||||
| 	// +optional
 | ||||
| 	// +patchMergeKey=type
 | ||||
| 	// +patchStrategy=merge
 | ||||
| 	Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` | ||||
| } | ||||
| 
 | ||||
| type ReplicaSetConditionType string | ||||
| 
 | ||||
| // These are valid conditions of a replica set.
 | ||||
| const ( | ||||
| 	// ReplicaSetReplicaFailure is added in a replica set when one of its pods fails to be created
 | ||||
| 	// due to insufficient quota, limit ranges, pod security policy, node selectors, etc. or deleted
 | ||||
| 	// due to kubelet being down or finalizers are failing.
 | ||||
| 	ReplicaSetReplicaFailure ReplicaSetConditionType = "ReplicaFailure" | ||||
| ) | ||||
| 
 | ||||
| // ReplicaSetCondition describes the state of a replica set at a certain point.
 | ||||
| type ReplicaSetCondition struct { | ||||
| 	// Type of replica set condition.
 | ||||
| 	Type ReplicaSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ReplicaSetConditionType"` | ||||
| 	// Status of the condition, one of True, False, Unknown.
 | ||||
| 	Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` | ||||
| 	// The last time the condition transitioned from one status to another.
 | ||||
| 	// +optional
 | ||||
| 	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` | ||||
| 	// The reason for the condition's last transition.
 | ||||
| 	// +optional
 | ||||
| 	Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` | ||||
| 	// A human readable message indicating details about the transition.
 | ||||
| 	// +optional
 | ||||
| 	Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` | ||||
| } | ||||
| 
 | ||||
| // +genclient
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // ControllerRevision implements an immutable snapshot of state data. Clients
 | ||||
| // are responsible for serializing and deserializing the objects that contain
 | ||||
| // their internal state.
 | ||||
| // Once a ControllerRevision has been successfully created, it can not be updated.
 | ||||
| // The API Server will fail validation of all requests that attempt to mutate
 | ||||
| // the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
 | ||||
| // the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
 | ||||
| // it may be subject to name and representation changes in future releases, and clients should not
 | ||||
| // depend on its stability. It is primarily for internal use by controllers.
 | ||||
| type ControllerRevision struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 	// Standard object's metadata.
 | ||||
| 	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
 | ||||
| 	// +optional
 | ||||
| 	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 
 | ||||
| 	// Data is the serialized representation of the state.
 | ||||
| 	Data runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"` | ||||
| 
 | ||||
| 	// Revision indicates the revision of the state represented by Data.
 | ||||
| 	Revision int64 `json:"revision" protobuf:"varint,3,opt,name=revision"` | ||||
| } | ||||
| 
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // ControllerRevisionList is a resource containing a list of ControllerRevision objects.
 | ||||
| type ControllerRevisionList struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
| 
 | ||||
| 	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
 | ||||
| 	// +optional
 | ||||
| 	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` | ||||
| 
 | ||||
| 	// Items is the list of ControllerRevisions
 | ||||
| 	Items []ControllerRevision `json:"items" protobuf:"bytes,2,rep,name=items"` | ||||
| } | ||||
|  |  | |||
|  | @ -27,6 +27,27 @@ package v1 | |||
| // Those methods can be generated by using hack/update-generated-swagger-docs.sh
 | ||||
| 
 | ||||
| // AUTO-GENERATED FUNCTIONS START HERE
 | ||||
| var map_ControllerRevision = map[string]string{ | ||||
| 	"":         "ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", | ||||
| 	"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", | ||||
| 	"data":     "Data is the serialized representation of the state.", | ||||
| 	"revision": "Revision indicates the revision of the state represented by Data.", | ||||
| } | ||||
| 
 | ||||
| func (ControllerRevision) SwaggerDoc() map[string]string { | ||||
| 	return map_ControllerRevision | ||||
| } | ||||
| 
 | ||||
| var map_ControllerRevisionList = map[string]string{ | ||||
| 	"":         "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", | ||||
| 	"metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", | ||||
| 	"items":    "Items is the list of ControllerRevisions", | ||||
| } | ||||
| 
 | ||||
| func (ControllerRevisionList) SwaggerDoc() map[string]string { | ||||
| 	return map_ControllerRevisionList | ||||
| } | ||||
| 
 | ||||
| var map_DaemonSet = map[string]string{ | ||||
| 	"":         "DaemonSet represents the configuration of a daemon set.", | ||||
| 	"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", | ||||
|  | @ -38,6 +59,19 @@ func (DaemonSet) SwaggerDoc() map[string]string { | |||
| 	return map_DaemonSet | ||||
| } | ||||
| 
 | ||||
| var map_DaemonSetCondition = map[string]string{ | ||||
| 	"":                   "DaemonSetCondition describes the state of a DaemonSet at a certain point.", | ||||
| 	"type":               "Type of DaemonSet condition.", | ||||
| 	"status":             "Status of the condition, one of True, False, Unknown.", | ||||
| 	"lastTransitionTime": "Last time the condition transitioned from one status to another.", | ||||
| 	"reason":             "The reason for the condition's last transition.", | ||||
| 	"message":            "A human readable message indicating details about the transition.", | ||||
| } | ||||
| 
 | ||||
| func (DaemonSetCondition) SwaggerDoc() map[string]string { | ||||
| 	return map_DaemonSetCondition | ||||
| } | ||||
| 
 | ||||
| var map_DaemonSetList = map[string]string{ | ||||
| 	"":         "DaemonSetList is a collection of daemon sets.", | ||||
| 	"metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", | ||||
|  | @ -50,7 +84,7 @@ func (DaemonSetList) SwaggerDoc() map[string]string { | |||
| 
 | ||||
| var map_DaemonSetSpec = map[string]string{ | ||||
| 	"":                     "DaemonSetSpec is the specification of a daemon set.", | ||||
| 	"selector":             "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", | ||||
| 	"selector":             "A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", | ||||
| 	"template":             "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", | ||||
| 	"updateStrategy":       "An update strategy to replace existing DaemonSet pods with new pods.", | ||||
| 	"minReadySeconds":      "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).", | ||||
|  | @ -72,6 +106,7 @@ var map_DaemonSetStatus = map[string]string{ | |||
| 	"numberAvailable":        "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", | ||||
| 	"numberUnavailable":      "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", | ||||
| 	"collisionCount":         "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", | ||||
| 	"conditions":             "Represents the latest available observations of a DaemonSet's current state.", | ||||
| } | ||||
| 
 | ||||
| func (DaemonSetStatus) SwaggerDoc() map[string]string { | ||||
|  | @ -88,6 +123,143 @@ func (DaemonSetUpdateStrategy) SwaggerDoc() map[string]string { | |||
| 	return map_DaemonSetUpdateStrategy | ||||
| } | ||||
| 
 | ||||
| var map_Deployment = map[string]string{ | ||||
| 	"":         "Deployment enables declarative updates for Pods and ReplicaSets.", | ||||
| 	"metadata": "Standard object metadata.", | ||||
| 	"spec":     "Specification of the desired behavior of the Deployment.", | ||||
| 	"status":   "Most recently observed status of the Deployment.", | ||||
| } | ||||
| 
 | ||||
| func (Deployment) SwaggerDoc() map[string]string { | ||||
| 	return map_Deployment | ||||
| } | ||||
| 
 | ||||
| var map_DeploymentCondition = map[string]string{ | ||||
| 	"":                   "DeploymentCondition describes the state of a deployment at a certain point.", | ||||
| 	"type":               "Type of deployment condition.", | ||||
| 	"status":             "Status of the condition, one of True, False, Unknown.", | ||||
| 	"lastUpdateTime":     "The last time this condition was updated.", | ||||
| 	"lastTransitionTime": "Last time the condition transitioned from one status to another.", | ||||
| 	"reason":             "The reason for the condition's last transition.", | ||||
| 	"message":            "A human readable message indicating details about the transition.", | ||||
| } | ||||
| 
 | ||||
| func (DeploymentCondition) SwaggerDoc() map[string]string { | ||||
| 	return map_DeploymentCondition | ||||
| } | ||||
| 
 | ||||
| var map_DeploymentList = map[string]string{ | ||||
| 	"":         "DeploymentList is a list of Deployments.", | ||||
| 	"metadata": "Standard list metadata.", | ||||
| 	"items":    "Items is the list of Deployments.", | ||||
| } | ||||
| 
 | ||||
| func (DeploymentList) SwaggerDoc() map[string]string { | ||||
| 	return map_DeploymentList | ||||
| } | ||||
| 
 | ||||
| var map_DeploymentSpec = map[string]string{ | ||||
| 	"":                        "DeploymentSpec is the specification of the desired behavior of the Deployment.", | ||||
| 	"replicas":                "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", | ||||
| 	"selector":                "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.", | ||||
| 	"template":                "Template describes the pods that will be created.", | ||||
| 	"strategy":                "The deployment strategy to use to replace existing pods with new ones.", | ||||
| 	"minReadySeconds":         "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", | ||||
| 	"revisionHistoryLimit":    "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", | ||||
| 	"paused":                  "Indicates that the deployment is paused.", | ||||
| 	"progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", | ||||
| } | ||||
| 
 | ||||
| func (DeploymentSpec) SwaggerDoc() map[string]string { | ||||
| 	return map_DeploymentSpec | ||||
| } | ||||
| 
 | ||||
| var map_DeploymentStatus = map[string]string{ | ||||
| 	"":                    "DeploymentStatus is the most recently observed status of the Deployment.", | ||||
| 	"observedGeneration":  "The generation observed by the deployment controller.", | ||||
| 	"replicas":            "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", | ||||
| 	"updatedReplicas":     "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", | ||||
| 	"readyReplicas":       "Total number of ready pods targeted by this deployment.", | ||||
| 	"availableReplicas":   "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", | ||||
| 	"unavailableReplicas": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", | ||||
| 	"conditions":          "Represents the latest available observations of a deployment's current state.", | ||||
| 	"collisionCount":      "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", | ||||
| } | ||||
| 
 | ||||
| func (DeploymentStatus) SwaggerDoc() map[string]string { | ||||
| 	return map_DeploymentStatus | ||||
| } | ||||
| 
 | ||||
| var map_DeploymentStrategy = map[string]string{ | ||||
| 	"":              "DeploymentStrategy describes how to replace existing pods with new ones.", | ||||
| 	"type":          "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", | ||||
| 	"rollingUpdate": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", | ||||
| } | ||||
| 
 | ||||
| func (DeploymentStrategy) SwaggerDoc() map[string]string { | ||||
| 	return map_DeploymentStrategy | ||||
| } | ||||
| 
 | ||||
| var map_ReplicaSet = map[string]string{ | ||||
| 	"":         "ReplicaSet ensures that a specified number of pod replicas are running at any given time.", | ||||
| 	"metadata": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", | ||||
| 	"spec":     "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", | ||||
| 	"status":   "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", | ||||
| } | ||||
| 
 | ||||
| func (ReplicaSet) SwaggerDoc() map[string]string { | ||||
| 	return map_ReplicaSet | ||||
| } | ||||
| 
 | ||||
| var map_ReplicaSetCondition = map[string]string{ | ||||
| 	"":                   "ReplicaSetCondition describes the state of a replica set at a certain point.", | ||||
| 	"type":               "Type of replica set condition.", | ||||
| 	"status":             "Status of the condition, one of True, False, Unknown.", | ||||
| 	"lastTransitionTime": "The last time the condition transitioned from one status to another.", | ||||
| 	"reason":             "The reason for the condition's last transition.", | ||||
| 	"message":            "A human readable message indicating details about the transition.", | ||||
| } | ||||
| 
 | ||||
| func (ReplicaSetCondition) SwaggerDoc() map[string]string { | ||||
| 	return map_ReplicaSetCondition | ||||
| } | ||||
| 
 | ||||
| var map_ReplicaSetList = map[string]string{ | ||||
| 	"":         "ReplicaSetList is a collection of ReplicaSets.", | ||||
| 	"metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", | ||||
| 	"items":    "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", | ||||
| } | ||||
| 
 | ||||
| func (ReplicaSetList) SwaggerDoc() map[string]string { | ||||
| 	return map_ReplicaSetList | ||||
| } | ||||
| 
 | ||||
| var map_ReplicaSetSpec = map[string]string{ | ||||
| 	"":                "ReplicaSetSpec is the specification of a ReplicaSet.", | ||||
| 	"replicas":        "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", | ||||
| 	"minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", | ||||
| 	"selector":        "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", | ||||
| 	"template":        "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", | ||||
| } | ||||
| 
 | ||||
| func (ReplicaSetSpec) SwaggerDoc() map[string]string { | ||||
| 	return map_ReplicaSetSpec | ||||
| } | ||||
| 
 | ||||
| var map_ReplicaSetStatus = map[string]string{ | ||||
| 	"":                     "ReplicaSetStatus represents the current status of a ReplicaSet.", | ||||
| 	"replicas":             "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", | ||||
| 	"fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replicaset.", | ||||
| 	"readyReplicas":        "The number of ready replicas for this replica set.", | ||||
| 	"availableReplicas":    "The number of available replicas (ready for at least minReadySeconds) for this replica set.", | ||||
| 	"observedGeneration":   "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", | ||||
| 	"conditions":           "Represents the latest available observations of a replica set's current state.", | ||||
| } | ||||
| 
 | ||||
| func (ReplicaSetStatus) SwaggerDoc() map[string]string { | ||||
| 	return map_ReplicaSetStatus | ||||
| } | ||||
| 
 | ||||
| var map_RollingUpdateDaemonSet = map[string]string{ | ||||
| 	"":               "Spec to control the desired behavior of daemon set rolling update.", | ||||
| 	"maxUnavailable": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", | ||||
|  | @ -97,4 +269,97 @@ func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string { | |||
| 	return map_RollingUpdateDaemonSet | ||||
| } | ||||
| 
 | ||||
| var map_RollingUpdateDeployment = map[string]string{ | ||||
| 	"":               "Spec to control the desired behavior of rolling update.", | ||||
| 	"maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", | ||||
| 	"maxSurge":       "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", | ||||
| } | ||||
| 
 | ||||
| func (RollingUpdateDeployment) SwaggerDoc() map[string]string { | ||||
| 	return map_RollingUpdateDeployment | ||||
| } | ||||
| 
 | ||||
| var map_RollingUpdateStatefulSetStrategy = map[string]string{ | ||||
| 	"":          "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", | ||||
| 	"partition": "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.", | ||||
| } | ||||
| 
 | ||||
| func (RollingUpdateStatefulSetStrategy) SwaggerDoc() map[string]string { | ||||
| 	return map_RollingUpdateStatefulSetStrategy | ||||
| } | ||||
| 
 | ||||
| var map_StatefulSet = map[string]string{ | ||||
| 	"":       "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", | ||||
| 	"spec":   "Spec defines the desired identities of pods in this set.", | ||||
| 	"status": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", | ||||
| } | ||||
| 
 | ||||
| func (StatefulSet) SwaggerDoc() map[string]string { | ||||
| 	return map_StatefulSet | ||||
| } | ||||
| 
 | ||||
| var map_StatefulSetCondition = map[string]string{ | ||||
| 	"":                   "StatefulSetCondition describes the state of a statefulset at a certain point.", | ||||
| 	"type":               "Type of statefulset condition.", | ||||
| 	"status":             "Status of the condition, one of True, False, Unknown.", | ||||
| 	"lastTransitionTime": "Last time the condition transitioned from one status to another.", | ||||
| 	"reason":             "The reason for the condition's last transition.", | ||||
| 	"message":            "A human readable message indicating details about the transition.", | ||||
| } | ||||
| 
 | ||||
| func (StatefulSetCondition) SwaggerDoc() map[string]string { | ||||
| 	return map_StatefulSetCondition | ||||
| } | ||||
| 
 | ||||
| var map_StatefulSetList = map[string]string{ | ||||
| 	"": "StatefulSetList is a collection of StatefulSets.", | ||||
| } | ||||
| 
 | ||||
| func (StatefulSetList) SwaggerDoc() map[string]string { | ||||
| 	return map_StatefulSetList | ||||
| } | ||||
| 
 | ||||
| var map_StatefulSetSpec = map[string]string{ | ||||
| 	"":                     "A StatefulSetSpec is the specification of a StatefulSet.", | ||||
| 	"replicas":             "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", | ||||
| 	"selector":             "selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", | ||||
| 	"template":             "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", | ||||
| 	"volumeClaimTemplates": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", | ||||
| 	"serviceName":          "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", | ||||
| 	"podManagementPolicy":  "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.", | ||||
| 	"updateStrategy":       "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", | ||||
| 	"revisionHistoryLimit": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", | ||||
| } | ||||
| 
 | ||||
| func (StatefulSetSpec) SwaggerDoc() map[string]string { | ||||
| 	return map_StatefulSetSpec | ||||
| } | ||||
| 
 | ||||
| var map_StatefulSetStatus = map[string]string{ | ||||
| 	"":                   "StatefulSetStatus represents the current state of a StatefulSet.", | ||||
| 	"observedGeneration": "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.", | ||||
| 	"replicas":           "replicas is the number of Pods created by the StatefulSet controller.", | ||||
| 	"readyReplicas":      "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", | ||||
| 	"currentReplicas":    "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.", | ||||
| 	"updatedReplicas":    "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.", | ||||
| 	"currentRevision":    "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", | ||||
| 	"updateRevision":     "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", | ||||
| 	"collisionCount":     "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", | ||||
| 	"conditions":         "Represents the latest available observations of a statefulset's current state.", | ||||
| } | ||||
| 
 | ||||
| func (StatefulSetStatus) SwaggerDoc() map[string]string { | ||||
| 	return map_StatefulSetStatus | ||||
| } | ||||
| 
 | ||||
| var map_StatefulSetUpdateStrategy = map[string]string{ | ||||
| 	"":              "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.", | ||||
| 	"type":          "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.", | ||||
| 	"rollingUpdate": "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", | ||||
| } | ||||
| 
 | ||||
| func (StatefulSetUpdateStrategy) SwaggerDoc() map[string]string { | ||||
| 	return map_StatefulSetUpdateStrategy | ||||
| } | ||||
| 
 | ||||
| // AUTO-GENERATED FUNCTIONS END HERE
 | ||||
|  |  | |||
|  | @ -21,48 +21,72 @@ limitations under the License. | |||
| package v1 | ||||
| 
 | ||||
| import ( | ||||
| 	core_v1 "k8s.io/api/core/v1" | ||||
| 	meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
| 	conversion "k8s.io/apimachinery/pkg/conversion" | ||||
| 	runtime "k8s.io/apimachinery/pkg/runtime" | ||||
| 	intstr "k8s.io/apimachinery/pkg/util/intstr" | ||||
| 	reflect "reflect" | ||||
| ) | ||||
| 
 | ||||
| func init() { | ||||
| 	SchemeBuilder.Register(RegisterDeepCopies) | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *ControllerRevision) DeepCopyInto(out *ControllerRevision) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) | ||||
| 	in.Data.DeepCopyInto(&out.Data) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
 | ||||
| // to allow building arbitrary schemes.
 | ||||
| //
 | ||||
| // Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
 | ||||
| func RegisterDeepCopies(scheme *runtime.Scheme) error { | ||||
| 	return scheme.AddGeneratedDeepCopyFuncs( | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DaemonSet).DeepCopyInto(out.(*DaemonSet)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DaemonSet{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DaemonSetList).DeepCopyInto(out.(*DaemonSetList)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DaemonSetList{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DaemonSetSpec).DeepCopyInto(out.(*DaemonSetSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DaemonSetSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DaemonSetStatus).DeepCopyInto(out.(*DaemonSetStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DaemonSetStatus{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DaemonSetUpdateStrategy).DeepCopyInto(out.(*DaemonSetUpdateStrategy)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DaemonSetUpdateStrategy{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*RollingUpdateDaemonSet).DeepCopyInto(out.(*RollingUpdateDaemonSet)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&RollingUpdateDaemonSet{})}, | ||||
| 	) | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevision.
 | ||||
| func (in *ControllerRevision) DeepCopy() *ControllerRevision { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ControllerRevision) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *ControllerRevision) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *ControllerRevisionList) DeepCopyInto(out *ControllerRevisionList) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	out.ListMeta = in.ListMeta | ||||
| 	if in.Items != nil { | ||||
| 		in, out := &in.Items, &out.Items | ||||
| 		*out = make([]ControllerRevision, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerRevisionList.
 | ||||
| func (in *ControllerRevisionList) DeepCopy() *ControllerRevisionList { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ControllerRevisionList) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *ControllerRevisionList) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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.
 | ||||
|  | @ -94,6 +118,23 @@ func (in *DaemonSet) DeepCopyObject() runtime.Object { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *DaemonSetCondition) DeepCopyInto(out *DaemonSetCondition) { | ||||
| 	*out = *in | ||||
| 	in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetCondition.
 | ||||
| func (in *DaemonSetCondition) DeepCopy() *DaemonSetCondition { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(DaemonSetCondition) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *DaemonSetList) DeepCopyInto(out *DaemonSetList) { | ||||
| 	*out = *in | ||||
|  | @ -176,6 +217,13 @@ func (in *DaemonSetStatus) DeepCopyInto(out *DaemonSetStatus) { | |||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	if in.Conditions != nil { | ||||
| 		in, out := &in.Conditions, &out.Conditions | ||||
| 		*out = make([]DaemonSetCondition, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
|  | @ -214,6 +262,336 @@ func (in *DaemonSetUpdateStrategy) DeepCopy() *DaemonSetUpdateStrategy { | |||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *Deployment) DeepCopyInto(out *Deployment) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) | ||||
| 	in.Spec.DeepCopyInto(&out.Spec) | ||||
| 	in.Status.DeepCopyInto(&out.Status) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Deployment.
 | ||||
| func (in *Deployment) DeepCopy() *Deployment { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(Deployment) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *Deployment) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *DeploymentCondition) DeepCopyInto(out *DeploymentCondition) { | ||||
| 	*out = *in | ||||
| 	in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) | ||||
| 	in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentCondition.
 | ||||
| func (in *DeploymentCondition) DeepCopy() *DeploymentCondition { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(DeploymentCondition) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *DeploymentList) DeepCopyInto(out *DeploymentList) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	out.ListMeta = in.ListMeta | ||||
| 	if in.Items != nil { | ||||
| 		in, out := &in.Items, &out.Items | ||||
| 		*out = make([]Deployment, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentList.
 | ||||
| func (in *DeploymentList) DeepCopy() *DeploymentList { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(DeploymentList) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *DeploymentList) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) { | ||||
| 	*out = *in | ||||
| 	if in.Replicas != nil { | ||||
| 		in, out := &in.Replicas, &out.Replicas | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(int32) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	if in.Selector != nil { | ||||
| 		in, out := &in.Selector, &out.Selector | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(meta_v1.LabelSelector) | ||||
| 			(*in).DeepCopyInto(*out) | ||||
| 		} | ||||
| 	} | ||||
| 	in.Template.DeepCopyInto(&out.Template) | ||||
| 	in.Strategy.DeepCopyInto(&out.Strategy) | ||||
| 	if in.RevisionHistoryLimit != nil { | ||||
| 		in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(int32) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	if in.ProgressDeadlineSeconds != nil { | ||||
| 		in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(int32) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentSpec.
 | ||||
| func (in *DeploymentSpec) DeepCopy() *DeploymentSpec { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(DeploymentSpec) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) { | ||||
| 	*out = *in | ||||
| 	if in.Conditions != nil { | ||||
| 		in, out := &in.Conditions, &out.Conditions | ||||
| 		*out = make([]DeploymentCondition, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	if in.CollisionCount != nil { | ||||
| 		in, out := &in.CollisionCount, &out.CollisionCount | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(int32) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStatus.
 | ||||
| func (in *DeploymentStatus) DeepCopy() *DeploymentStatus { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(DeploymentStatus) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy) { | ||||
| 	*out = *in | ||||
| 	if in.RollingUpdate != nil { | ||||
| 		in, out := &in.RollingUpdate, &out.RollingUpdate | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(RollingUpdateDeployment) | ||||
| 			(*in).DeepCopyInto(*out) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStrategy.
 | ||||
| func (in *DeploymentStrategy) DeepCopy() *DeploymentStrategy { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(DeploymentStrategy) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *ReplicaSet) DeepCopyInto(out *ReplicaSet) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) | ||||
| 	in.Spec.DeepCopyInto(&out.Spec) | ||||
| 	in.Status.DeepCopyInto(&out.Status) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSet.
 | ||||
| func (in *ReplicaSet) DeepCopy() *ReplicaSet { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ReplicaSet) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *ReplicaSet) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *ReplicaSetCondition) DeepCopyInto(out *ReplicaSetCondition) { | ||||
| 	*out = *in | ||||
| 	in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetCondition.
 | ||||
| func (in *ReplicaSetCondition) DeepCopy() *ReplicaSetCondition { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ReplicaSetCondition) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *ReplicaSetList) DeepCopyInto(out *ReplicaSetList) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	out.ListMeta = in.ListMeta | ||||
| 	if in.Items != nil { | ||||
| 		in, out := &in.Items, &out.Items | ||||
| 		*out = make([]ReplicaSet, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetList.
 | ||||
| func (in *ReplicaSetList) DeepCopy() *ReplicaSetList { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ReplicaSetList) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *ReplicaSetList) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *ReplicaSetSpec) DeepCopyInto(out *ReplicaSetSpec) { | ||||
| 	*out = *in | ||||
| 	if in.Replicas != nil { | ||||
| 		in, out := &in.Replicas, &out.Replicas | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(int32) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	if in.Selector != nil { | ||||
| 		in, out := &in.Selector, &out.Selector | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(meta_v1.LabelSelector) | ||||
| 			(*in).DeepCopyInto(*out) | ||||
| 		} | ||||
| 	} | ||||
| 	in.Template.DeepCopyInto(&out.Template) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetSpec.
 | ||||
| func (in *ReplicaSetSpec) DeepCopy() *ReplicaSetSpec { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ReplicaSetSpec) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *ReplicaSetStatus) DeepCopyInto(out *ReplicaSetStatus) { | ||||
| 	*out = *in | ||||
| 	if in.Conditions != nil { | ||||
| 		in, out := &in.Conditions, &out.Conditions | ||||
| 		*out = make([]ReplicaSetCondition, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetStatus.
 | ||||
| func (in *ReplicaSetStatus) DeepCopy() *ReplicaSetStatus { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(ReplicaSetStatus) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *RollingUpdateDaemonSet) DeepCopyInto(out *RollingUpdateDaemonSet) { | ||||
| 	*out = *in | ||||
|  | @ -238,3 +616,251 @@ func (in *RollingUpdateDaemonSet) DeepCopy() *RollingUpdateDaemonSet { | |||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *RollingUpdateDeployment) DeepCopyInto(out *RollingUpdateDeployment) { | ||||
| 	*out = *in | ||||
| 	if in.MaxUnavailable != nil { | ||||
| 		in, out := &in.MaxUnavailable, &out.MaxUnavailable | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(intstr.IntOrString) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	if in.MaxSurge != nil { | ||||
| 		in, out := &in.MaxSurge, &out.MaxSurge | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(intstr.IntOrString) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateDeployment.
 | ||||
| func (in *RollingUpdateDeployment) DeepCopy() *RollingUpdateDeployment { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(RollingUpdateDeployment) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateStatefulSetStrategy) { | ||||
| 	*out = *in | ||||
| 	if in.Partition != nil { | ||||
| 		in, out := &in.Partition, &out.Partition | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(int32) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateStatefulSetStrategy.
 | ||||
| func (in *RollingUpdateStatefulSetStrategy) DeepCopy() *RollingUpdateStatefulSetStrategy { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(RollingUpdateStatefulSetStrategy) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *StatefulSet) DeepCopyInto(out *StatefulSet) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) | ||||
| 	in.Spec.DeepCopyInto(&out.Spec) | ||||
| 	in.Status.DeepCopyInto(&out.Status) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSet.
 | ||||
| func (in *StatefulSet) DeepCopy() *StatefulSet { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(StatefulSet) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *StatefulSet) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *StatefulSetCondition) DeepCopyInto(out *StatefulSetCondition) { | ||||
| 	*out = *in | ||||
| 	in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetCondition.
 | ||||
| func (in *StatefulSetCondition) DeepCopy() *StatefulSetCondition { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(StatefulSetCondition) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *StatefulSetList) DeepCopyInto(out *StatefulSetList) { | ||||
| 	*out = *in | ||||
| 	out.TypeMeta = in.TypeMeta | ||||
| 	out.ListMeta = in.ListMeta | ||||
| 	if in.Items != nil { | ||||
| 		in, out := &in.Items, &out.Items | ||||
| 		*out = make([]StatefulSet, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetList.
 | ||||
| func (in *StatefulSetList) DeepCopy() *StatefulSetList { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(StatefulSetList) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | ||||
| func (in *StatefulSetList) DeepCopyObject() runtime.Object { | ||||
| 	if c := in.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 *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) { | ||||
| 	*out = *in | ||||
| 	if in.Replicas != nil { | ||||
| 		in, out := &in.Replicas, &out.Replicas | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(int32) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	if in.Selector != nil { | ||||
| 		in, out := &in.Selector, &out.Selector | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(meta_v1.LabelSelector) | ||||
| 			(*in).DeepCopyInto(*out) | ||||
| 		} | ||||
| 	} | ||||
| 	in.Template.DeepCopyInto(&out.Template) | ||||
| 	if in.VolumeClaimTemplates != nil { | ||||
| 		in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates | ||||
| 		*out = make([]core_v1.PersistentVolumeClaim, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy) | ||||
| 	if in.RevisionHistoryLimit != nil { | ||||
| 		in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(int32) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetSpec.
 | ||||
| func (in *StatefulSetSpec) DeepCopy() *StatefulSetSpec { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(StatefulSetSpec) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus) { | ||||
| 	*out = *in | ||||
| 	if in.CollisionCount != nil { | ||||
| 		in, out := &in.CollisionCount, &out.CollisionCount | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(int32) | ||||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	if in.Conditions != nil { | ||||
| 		in, out := &in.Conditions, &out.Conditions | ||||
| 		*out = make([]StatefulSetCondition, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetStatus.
 | ||||
| func (in *StatefulSetStatus) DeepCopy() *StatefulSetStatus { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(StatefulSetStatus) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *StatefulSetUpdateStrategy) DeepCopyInto(out *StatefulSetUpdateStrategy) { | ||||
| 	*out = *in | ||||
| 	if in.RollingUpdate != nil { | ||||
| 		in, out := &in.RollingUpdate, &out.RollingUpdate | ||||
| 		if *in == nil { | ||||
| 			*out = nil | ||||
| 		} else { | ||||
| 			*out = new(RollingUpdateStatefulSetStrategy) | ||||
| 			(*in).DeepCopyInto(*out) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetUpdateStrategy.
 | ||||
| func (in *StatefulSetUpdateStrategy) DeepCopy() *StatefulSetUpdateStrategy { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(StatefulSetUpdateStrategy) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
|  |  | |||
|  | @ -21,7 +21,6 @@ go_library( | |||
|         "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", | ||||
|         "//vendor/k8s.io/api/core/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/schema:go_default_library", | ||||
|         "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| // +k8s:deepcopy-gen=package,register
 | ||||
| // +k8s:deepcopy-gen=package
 | ||||
| // +k8s:openapi-gen=true
 | ||||
| 
 | ||||
| package v1beta1 // import "k8s.io/api/apps/v1beta1"
 | ||||
|  |  | |||
|  | @ -41,6 +41,7 @@ limitations under the License. | |||
| 		ScaleSpec | ||||
| 		ScaleStatus | ||||
| 		StatefulSet | ||||
| 		StatefulSetCondition | ||||
| 		StatefulSetList | ||||
| 		StatefulSetSpec | ||||
| 		StatefulSetStatus | ||||
|  | @ -144,22 +145,26 @@ func (m *StatefulSet) Reset()                    { *m = StatefulSet{} } | |||
| func (*StatefulSet) ProtoMessage()               {} | ||||
| func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } | ||||
| 
 | ||||
| func (m *StatefulSetCondition) Reset()                    { *m = StatefulSetCondition{} } | ||||
| func (*StatefulSetCondition) ProtoMessage()               {} | ||||
| func (*StatefulSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } | ||||
| 
 | ||||
| func (m *StatefulSetList) Reset()                    { *m = StatefulSetList{} } | ||||
| func (*StatefulSetList) ProtoMessage()               {} | ||||
| func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } | ||||
| func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } | ||||
| 
 | ||||
| func (m *StatefulSetSpec) Reset()                    { *m = StatefulSetSpec{} } | ||||
| func (*StatefulSetSpec) ProtoMessage()               {} | ||||
| func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } | ||||
| func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } | ||||
| 
 | ||||
| func (m *StatefulSetStatus) Reset()                    { *m = StatefulSetStatus{} } | ||||
| func (*StatefulSetStatus) ProtoMessage()               {} | ||||
| func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } | ||||
| func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } | ||||
| 
 | ||||
| func (m *StatefulSetUpdateStrategy) Reset()      { *m = StatefulSetUpdateStrategy{} } | ||||
| func (*StatefulSetUpdateStrategy) ProtoMessage() {} | ||||
| func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) { | ||||
| 	return fileDescriptorGenerated, []int{19} | ||||
| 	return fileDescriptorGenerated, []int{20} | ||||
| } | ||||
| 
 | ||||
| func init() { | ||||
|  | @ -179,6 +184,7 @@ func init() { | |||
| 	proto.RegisterType((*ScaleSpec)(nil), "k8s.io.api.apps.v1beta1.ScaleSpec") | ||||
| 	proto.RegisterType((*ScaleStatus)(nil), "k8s.io.api.apps.v1beta1.ScaleStatus") | ||||
| 	proto.RegisterType((*StatefulSet)(nil), "k8s.io.api.apps.v1beta1.StatefulSet") | ||||
| 	proto.RegisterType((*StatefulSetCondition)(nil), "k8s.io.api.apps.v1beta1.StatefulSetCondition") | ||||
| 	proto.RegisterType((*StatefulSetList)(nil), "k8s.io.api.apps.v1beta1.StatefulSetList") | ||||
| 	proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.api.apps.v1beta1.StatefulSetSpec") | ||||
| 	proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.api.apps.v1beta1.StatefulSetStatus") | ||||
|  | @ -840,6 +846,48 @@ func (m *StatefulSet) MarshalTo(dAtA []byte) (int, error) { | |||
| 	return i, nil | ||||
| } | ||||
| 
 | ||||
| func (m *StatefulSetCondition) Marshal() (dAtA []byte, err error) { | ||||
| 	size := m.Size() | ||||
| 	dAtA = make([]byte, size) | ||||
| 	n, err := m.MarshalTo(dAtA) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return dAtA[:n], nil | ||||
| } | ||||
| 
 | ||||
| func (m *StatefulSetCondition) MarshalTo(dAtA []byte) (int, error) { | ||||
| 	var i int | ||||
| 	_ = i | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	dAtA[i] = 0xa | ||||
| 	i++ | ||||
| 	i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) | ||||
| 	i += copy(dAtA[i:], m.Type) | ||||
| 	dAtA[i] = 0x12 | ||||
| 	i++ | ||||
| 	i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) | ||||
| 	i += copy(dAtA[i:], m.Status) | ||||
| 	dAtA[i] = 0x1a | ||||
| 	i++ | ||||
| 	i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size())) | ||||
| 	n24, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) | ||||
| 	if err != nil { | ||||
| 		return 0, err | ||||
| 	} | ||||
| 	i += n24 | ||||
| 	dAtA[i] = 0x22 | ||||
| 	i++ | ||||
| 	i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) | ||||
| 	i += copy(dAtA[i:], m.Reason) | ||||
| 	dAtA[i] = 0x2a | ||||
| 	i++ | ||||
| 	i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) | ||||
| 	i += copy(dAtA[i:], m.Message) | ||||
| 	return i, nil | ||||
| } | ||||
| 
 | ||||
| func (m *StatefulSetList) Marshal() (dAtA []byte, err error) { | ||||
| 	size := m.Size() | ||||
| 	dAtA = make([]byte, size) | ||||
|  | @ -858,11 +906,11 @@ func (m *StatefulSetList) MarshalTo(dAtA []byte) (int, error) { | |||
| 	dAtA[i] = 0xa | ||||
| 	i++ | ||||
| 	i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) | ||||
| 	n24, err := m.ListMeta.MarshalTo(dAtA[i:]) | ||||
| 	n25, err := m.ListMeta.MarshalTo(dAtA[i:]) | ||||
| 	if err != nil { | ||||
| 		return 0, err | ||||
| 	} | ||||
| 	i += n24 | ||||
| 	i += n25 | ||||
| 	if len(m.Items) > 0 { | ||||
| 		for _, msg := range m.Items { | ||||
| 			dAtA[i] = 0x12 | ||||
|  | @ -902,20 +950,20 @@ func (m *StatefulSetSpec) MarshalTo(dAtA []byte) (int, error) { | |||
| 		dAtA[i] = 0x12 | ||||
| 		i++ | ||||
| 		i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size())) | ||||
| 		n25, err := m.Selector.MarshalTo(dAtA[i:]) | ||||
| 		n26, err := m.Selector.MarshalTo(dAtA[i:]) | ||||
| 		if err != nil { | ||||
| 			return 0, err | ||||
| 		} | ||||
| 		i += n25 | ||||
| 		i += n26 | ||||
| 	} | ||||
| 	dAtA[i] = 0x1a | ||||
| 	i++ | ||||
| 	i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size())) | ||||
| 	n26, err := m.Template.MarshalTo(dAtA[i:]) | ||||
| 	n27, err := m.Template.MarshalTo(dAtA[i:]) | ||||
| 	if err != nil { | ||||
| 		return 0, err | ||||
| 	} | ||||
| 	i += n26 | ||||
| 	i += n27 | ||||
| 	if len(m.VolumeClaimTemplates) > 0 { | ||||
| 		for _, msg := range m.VolumeClaimTemplates { | ||||
| 			dAtA[i] = 0x22 | ||||
|  | @ -939,11 +987,11 @@ func (m *StatefulSetSpec) MarshalTo(dAtA []byte) (int, error) { | |||
| 	dAtA[i] = 0x3a | ||||
| 	i++ | ||||
| 	i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size())) | ||||
| 	n27, err := m.UpdateStrategy.MarshalTo(dAtA[i:]) | ||||
| 	n28, err := m.UpdateStrategy.MarshalTo(dAtA[i:]) | ||||
| 	if err != nil { | ||||
| 		return 0, err | ||||
| 	} | ||||
| 	i += n27 | ||||
| 	i += n28 | ||||
| 	if m.RevisionHistoryLimit != nil { | ||||
| 		dAtA[i] = 0x40 | ||||
| 		i++ | ||||
|  | @ -997,6 +1045,18 @@ func (m *StatefulSetStatus) MarshalTo(dAtA []byte) (int, error) { | |||
| 		i++ | ||||
| 		i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount)) | ||||
| 	} | ||||
| 	if len(m.Conditions) > 0 { | ||||
| 		for _, msg := range m.Conditions { | ||||
| 			dAtA[i] = 0x52 | ||||
| 			i++ | ||||
| 			i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) | ||||
| 			n, err := msg.MarshalTo(dAtA[i:]) | ||||
| 			if err != nil { | ||||
| 				return 0, err | ||||
| 			} | ||||
| 			i += n | ||||
| 		} | ||||
| 	} | ||||
| 	return i, nil | ||||
| } | ||||
| 
 | ||||
|  | @ -1023,11 +1083,11 @@ func (m *StatefulSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) { | |||
| 		dAtA[i] = 0x12 | ||||
| 		i++ | ||||
| 		i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size())) | ||||
| 		n28, err := m.RollingUpdate.MarshalTo(dAtA[i:]) | ||||
| 		n29, err := m.RollingUpdate.MarshalTo(dAtA[i:]) | ||||
| 		if err != nil { | ||||
| 			return 0, err | ||||
| 		} | ||||
| 		i += n28 | ||||
| 		i += n29 | ||||
| 	} | ||||
| 	return i, nil | ||||
| } | ||||
|  | @ -1286,6 +1346,22 @@ func (m *StatefulSet) Size() (n int) { | |||
| 	return n | ||||
| } | ||||
| 
 | ||||
| func (m *StatefulSetCondition) Size() (n int) { | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	l = len(m.Type) | ||||
| 	n += 1 + l + sovGenerated(uint64(l)) | ||||
| 	l = len(m.Status) | ||||
| 	n += 1 + l + sovGenerated(uint64(l)) | ||||
| 	l = m.LastTransitionTime.Size() | ||||
| 	n += 1 + l + sovGenerated(uint64(l)) | ||||
| 	l = len(m.Reason) | ||||
| 	n += 1 + l + sovGenerated(uint64(l)) | ||||
| 	l = len(m.Message) | ||||
| 	n += 1 + l + sovGenerated(uint64(l)) | ||||
| 	return n | ||||
| } | ||||
| 
 | ||||
| func (m *StatefulSetList) Size() (n int) { | ||||
| 	var l int | ||||
| 	_ = l | ||||
|  | @ -1347,6 +1423,12 @@ func (m *StatefulSetStatus) Size() (n int) { | |||
| 	if m.CollisionCount != nil { | ||||
| 		n += 1 + sovGenerated(uint64(*m.CollisionCount)) | ||||
| 	} | ||||
| 	if len(m.Conditions) > 0 { | ||||
| 		for _, e := range m.Conditions { | ||||
| 			l = e.Size() | ||||
| 			n += 1 + l + sovGenerated(uint64(l)) | ||||
| 		} | ||||
| 	} | ||||
| 	return n | ||||
| } | ||||
| 
 | ||||
|  | @ -1591,6 +1673,20 @@ func (this *StatefulSet) String() string { | |||
| 	}, "") | ||||
| 	return s | ||||
| } | ||||
| func (this *StatefulSetCondition) String() string { | ||||
| 	if this == nil { | ||||
| 		return "nil" | ||||
| 	} | ||||
| 	s := strings.Join([]string{`&StatefulSetCondition{`, | ||||
| 		`Type:` + fmt.Sprintf("%v", this.Type) + `,`, | ||||
| 		`Status:` + fmt.Sprintf("%v", this.Status) + `,`, | ||||
| 		`LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, | ||||
| 		`Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, | ||||
| 		`Message:` + fmt.Sprintf("%v", this.Message) + `,`, | ||||
| 		`}`, | ||||
| 	}, "") | ||||
| 	return s | ||||
| } | ||||
| func (this *StatefulSetList) String() string { | ||||
| 	if this == nil { | ||||
| 		return "nil" | ||||
|  | @ -1632,6 +1728,7 @@ func (this *StatefulSetStatus) String() string { | |||
| 		`CurrentRevision:` + fmt.Sprintf("%v", this.CurrentRevision) + `,`, | ||||
| 		`UpdateRevision:` + fmt.Sprintf("%v", this.UpdateRevision) + `,`, | ||||
| 		`CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`, | ||||
| 		`Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "StatefulSetCondition", "StatefulSetCondition", 1), `&`, ``, 1) + `,`, | ||||
| 		`}`, | ||||
| 	}, "") | ||||
| 	return s | ||||
|  | @ -4017,6 +4114,202 @@ func (m *StatefulSet) Unmarshal(dAtA []byte) error { | |||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func (m *StatefulSetCondition) Unmarshal(dAtA []byte) error { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		preIndex := iNdEx | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return ErrIntOverflowGenerated | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= (uint64(b) & 0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		fieldNum := int32(wire >> 3) | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		if wireType == 4 { | ||||
| 			return fmt.Errorf("proto: StatefulSetCondition: wiretype end group for non-group") | ||||
| 		} | ||||
| 		if fieldNum <= 0 { | ||||
| 			return fmt.Errorf("proto: StatefulSetCondition: illegal tag %d (wire type %d)", fieldNum, wire) | ||||
| 		} | ||||
| 		switch fieldNum { | ||||
| 		case 1: | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) | ||||
| 			} | ||||
| 			var stringLen uint64 | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowGenerated | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				stringLen |= (uint64(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			intStringLen := int(stringLen) | ||||
| 			if intStringLen < 0 { | ||||
| 				return ErrInvalidLengthGenerated | ||||
| 			} | ||||
| 			postIndex := iNdEx + intStringLen | ||||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Type = StatefulSetConditionType(dAtA[iNdEx:postIndex]) | ||||
| 			iNdEx = postIndex | ||||
| 		case 2: | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) | ||||
| 			} | ||||
| 			var stringLen uint64 | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowGenerated | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				stringLen |= (uint64(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			intStringLen := int(stringLen) | ||||
| 			if intStringLen < 0 { | ||||
| 				return ErrInvalidLengthGenerated | ||||
| 			} | ||||
| 			postIndex := iNdEx + intStringLen | ||||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) | ||||
| 			iNdEx = postIndex | ||||
| 		case 3: | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) | ||||
| 			} | ||||
| 			var msglen int | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowGenerated | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				msglen |= (int(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			if msglen < 0 { | ||||
| 				return ErrInvalidLengthGenerated | ||||
| 			} | ||||
| 			postIndex := iNdEx + msglen | ||||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			iNdEx = postIndex | ||||
| 		case 4: | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) | ||||
| 			} | ||||
| 			var stringLen uint64 | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowGenerated | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				stringLen |= (uint64(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			intStringLen := int(stringLen) | ||||
| 			if intStringLen < 0 { | ||||
| 				return ErrInvalidLengthGenerated | ||||
| 			} | ||||
| 			postIndex := iNdEx + intStringLen | ||||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Reason = string(dAtA[iNdEx:postIndex]) | ||||
| 			iNdEx = postIndex | ||||
| 		case 5: | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) | ||||
| 			} | ||||
| 			var stringLen uint64 | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowGenerated | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				stringLen |= (uint64(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			intStringLen := int(stringLen) | ||||
| 			if intStringLen < 0 { | ||||
| 				return ErrInvalidLengthGenerated | ||||
| 			} | ||||
| 			postIndex := iNdEx + intStringLen | ||||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Message = string(dAtA[iNdEx:postIndex]) | ||||
| 			iNdEx = postIndex | ||||
| 		default: | ||||
| 			iNdEx = preIndex | ||||
| 			skippy, err := skipGenerated(dAtA[iNdEx:]) | ||||
| 			if err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			if skippy < 0 { | ||||
| 				return ErrInvalidLengthGenerated | ||||
| 			} | ||||
| 			if (iNdEx + skippy) > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			iNdEx += skippy | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	if iNdEx > l { | ||||
| 		return io.ErrUnexpectedEOF | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func (m *StatefulSetList) Unmarshal(dAtA []byte) error { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
|  | @ -4603,6 +4896,37 @@ func (m *StatefulSetStatus) Unmarshal(dAtA []byte) error { | |||
| 				} | ||||
| 			} | ||||
| 			m.CollisionCount = &v | ||||
| 		case 10: | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) | ||||
| 			} | ||||
| 			var msglen int | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowGenerated | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				msglen |= (int(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			if msglen < 0 { | ||||
| 				return ErrInvalidLengthGenerated | ||||
| 			} | ||||
| 			postIndex := iNdEx + msglen | ||||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Conditions = append(m.Conditions, StatefulSetCondition{}) | ||||
| 			if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			iNdEx = postIndex | ||||
| 		default: | ||||
| 			iNdEx = preIndex | ||||
| 			skippy, err := skipGenerated(dAtA[iNdEx:]) | ||||
|  | @ -4846,119 +5170,122 @@ func init() { | |||
| } | ||||
| 
 | ||||
| var fileDescriptorGenerated = []byte{ | ||||
| 	// 1820 bytes of a gzipped FileDescriptorProto
 | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4b, 0x6f, 0x1b, 0xc9, | ||||
| 	0x11, 0xd6, 0x50, 0xa4, 0x44, 0xb6, 0x56, 0x94, 0xd5, 0x52, 0x24, 0xae, 0x36, 0xa1, 0x04, 0x66, | ||||
| 	0xb1, 0x2b, 0xef, 0xae, 0x86, 0x6b, 0xd9, 0x31, 0xfc, 0x00, 0x8c, 0x88, 0x94, 0x63, 0xcb, 0x90, | ||||
| 	0x22, 0xb9, 0x29, 0x39, 0x88, 0x93, 0x00, 0x6e, 0x0e, 0xdb, 0xd4, 0x58, 0xf3, 0xc2, 0x4c, 0x0f, | ||||
| 	0x63, 0x22, 0x97, 0xdc, 0x13, 0xc0, 0x39, 0xe7, 0x57, 0xe4, 0x18, 0x24, 0xb7, 0x9c, 0x74, 0x09, | ||||
| 	0x60, 0xe4, 0x12, 0x9f, 0x84, 0x98, 0xbe, 0xe6, 0x9a, 0x8b, 0x81, 0x00, 0x41, 0xf7, 0xf4, 0xbc, | ||||
| 	0x67, 0x24, 0x2a, 0x40, 0x74, 0xc8, 0x8d, 0xd3, 0x55, 0xf5, 0x55, 0x75, 0x77, 0x75, 0xd5, 0x57, | ||||
| 	0x04, 0x3f, 0x3c, 0xb9, 0xe3, 0xc8, 0xaa, 0xd9, 0x3c, 0x71, 0xbb, 0xc4, 0x36, 0x08, 0x25, 0x4e, | ||||
| 	0x73, 0x40, 0x8c, 0x9e, 0x69, 0x37, 0x85, 0x00, 0x5b, 0x6a, 0x13, 0x5b, 0x96, 0xd3, 0x1c, 0xdc, | ||||
| 	0xe8, 0x12, 0x8a, 0x6f, 0x34, 0xfb, 0xc4, 0x20, 0x36, 0xa6, 0xa4, 0x27, 0x5b, 0xb6, 0x49, 0x4d, | ||||
| 	0xb8, 0xec, 0x29, 0xca, 0xd8, 0x52, 0x65, 0xa6, 0x28, 0x0b, 0xc5, 0x95, 0x8d, 0xbe, 0x4a, 0x8f, | ||||
| 	0xdd, 0xae, 0xac, 0x98, 0x7a, 0xb3, 0x6f, 0xf6, 0xcd, 0x26, 0xd7, 0xef, 0xba, 0x2f, 0xf9, 0x17, | ||||
| 	0xff, 0xe0, 0xbf, 0x3c, 0x9c, 0x95, 0x46, 0xc4, 0xa1, 0x62, 0xda, 0xa4, 0x39, 0x48, 0xf9, 0x5a, | ||||
| 	0xb9, 0x1e, 0xd1, 0xb1, 0x4c, 0x4d, 0x55, 0x86, 0x79, 0x61, 0xad, 0xdc, 0x0a, 0x55, 0x75, 0xac, | ||||
| 	0x1c, 0xab, 0x06, 0xb1, 0x87, 0x4d, 0xeb, 0xa4, 0xcf, 0x16, 0x9c, 0xa6, 0x4e, 0x28, 0xce, 0x72, | ||||
| 	0xd0, 0xcc, 0xb3, 0xb2, 0x5d, 0x83, 0xaa, 0x3a, 0x49, 0x19, 0xdc, 0xbe, 0xc8, 0xc0, 0x51, 0x8e, | ||||
| 	0x89, 0x8e, 0x53, 0x76, 0x37, 0xf3, 0xec, 0x5c, 0xaa, 0x6a, 0x4d, 0xd5, 0xa0, 0x0e, 0xb5, 0x93, | ||||
| 	0x46, 0x8d, 0x7f, 0x49, 0x00, 0xb6, 0x4d, 0x83, 0xda, 0xa6, 0xa6, 0x11, 0x1b, 0x91, 0x81, 0xea, | ||||
| 	0xa8, 0xa6, 0x01, 0x5f, 0x80, 0x32, 0xdb, 0x4f, 0x0f, 0x53, 0x5c, 0x93, 0xd6, 0xa4, 0xf5, 0x99, | ||||
| 	0xcd, 0x6f, 0xe5, 0xf0, 0x52, 0x02, 0x78, 0xd9, 0x3a, 0xe9, 0xb3, 0x05, 0x47, 0x66, 0xda, 0xf2, | ||||
| 	0xe0, 0x86, 0xbc, 0xdf, 0x7d, 0x45, 0x14, 0xba, 0x47, 0x28, 0x6e, 0xc1, 0xd3, 0xb3, 0xd5, 0x89, | ||||
| 	0xd1, 0xd9, 0x2a, 0x08, 0xd7, 0x50, 0x80, 0x0a, 0xf7, 0x41, 0x91, 0xa3, 0x17, 0x38, 0xfa, 0x46, | ||||
| 	0x2e, 0xba, 0xd8, 0xb4, 0x8c, 0xf0, 0x2f, 0x1f, 0xbe, 0xa6, 0xc4, 0x60, 0xe1, 0xb5, 0x3e, 0x11, | ||||
| 	0xd0, 0xc5, 0x6d, 0x4c, 0x31, 0xe2, 0x40, 0xf0, 0x1b, 0x50, 0xb6, 0x45, 0xf8, 0xb5, 0xc9, 0x35, | ||||
| 	0x69, 0x7d, 0xb2, 0x75, 0x4d, 0x68, 0x95, 0xfd, 0x6d, 0xa1, 0x40, 0xa3, 0x71, 0x2a, 0x81, 0xa5, | ||||
| 	0xf4, 0xbe, 0x77, 0x55, 0x87, 0xc2, 0x9f, 0xa7, 0xf6, 0x2e, 0x8f, 0xb7, 0x77, 0x66, 0xcd, 0x77, | ||||
| 	0x1e, 0x38, 0xf6, 0x57, 0x22, 0xfb, 0x3e, 0x00, 0x25, 0x95, 0x12, 0xdd, 0xa9, 0x15, 0xd6, 0x26, | ||||
| 	0xd7, 0x67, 0x36, 0xbf, 0x96, 0x73, 0x72, 0x5d, 0x4e, 0x47, 0xd7, 0x9a, 0x15, 0xb8, 0xa5, 0x1d, | ||||
| 	0x86, 0x80, 0x3c, 0xa0, 0xc6, 0x6f, 0x0b, 0x00, 0x6c, 0x13, 0x4b, 0x33, 0x87, 0x3a, 0x31, 0xe8, | ||||
| 	0x15, 0x5c, 0xdd, 0x0e, 0x28, 0x3a, 0x16, 0x51, 0xc4, 0xd5, 0x7d, 0x99, 0xbb, 0x83, 0x30, 0xa8, | ||||
| 	0x8e, 0x45, 0x94, 0xf0, 0xd2, 0xd8, 0x17, 0xe2, 0x10, 0xf0, 0x29, 0x98, 0x72, 0x28, 0xa6, 0xae, | ||||
| 	0xc3, 0xaf, 0x6c, 0x66, 0xf3, 0xfa, 0x38, 0x60, 0xdc, 0xa0, 0x55, 0x15, 0x70, 0x53, 0xde, 0x37, | ||||
| 	0x12, 0x40, 0x8d, 0xbf, 0x4f, 0x82, 0x85, 0x50, 0xb9, 0x6d, 0x1a, 0x3d, 0x95, 0xb2, 0x94, 0xbe, | ||||
| 	0x0f, 0x8a, 0x74, 0x68, 0x11, 0x7e, 0x26, 0x95, 0xd6, 0x97, 0x7e, 0x30, 0x87, 0x43, 0x8b, 0x7c, | ||||
| 	0x3c, 0x5b, 0x5d, 0xce, 0x30, 0x61, 0x22, 0xc4, 0x8d, 0xe0, 0x6e, 0x10, 0x67, 0x81, 0x9b, 0xdf, | ||||
| 	0x8a, 0x3b, 0xff, 0x78, 0xb6, 0x9a, 0x51, 0x6b, 0xe4, 0x00, 0x29, 0x1e, 0x22, 0xfc, 0x02, 0x4c, | ||||
| 	0xd9, 0x04, 0x3b, 0xa6, 0x51, 0x2b, 0x72, 0xb4, 0x60, 0x2b, 0x88, 0xaf, 0x22, 0x21, 0x85, 0xd7, | ||||
| 	0xc1, 0xb4, 0x4e, 0x1c, 0x07, 0xf7, 0x49, 0xad, 0xc4, 0x15, 0xe7, 0x84, 0xe2, 0xf4, 0x9e, 0xb7, | ||||
| 	0x8c, 0x7c, 0x39, 0x7c, 0x05, 0xaa, 0x1a, 0x76, 0xe8, 0x91, 0xd5, 0xc3, 0x94, 0x1c, 0xaa, 0x3a, | ||||
| 	0xa9, 0x4d, 0xf1, 0x03, 0xfd, 0x6a, 0xbc, 0xbb, 0x67, 0x16, 0xad, 0x25, 0x81, 0x5e, 0xdd, 0x8d, | ||||
| 	0x21, 0xa1, 0x04, 0x32, 0x1c, 0x00, 0xc8, 0x56, 0x0e, 0x6d, 0x6c, 0x38, 0xde, 0x41, 0x31, 0x7f, | ||||
| 	0xd3, 0x97, 0xf6, 0xb7, 0x22, 0xfc, 0xc1, 0xdd, 0x14, 0x1a, 0xca, 0xf0, 0xd0, 0xf8, 0xa3, 0x04, | ||||
| 	0xaa, 0xe1, 0x35, 0x5d, 0xc1, 0x5b, 0x7d, 0x1c, 0x7f, 0xab, 0xdf, 0x1f, 0x23, 0x39, 0x73, 0xde, | ||||
| 	0xe8, 0x3f, 0x0b, 0x00, 0x86, 0x4a, 0xc8, 0xd4, 0xb4, 0x2e, 0x56, 0x4e, 0xe0, 0x1a, 0x28, 0x1a, | ||||
| 	0x58, 0xf7, 0x73, 0x32, 0x78, 0x20, 0x3f, 0xc6, 0x3a, 0x41, 0x5c, 0x02, 0xdf, 0x48, 0x00, 0xba, | ||||
| 	0xfc, 0xe8, 0x7b, 0x5b, 0x86, 0x61, 0x52, 0xcc, 0x4e, 0xc3, 0x0f, 0xa8, 0x3d, 0x46, 0x40, 0xbe, | ||||
| 	0x2f, 0xf9, 0x28, 0x85, 0xf2, 0xd0, 0xa0, 0xf6, 0x30, 0xbc, 0x85, 0xb4, 0x02, 0xca, 0x70, 0x0d, | ||||
| 	0x7f, 0x06, 0x80, 0x2d, 0x30, 0x0f, 0x4d, 0xf1, 0x6c, 0xf3, 0x6b, 0x80, 0xef, 0xbe, 0x6d, 0x1a, | ||||
| 	0x2f, 0xd5, 0x7e, 0x58, 0x58, 0x50, 0x00, 0x81, 0x22, 0x70, 0x2b, 0x0f, 0xc1, 0x72, 0x4e, 0x9c, | ||||
| 	0xf0, 0x1a, 0x98, 0x3c, 0x21, 0x43, 0xef, 0xa8, 0x10, 0xfb, 0x09, 0x17, 0x41, 0x69, 0x80, 0x35, | ||||
| 	0x97, 0x78, 0x6f, 0x12, 0x79, 0x1f, 0xf7, 0x0a, 0x77, 0xa4, 0xc6, 0x1f, 0x4a, 0xd1, 0x4c, 0x61, | ||||
| 	0xf5, 0x06, 0xae, 0xb3, 0xf6, 0x60, 0x69, 0xaa, 0x82, 0x1d, 0x8e, 0x51, 0x6a, 0x7d, 0xe2, 0xb5, | ||||
| 	0x06, 0x6f, 0x0d, 0x05, 0x52, 0xf8, 0x0b, 0x50, 0x76, 0x88, 0x46, 0x14, 0x6a, 0xda, 0xa2, 0xc4, | ||||
| 	0xdd, 0x1c, 0x33, 0xa7, 0x70, 0x97, 0x68, 0x1d, 0x61, 0xea, 0xc1, 0xfb, 0x5f, 0x28, 0x80, 0x84, | ||||
| 	0x4f, 0x41, 0x99, 0x12, 0xdd, 0xd2, 0x30, 0x25, 0xe2, 0xf4, 0x62, 0x79, 0xc5, 0x6a, 0x07, 0x03, | ||||
| 	0x3b, 0x30, 0x7b, 0x87, 0x42, 0x8d, 0x57, 0xcf, 0x20, 0x4f, 0xfd, 0x55, 0x14, 0xc0, 0xc0, 0x9f, | ||||
| 	0x82, 0xb2, 0x43, 0x59, 0x57, 0xef, 0x0f, 0x79, 0x45, 0x39, 0xaf, 0xad, 0x44, 0xeb, 0xa8, 0x67, | ||||
| 	0x12, 0x42, 0xfb, 0x2b, 0x28, 0x80, 0x83, 0x5b, 0x60, 0x4e, 0x57, 0x0d, 0x44, 0x70, 0x6f, 0xd8, | ||||
| 	0x21, 0x8a, 0x69, 0xf4, 0x1c, 0x5e, 0x8a, 0x4a, 0xad, 0x65, 0x61, 0x34, 0xb7, 0x17, 0x17, 0xa3, | ||||
| 	0xa4, 0x3e, 0xdc, 0x05, 0x8b, 0x7e, 0xdb, 0x7d, 0xac, 0x3a, 0xd4, 0xb4, 0x87, 0xbb, 0xaa, 0xae, | ||||
| 	0x52, 0x5e, 0xa0, 0x4a, 0xad, 0xda, 0xe8, 0x6c, 0x75, 0x11, 0x65, 0xc8, 0x51, 0xa6, 0x15, 0xab, | ||||
| 	0x9d, 0x16, 0x76, 0x1d, 0xd2, 0xe3, 0x05, 0xa7, 0x1c, 0xd6, 0xce, 0x03, 0xbe, 0x8a, 0x84, 0x14, | ||||
| 	0xfe, 0x24, 0x96, 0xa6, 0xe5, 0xcb, 0xa5, 0x69, 0x35, 0x3f, 0x45, 0xe1, 0x11, 0x58, 0xb6, 0x6c, | ||||
| 	0xb3, 0x6f, 0x13, 0xc7, 0xd9, 0x26, 0xb8, 0xa7, 0xa9, 0x06, 0xf1, 0x4f, 0xa6, 0xc2, 0x77, 0xf4, | ||||
| 	0xd9, 0xe8, 0x6c, 0x75, 0xf9, 0x20, 0x5b, 0x05, 0xe5, 0xd9, 0x36, 0xfe, 0x52, 0x04, 0xd7, 0x92, | ||||
| 	0x3d, 0x0e, 0x3e, 0x01, 0xd0, 0xec, 0x3a, 0xc4, 0x1e, 0x90, 0xde, 0x23, 0x8f, 0xb8, 0x31, 0x76, | ||||
| 	0x23, 0x71, 0x76, 0x13, 0xbc, 0xdb, 0xfd, 0x94, 0x06, 0xca, 0xb0, 0xf2, 0xf8, 0x91, 0x78, 0x00, | ||||
| 	0x05, 0x1e, 0x68, 0x84, 0x1f, 0xa5, 0x1e, 0xc1, 0x16, 0x98, 0x13, 0x6f, 0xdf, 0x17, 0xf2, 0x64, | ||||
| 	0x8d, 0xdc, 0xfb, 0x51, 0x5c, 0x8c, 0x92, 0xfa, 0xf0, 0x11, 0x98, 0xc7, 0x03, 0xac, 0x6a, 0xb8, | ||||
| 	0xab, 0x91, 0x00, 0xa4, 0xc8, 0x41, 0x3e, 0x15, 0x20, 0xf3, 0x5b, 0x49, 0x05, 0x94, 0xb6, 0x81, | ||||
| 	0x7b, 0x60, 0xc1, 0x35, 0xd2, 0x50, 0x5e, 0x1e, 0x7e, 0x26, 0xa0, 0x16, 0x8e, 0xd2, 0x2a, 0x28, | ||||
| 	0xcb, 0x0e, 0xbe, 0x00, 0x40, 0xf1, 0x1b, 0xb3, 0x53, 0x9b, 0xe2, 0x95, 0xf4, 0x9b, 0x31, 0xde, | ||||
| 	0x4b, 0xd0, 0xcd, 0xc3, 0x2a, 0x16, 0x2c, 0x39, 0x28, 0x82, 0x09, 0xef, 0x83, 0x59, 0x9b, 0xbd, | ||||
| 	0x80, 0x20, 0xd4, 0x69, 0x1e, 0xea, 0x77, 0x84, 0xd9, 0x2c, 0x8a, 0x0a, 0x51, 0x5c, 0x17, 0xde, | ||||
| 	0x03, 0x55, 0xc5, 0xd4, 0x34, 0x9e, 0xf9, 0x6d, 0xd3, 0x35, 0x28, 0x4f, 0xde, 0x52, 0x0b, 0xb2, | ||||
| 	0xce, 0xdc, 0x8e, 0x49, 0x50, 0x42, 0xb3, 0xf1, 0x67, 0x29, 0xda, 0x66, 0xfc, 0xe7, 0x0c, 0xef, | ||||
| 	0xc5, 0xa8, 0xcf, 0x17, 0x09, 0xea, 0xb3, 0x94, 0xb6, 0x88, 0x30, 0x1f, 0x15, 0xcc, 0xb2, 0xe4, | ||||
| 	0x57, 0x8d, 0xbe, 0x77, 0xe1, 0xa2, 0x24, 0x7e, 0x7b, 0xee, 0x53, 0x0a, 0xb4, 0x23, 0x8d, 0x71, | ||||
| 	0x9e, 0xef, 0x3c, 0x2a, 0x44, 0x71, 0xe4, 0xc6, 0x03, 0x50, 0x8d, 0xbf, 0xc3, 0x18, 0xa7, 0x97, | ||||
| 	0x2e, 0xe4, 0xf4, 0x1f, 0x24, 0xb0, 0x9c, 0xe3, 0x1d, 0x6a, 0xa0, 0xaa, 0xe3, 0xd7, 0x91, 0x1c, | ||||
| 	0xb9, 0x90, 0x1b, 0xb3, 0xa9, 0x49, 0xf6, 0xa6, 0x26, 0x79, 0xc7, 0xa0, 0xfb, 0x76, 0x87, 0xda, | ||||
| 	0xaa, 0xd1, 0xf7, 0xee, 0x61, 0x2f, 0x86, 0x85, 0x12, 0xd8, 0xf0, 0x39, 0x28, 0xeb, 0xf8, 0x75, | ||||
| 	0xc7, 0xb5, 0xfb, 0x59, 0xe7, 0x35, 0x9e, 0x1f, 0xde, 0x3f, 0xf6, 0x04, 0x0a, 0x0a, 0xf0, 0x1a, | ||||
| 	0xfb, 0x60, 0x2d, 0xb6, 0x49, 0x56, 0x2a, 0xc8, 0x4b, 0x57, 0xeb, 0x90, 0xf0, 0xc2, 0xbf, 0x06, | ||||
| 	0x15, 0x0b, 0xdb, 0x54, 0x0d, 0xca, 0x45, 0xa9, 0x35, 0x3b, 0x3a, 0x5b, 0xad, 0x1c, 0xf8, 0x8b, | ||||
| 	0x28, 0x94, 0x37, 0xfe, 0x2d, 0x81, 0x52, 0x47, 0xc1, 0x1a, 0xb9, 0x82, 0xd1, 0x61, 0x3b, 0x36, | ||||
| 	0x3a, 0x34, 0x72, 0x93, 0x88, 0xc7, 0x93, 0x3b, 0x35, 0xec, 0x26, 0xa6, 0x86, 0xcf, 0x2f, 0xc0, | ||||
| 	0x39, 0x7f, 0x60, 0xb8, 0x0b, 0x2a, 0x81, 0xbb, 0x58, 0x95, 0x94, 0x2e, 0xaa, 0x92, 0x8d, 0xdf, | ||||
| 	0x17, 0xc0, 0x4c, 0xc4, 0xc5, 0xe5, 0xac, 0xd9, 0x71, 0x47, 0x88, 0x06, 0x2b, 0x43, 0x9b, 0xe3, | ||||
| 	0x6c, 0x44, 0xf6, 0x49, 0x85, 0xc7, 0xdf, 0xc2, 0xee, 0x9d, 0xe6, 0x1a, 0x0f, 0x40, 0x95, 0x62, | ||||
| 	0xbb, 0x4f, 0xa8, 0x2f, 0xe3, 0x07, 0x56, 0x09, 0x99, 0xfe, 0x61, 0x4c, 0x8a, 0x12, 0xda, 0x2b, | ||||
| 	0xf7, 0xc1, 0x6c, 0xcc, 0xd9, 0xa5, 0x48, 0xd8, 0x1b, 0x76, 0x38, 0x61, 0x72, 0x5e, 0x41, 0x76, | ||||
| 	0x3d, 0x89, 0x65, 0xd7, 0x7a, 0xfe, 0x61, 0x46, 0x9e, 0x4c, 0x5e, 0x8e, 0xa1, 0x44, 0x8e, 0x7d, | ||||
| 	0x35, 0x16, 0xda, 0xf9, 0x99, 0xf6, 0x27, 0x09, 0xcc, 0x45, 0xb4, 0xaf, 0x60, 0x82, 0xd9, 0x89, | ||||
| 	0x4f, 0x30, 0x9f, 0x8f, 0xb3, 0x89, 0x9c, 0x11, 0xe6, 0xaf, 0xa5, 0x58, 0xf0, 0xff, 0xf7, 0xa4, | ||||
| 	0xfa, 0x57, 0x60, 0x71, 0x60, 0x6a, 0xae, 0x4e, 0xda, 0x1a, 0x56, 0x75, 0x5f, 0x81, 0x31, 0x98, | ||||
| 	0xc9, 0xe4, 0x1f, 0x15, 0x01, 0x3c, 0xb1, 0x1d, 0xd5, 0xa1, 0xc4, 0xa0, 0xcf, 0x42, 0xcb, 0xd6, | ||||
| 	0x77, 0x85, 0x93, 0xc5, 0x67, 0x19, 0x70, 0x28, 0xd3, 0x09, 0xfc, 0x01, 0x98, 0x61, 0x04, 0x4e, | ||||
| 	0x55, 0x08, 0x9b, 0x05, 0xc5, 0xf4, 0xbf, 0x20, 0x80, 0x66, 0x3a, 0xa1, 0x08, 0x45, 0xf5, 0xe0, | ||||
| 	0x31, 0x58, 0xb0, 0xcc, 0xde, 0x1e, 0x36, 0x70, 0x9f, 0xb0, 0xb6, 0x77, 0xc0, 0xff, 0xd0, 0xe4, | ||||
| 	0x4c, 0xbb, 0xd2, 0xba, 0xed, 0x33, 0xa5, 0x83, 0xb4, 0xca, 0x47, 0x46, 0x59, 0xd3, 0xcb, 0x9c, | ||||
| 	0x07, 0x64, 0x41, 0x42, 0x1b, 0x54, 0x5d, 0xd1, 0x7e, 0xc4, 0xe0, 0xe1, 0xcd, 0xff, 0x9b, 0xe3, | ||||
| 	0x64, 0xd8, 0x51, 0xcc, 0x32, 0xac, 0x46, 0xf1, 0x75, 0x94, 0xf0, 0x90, 0x3b, 0x48, 0x94, 0xff, | ||||
| 	0x9b, 0x41, 0xa2, 0xf1, 0x9b, 0x22, 0x98, 0x4f, 0x3d, 0x5d, 0xf8, 0xa3, 0x73, 0x18, 0xf7, 0xd2, | ||||
| 	0xff, 0x8c, 0x6d, 0xa7, 0x08, 0xe3, 0xe4, 0x25, 0x08, 0xe3, 0x16, 0x98, 0x53, 0x5c, 0xdb, 0x66, | ||||
| 	0xb3, 0x7e, 0x9c, 0x65, 0x07, 0x54, 0xbd, 0x1d, 0x17, 0xa3, 0xa4, 0x7e, 0x16, 0xdb, 0x2f, 0x5d, | ||||
| 	0x92, 0xed, 0x47, 0xa3, 0x10, 0x8c, 0xcd, 0x4b, 0xbb, 0x74, 0x14, 0x82, 0xb8, 0x25, 0xf5, 0x59, | ||||
| 	0xb7, 0xf2, 0x50, 0x03, 0x84, 0xe9, 0x78, 0xb7, 0x3a, 0x8a, 0x49, 0x51, 0x42, 0x3b, 0x83, 0x39, | ||||
| 	0x57, 0xc6, 0x66, 0xce, 0x7f, 0x93, 0xc0, 0xa7, 0xb9, 0x19, 0x0a, 0xb7, 0x62, 0x04, 0x7a, 0x23, | ||||
| 	0x41, 0xa0, 0xbf, 0x97, 0x6b, 0x18, 0xe1, 0xd1, 0x76, 0x36, 0x8f, 0xbe, 0x3b, 0x1e, 0x8f, 0xce, | ||||
| 	0x20, 0x79, 0x17, 0x13, 0xea, 0xd6, 0xc6, 0xe9, 0xfb, 0xfa, 0xc4, 0xdb, 0xf7, 0xf5, 0x89, 0x77, | ||||
| 	0xef, 0xeb, 0x13, 0xbf, 0x1e, 0xd5, 0xa5, 0xd3, 0x51, 0x5d, 0x7a, 0x3b, 0xaa, 0x4b, 0xef, 0x46, | ||||
| 	0x75, 0xe9, 0x1f, 0xa3, 0xba, 0xf4, 0xbb, 0x0f, 0xf5, 0x89, 0xe7, 0xd3, 0xc2, 0xe3, 0x7f, 0x02, | ||||
| 	0x00, 0x00, 0xff, 0xff, 0x3a, 0x2e, 0x29, 0xcd, 0xb9, 0x19, 0x00, 0x00, | ||||
| 	// 1871 bytes of a gzipped FileDescriptorProto
 | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x6f, 0x1b, 0xc7, | ||||
| 	0x15, 0xd7, 0x52, 0xa4, 0x44, 0x3d, 0x45, 0x94, 0x3d, 0x52, 0x2d, 0x46, 0x69, 0x29, 0x61, 0x1b, | ||||
| 	0x24, 0x72, 0x12, 0x2d, 0x63, 0x25, 0x0d, 0x12, 0xbb, 0x08, 0x2a, 0xca, 0x6e, 0xe2, 0x40, 0xaa, | ||||
| 	0x94, 0xa1, 0x94, 0xa2, 0x69, 0x0b, 0x64, 0xb8, 0x1c, 0xd3, 0x1b, 0xed, 0x3f, 0xec, 0x0e, 0x59, | ||||
| 	0x13, 0xbd, 0xf4, 0x03, 0x14, 0x48, 0xcf, 0xfd, 0x14, 0x3d, 0x16, 0xed, 0xad, 0x27, 0x5f, 0x0a, | ||||
| 	0x04, 0xbd, 0x34, 0x27, 0xa1, 0xa6, 0xaf, 0x6d, 0x6f, 0xbd, 0x18, 0x28, 0x50, 0xcc, 0xec, 0xec, | ||||
| 	0xff, 0x5d, 0x89, 0x2a, 0x20, 0x1d, 0x72, 0xe3, 0xce, 0x7b, 0xef, 0xf7, 0xde, 0xcc, 0xbc, 0xf7, | ||||
| 	0xe6, 0xfd, 0x08, 0x3f, 0x3a, 0x7d, 0xdf, 0xd7, 0x0c, 0xa7, 0x7d, 0x3a, 0xec, 0x51, 0xcf, 0xa6, | ||||
| 	0x8c, 0xfa, 0xed, 0x11, 0xb5, 0xfb, 0x8e, 0xd7, 0x96, 0x02, 0xe2, 0x1a, 0x6d, 0xe2, 0xba, 0x7e, | ||||
| 	0x7b, 0x74, 0xa7, 0x47, 0x19, 0xb9, 0xd3, 0x1e, 0x50, 0x9b, 0x7a, 0x84, 0xd1, 0xbe, 0xe6, 0x7a, | ||||
| 	0x0e, 0x73, 0xd0, 0x5a, 0xa0, 0xa8, 0x11, 0xd7, 0xd0, 0xb8, 0xa2, 0x26, 0x15, 0xd7, 0xb7, 0x07, | ||||
| 	0x06, 0x7b, 0x3c, 0xec, 0x69, 0xba, 0x63, 0xb5, 0x07, 0xce, 0xc0, 0x69, 0x0b, 0xfd, 0xde, 0xf0, | ||||
| 	0x91, 0xf8, 0x12, 0x1f, 0xe2, 0x57, 0x80, 0xb3, 0xae, 0x26, 0x1c, 0xea, 0x8e, 0x47, 0xdb, 0xa3, | ||||
| 	0x9c, 0xaf, 0xf5, 0xdb, 0x09, 0x1d, 0xd7, 0x31, 0x0d, 0x7d, 0x5c, 0x16, 0xd6, 0xfa, 0xbb, 0xb1, | ||||
| 	0xaa, 0x45, 0xf4, 0xc7, 0x86, 0x4d, 0xbd, 0x71, 0xdb, 0x3d, 0x1d, 0xf0, 0x05, 0xbf, 0x6d, 0x51, | ||||
| 	0x46, 0x8a, 0x1c, 0xb4, 0xcb, 0xac, 0xbc, 0xa1, 0xcd, 0x0c, 0x8b, 0xe6, 0x0c, 0xde, 0xbb, 0xc8, | ||||
| 	0xc0, 0xd7, 0x1f, 0x53, 0x8b, 0xe4, 0xec, 0xde, 0x29, 0xb3, 0x1b, 0x32, 0xc3, 0x6c, 0x1b, 0x36, | ||||
| 	0xf3, 0x99, 0x97, 0x35, 0x52, 0xff, 0xa3, 0x00, 0xda, 0x73, 0x6c, 0xe6, 0x39, 0xa6, 0x49, 0x3d, | ||||
| 	0x4c, 0x47, 0x86, 0x6f, 0x38, 0x36, 0xfa, 0x02, 0xea, 0x7c, 0x3f, 0x7d, 0xc2, 0x48, 0x53, 0xd9, | ||||
| 	0x54, 0xb6, 0x16, 0x77, 0xde, 0xd6, 0xe2, 0x4b, 0x89, 0xe0, 0x35, 0xf7, 0x74, 0xc0, 0x17, 0x7c, | ||||
| 	0x8d, 0x6b, 0x6b, 0xa3, 0x3b, 0xda, 0x61, 0xef, 0x4b, 0xaa, 0xb3, 0x03, 0xca, 0x48, 0x07, 0x3d, | ||||
| 	0x3d, 0xdb, 0x98, 0x99, 0x9c, 0x6d, 0x40, 0xbc, 0x86, 0x23, 0x54, 0x74, 0x08, 0x55, 0x81, 0x5e, | ||||
| 	0x11, 0xe8, 0xdb, 0xa5, 0xe8, 0x72, 0xd3, 0x1a, 0x26, 0xbf, 0x7a, 0xf0, 0x84, 0x51, 0x9b, 0x87, | ||||
| 	0xd7, 0x79, 0x49, 0x42, 0x57, 0xef, 0x13, 0x46, 0xb0, 0x00, 0x42, 0x6f, 0x41, 0xdd, 0x93, 0xe1, | ||||
| 	0x37, 0x67, 0x37, 0x95, 0xad, 0xd9, 0xce, 0x0d, 0xa9, 0x55, 0x0f, 0xb7, 0x85, 0x23, 0x0d, 0xf5, | ||||
| 	0xa9, 0x02, 0xb7, 0xf2, 0xfb, 0xde, 0x37, 0x7c, 0x86, 0x7e, 0x91, 0xdb, 0xbb, 0x36, 0xdd, 0xde, | ||||
| 	0xb9, 0xb5, 0xd8, 0x79, 0xe4, 0x38, 0x5c, 0x49, 0xec, 0xfb, 0x08, 0x6a, 0x06, 0xa3, 0x96, 0xdf, | ||||
| 	0xac, 0x6c, 0xce, 0x6e, 0x2d, 0xee, 0xbc, 0xa9, 0x95, 0xe4, 0xba, 0x96, 0x8f, 0xae, 0xb3, 0x24, | ||||
| 	0x71, 0x6b, 0x0f, 0x39, 0x02, 0x0e, 0x80, 0xd4, 0xdf, 0x56, 0x00, 0xee, 0x53, 0xd7, 0x74, 0xc6, | ||||
| 	0x16, 0xb5, 0xd9, 0x35, 0x5c, 0xdd, 0x43, 0xa8, 0xfa, 0x2e, 0xd5, 0xe5, 0xd5, 0xbd, 0x5e, 0xba, | ||||
| 	0x83, 0x38, 0xa8, 0xae, 0x4b, 0xf5, 0xf8, 0xd2, 0xf8, 0x17, 0x16, 0x10, 0xe8, 0x53, 0x98, 0xf3, | ||||
| 	0x19, 0x61, 0x43, 0x5f, 0x5c, 0xd9, 0xe2, 0xce, 0xed, 0x69, 0xc0, 0x84, 0x41, 0xa7, 0x21, 0xe1, | ||||
| 	0xe6, 0x82, 0x6f, 0x2c, 0x81, 0xd4, 0xbf, 0xcf, 0xc2, 0x4a, 0xac, 0xbc, 0xe7, 0xd8, 0x7d, 0x83, | ||||
| 	0xf1, 0x94, 0xbe, 0x07, 0x55, 0x36, 0x76, 0xa9, 0x38, 0x93, 0x85, 0xce, 0xeb, 0x61, 0x30, 0xc7, | ||||
| 	0x63, 0x97, 0xbe, 0x38, 0xdb, 0x58, 0x2b, 0x30, 0xe1, 0x22, 0x2c, 0x8c, 0xd0, 0x7e, 0x14, 0x67, | ||||
| 	0x45, 0x98, 0xbf, 0x9b, 0x76, 0xfe, 0xe2, 0x6c, 0xa3, 0xa0, 0xd7, 0x68, 0x11, 0x52, 0x3a, 0x44, | ||||
| 	0xf4, 0x1a, 0xcc, 0x79, 0x94, 0xf8, 0x8e, 0xdd, 0xac, 0x0a, 0xb4, 0x68, 0x2b, 0x58, 0xac, 0x62, | ||||
| 	0x29, 0x45, 0xb7, 0x61, 0xde, 0xa2, 0xbe, 0x4f, 0x06, 0xb4, 0x59, 0x13, 0x8a, 0xcb, 0x52, 0x71, | ||||
| 	0xfe, 0x20, 0x58, 0xc6, 0xa1, 0x1c, 0x7d, 0x09, 0x0d, 0x93, 0xf8, 0xec, 0xc4, 0xed, 0x13, 0x46, | ||||
| 	0x8f, 0x0d, 0x8b, 0x36, 0xe7, 0xc4, 0x81, 0xbe, 0x31, 0xdd, 0xdd, 0x73, 0x8b, 0xce, 0x2d, 0x89, | ||||
| 	0xde, 0xd8, 0x4f, 0x21, 0xe1, 0x0c, 0x32, 0x1a, 0x01, 0xe2, 0x2b, 0xc7, 0x1e, 0xb1, 0xfd, 0xe0, | ||||
| 	0xa0, 0xb8, 0xbf, 0xf9, 0x4b, 0xfb, 0x5b, 0x97, 0xfe, 0xd0, 0x7e, 0x0e, 0x0d, 0x17, 0x78, 0x50, | ||||
| 	0xff, 0xa8, 0x40, 0x23, 0xbe, 0xa6, 0x6b, 0xa8, 0xd5, 0x8f, 0xd3, 0xb5, 0xfa, 0xfd, 0x29, 0x92, | ||||
| 	0xb3, 0xa4, 0x46, 0xff, 0x59, 0x01, 0x14, 0x2b, 0x61, 0xc7, 0x34, 0x7b, 0x44, 0x3f, 0x45, 0x9b, | ||||
| 	0x50, 0xb5, 0x89, 0x15, 0xe6, 0x64, 0x54, 0x20, 0x3f, 0x21, 0x16, 0xc5, 0x42, 0x82, 0xbe, 0x52, | ||||
| 	0x00, 0x0d, 0xc5, 0xd1, 0xf7, 0x77, 0x6d, 0xdb, 0x61, 0x84, 0x9f, 0x46, 0x18, 0xd0, 0xde, 0x14, | ||||
| 	0x01, 0x85, 0xbe, 0xb4, 0x93, 0x1c, 0xca, 0x03, 0x9b, 0x79, 0xe3, 0xf8, 0x16, 0xf2, 0x0a, 0xb8, | ||||
| 	0xc0, 0x35, 0xfa, 0x39, 0x80, 0x27, 0x31, 0x8f, 0x1d, 0x59, 0xb6, 0xe5, 0x3d, 0x20, 0x74, 0xbf, | ||||
| 	0xe7, 0xd8, 0x8f, 0x8c, 0x41, 0xdc, 0x58, 0x70, 0x04, 0x81, 0x13, 0x70, 0xeb, 0x0f, 0x60, 0xad, | ||||
| 	0x24, 0x4e, 0x74, 0x03, 0x66, 0x4f, 0xe9, 0x38, 0x38, 0x2a, 0xcc, 0x7f, 0xa2, 0x55, 0xa8, 0x8d, | ||||
| 	0x88, 0x39, 0xa4, 0x41, 0x4d, 0xe2, 0xe0, 0xe3, 0x6e, 0xe5, 0x7d, 0x45, 0xfd, 0x43, 0x2d, 0x99, | ||||
| 	0x29, 0xbc, 0xdf, 0xa0, 0x2d, 0xfe, 0x3c, 0xb8, 0xa6, 0xa1, 0x13, 0x5f, 0x60, 0xd4, 0x3a, 0x2f, | ||||
| 	0x05, 0x4f, 0x43, 0xb0, 0x86, 0x23, 0x29, 0xfa, 0x25, 0xd4, 0x7d, 0x6a, 0x52, 0x9d, 0x39, 0x9e, | ||||
| 	0x6c, 0x71, 0xef, 0x4c, 0x99, 0x53, 0xa4, 0x47, 0xcd, 0xae, 0x34, 0x0d, 0xe0, 0xc3, 0x2f, 0x1c, | ||||
| 	0x41, 0xa2, 0x4f, 0xa1, 0xce, 0xa8, 0xe5, 0x9a, 0x84, 0x51, 0x79, 0x7a, 0xa9, 0xbc, 0xe2, 0xbd, | ||||
| 	0x83, 0x83, 0x1d, 0x39, 0xfd, 0x63, 0xa9, 0x26, 0xba, 0x67, 0x94, 0xa7, 0xe1, 0x2a, 0x8e, 0x60, | ||||
| 	0xd0, 0xcf, 0xa0, 0xee, 0x33, 0xfe, 0xaa, 0x0f, 0xc6, 0xa2, 0xa3, 0x9c, 0xf7, 0xac, 0x24, 0xfb, | ||||
| 	0x68, 0x60, 0x12, 0x43, 0x87, 0x2b, 0x38, 0x82, 0x43, 0xbb, 0xb0, 0x6c, 0x19, 0x36, 0xa6, 0xa4, | ||||
| 	0x3f, 0xee, 0x52, 0xdd, 0xb1, 0xfb, 0xbe, 0x68, 0x45, 0xb5, 0xce, 0x9a, 0x34, 0x5a, 0x3e, 0x48, | ||||
| 	0x8b, 0x71, 0x56, 0x1f, 0xed, 0xc3, 0x6a, 0xf8, 0xec, 0x7e, 0x6c, 0xf8, 0xcc, 0xf1, 0xc6, 0xfb, | ||||
| 	0x86, 0x65, 0x30, 0xd1, 0xa0, 0x6a, 0x9d, 0xe6, 0xe4, 0x6c, 0x63, 0x15, 0x17, 0xc8, 0x71, 0xa1, | ||||
| 	0x15, 0xef, 0x9d, 0x2e, 0x19, 0xfa, 0xb4, 0x2f, 0x1a, 0x4e, 0x3d, 0xee, 0x9d, 0x47, 0x62, 0x15, | ||||
| 	0x4b, 0x29, 0xfa, 0x69, 0x2a, 0x4d, 0xeb, 0x97, 0x4b, 0xd3, 0x46, 0x79, 0x8a, 0xa2, 0x13, 0x58, | ||||
| 	0x73, 0x3d, 0x67, 0xe0, 0x51, 0xdf, 0xbf, 0x4f, 0x49, 0xdf, 0x34, 0x6c, 0x1a, 0x9e, 0xcc, 0x82, | ||||
| 	0xd8, 0xd1, 0x2b, 0x93, 0xb3, 0x8d, 0xb5, 0xa3, 0x62, 0x15, 0x5c, 0x66, 0xab, 0xfe, 0xa5, 0x0a, | ||||
| 	0x37, 0xb2, 0x6f, 0x1c, 0xfa, 0x04, 0x90, 0xd3, 0xf3, 0xa9, 0x37, 0xa2, 0xfd, 0x8f, 0x82, 0xc1, | ||||
| 	0x8d, 0x4f, 0x37, 0x8a, 0x98, 0x6e, 0xa2, 0xba, 0x3d, 0xcc, 0x69, 0xe0, 0x02, 0xab, 0x60, 0x3e, | ||||
| 	0x92, 0x05, 0x50, 0x11, 0x81, 0x26, 0xe6, 0xa3, 0x5c, 0x11, 0xec, 0xc2, 0xb2, 0xac, 0xfd, 0x50, | ||||
| 	0x28, 0x92, 0x35, 0x71, 0xef, 0x27, 0x69, 0x31, 0xce, 0xea, 0xa3, 0x8f, 0xe0, 0x26, 0x19, 0x11, | ||||
| 	0xc3, 0x24, 0x3d, 0x93, 0x46, 0x20, 0x55, 0x01, 0xf2, 0xb2, 0x04, 0xb9, 0xb9, 0x9b, 0x55, 0xc0, | ||||
| 	0x79, 0x1b, 0x74, 0x00, 0x2b, 0x43, 0x3b, 0x0f, 0x15, 0xe4, 0xe1, 0x2b, 0x12, 0x6a, 0xe5, 0x24, | ||||
| 	0xaf, 0x82, 0x8b, 0xec, 0xd0, 0x17, 0x00, 0x7a, 0xf8, 0x30, 0xfb, 0xcd, 0x39, 0xd1, 0x49, 0xdf, | ||||
| 	0x9a, 0xa2, 0x5e, 0xa2, 0xd7, 0x3c, 0xee, 0x62, 0xd1, 0x92, 0x8f, 0x13, 0x98, 0xe8, 0x1e, 0x2c, | ||||
| 	0x79, 0xbc, 0x02, 0xa2, 0x50, 0xe7, 0x45, 0xa8, 0xdf, 0x91, 0x66, 0x4b, 0x38, 0x29, 0xc4, 0x69, | ||||
| 	0x5d, 0x74, 0x17, 0x1a, 0xba, 0x63, 0x9a, 0x22, 0xf3, 0xf7, 0x9c, 0xa1, 0xcd, 0x44, 0xf2, 0xd6, | ||||
| 	0x3a, 0x88, 0xbf, 0xcc, 0x7b, 0x29, 0x09, 0xce, 0x68, 0xaa, 0x7f, 0x56, 0x92, 0xcf, 0x4c, 0x58, | ||||
| 	0xce, 0xe8, 0x6e, 0x6a, 0xf4, 0x79, 0x2d, 0x33, 0xfa, 0xdc, 0xca, 0x5b, 0x24, 0x26, 0x1f, 0x03, | ||||
| 	0x96, 0x78, 0xf2, 0x1b, 0xf6, 0x20, 0xb8, 0x70, 0xd9, 0x12, 0xdf, 0x3e, 0xb7, 0x94, 0x22, 0xed, | ||||
| 	0xc4, 0xc3, 0x78, 0x53, 0xec, 0x3c, 0x29, 0xc4, 0x69, 0x64, 0xf5, 0x43, 0x68, 0xa4, 0xeb, 0x30, | ||||
| 	0x35, 0xd3, 0x2b, 0x17, 0xce, 0xf4, 0xcf, 0x15, 0x58, 0x2b, 0xf1, 0x8e, 0x4c, 0x68, 0x58, 0xe4, | ||||
| 	0x49, 0x22, 0x47, 0x2e, 0x9c, 0x8d, 0x39, 0x6b, 0xd2, 0x02, 0xd6, 0xa4, 0x3d, 0xb4, 0xd9, 0xa1, | ||||
| 	0xd7, 0x65, 0x9e, 0x61, 0x0f, 0x82, 0x7b, 0x38, 0x48, 0x61, 0xe1, 0x0c, 0x36, 0xfa, 0x1c, 0xea, | ||||
| 	0x16, 0x79, 0xd2, 0x1d, 0x7a, 0x83, 0xa2, 0xf3, 0x9a, 0xce, 0x8f, 0x78, 0x3f, 0x0e, 0x24, 0x0a, | ||||
| 	0x8e, 0xf0, 0xd4, 0x43, 0xd8, 0x4c, 0x6d, 0x92, 0xb7, 0x0a, 0xfa, 0x68, 0x68, 0x76, 0x69, 0x7c, | ||||
| 	0xe1, 0x6f, 0xc2, 0x82, 0x4b, 0x3c, 0x66, 0x44, 0xed, 0xa2, 0xd6, 0x59, 0x9a, 0x9c, 0x6d, 0x2c, | ||||
| 	0x1c, 0x85, 0x8b, 0x38, 0x96, 0xab, 0xff, 0x55, 0xa0, 0xd6, 0xd5, 0x89, 0x49, 0xaf, 0x81, 0x3a, | ||||
| 	0xdc, 0x4f, 0x51, 0x07, 0xb5, 0x34, 0x89, 0x44, 0x3c, 0xa5, 0xac, 0x61, 0x3f, 0xc3, 0x1a, 0x5e, | ||||
| 	0xbd, 0x00, 0xe7, 0x7c, 0xc2, 0xf0, 0x01, 0x2c, 0x44, 0xee, 0x52, 0x5d, 0x52, 0xb9, 0xa8, 0x4b, | ||||
| 	0xaa, 0xbf, 0xaf, 0xc0, 0x62, 0xc2, 0xc5, 0xe5, 0xac, 0xf9, 0x71, 0x27, 0x06, 0x0d, 0xde, 0x86, | ||||
| 	0x76, 0xa6, 0xd9, 0x88, 0x16, 0x0e, 0x15, 0xc1, 0xfc, 0x16, 0xbf, 0xde, 0xf9, 0x59, 0xe3, 0x43, | ||||
| 	0x68, 0x30, 0xe2, 0x0d, 0x28, 0x0b, 0x65, 0xe2, 0xc0, 0x16, 0xe2, 0x49, 0xff, 0x38, 0x25, 0xc5, | ||||
| 	0x19, 0xed, 0xf5, 0x7b, 0xb0, 0x94, 0x72, 0x76, 0xa9, 0x21, 0xec, 0x2b, 0x7e, 0x38, 0x71, 0x72, | ||||
| 	0x5e, 0x43, 0x76, 0x7d, 0x92, 0xca, 0xae, 0xad, 0xf2, 0xc3, 0x4c, 0x94, 0x4c, 0x59, 0x8e, 0xe1, | ||||
| 	0x4c, 0x8e, 0xbd, 0x31, 0x15, 0xda, 0xf9, 0x99, 0xf6, 0xaf, 0x0a, 0xac, 0x26, 0xb4, 0x63, 0x6e, | ||||
| 	0xfa, 0xc3, 0x54, 0x83, 0xde, 0xca, 0x34, 0xe8, 0x66, 0x91, 0xcd, 0x95, 0x91, 0xd3, 0x62, 0x76, | ||||
| 	0x37, 0x7b, 0xd5, 0xec, 0xee, 0x0a, 0x48, 0xb1, 0xfa, 0x27, 0x05, 0x96, 0x13, 0x67, 0x77, 0x0d, | ||||
| 	0x8c, 0xf1, 0x61, 0x9a, 0x31, 0xbe, 0x3a, 0x4d, 0xd2, 0x94, 0x50, 0xc6, 0xbf, 0xd6, 0x52, 0xc1, | ||||
| 	0x7f, 0xeb, 0x49, 0xcc, 0xaf, 0x61, 0x75, 0xe4, 0x98, 0x43, 0x8b, 0xee, 0x99, 0xc4, 0xb0, 0x42, | ||||
| 	0x05, 0x3e, 0x31, 0xce, 0x66, 0xff, 0x18, 0x8a, 0xe0, 0xa9, 0xe7, 0x1b, 0x3e, 0xa3, 0x36, 0xfb, | ||||
| 	0x2c, 0xb6, 0xec, 0x7c, 0x57, 0x3a, 0x59, 0xfd, 0xac, 0x00, 0x0e, 0x17, 0x3a, 0x41, 0x3f, 0x80, | ||||
| 	0x45, 0x3e, 0x30, 0x1b, 0x3a, 0xe5, 0xdc, 0x5b, 0x26, 0xd6, 0x8a, 0x04, 0x5a, 0xec, 0xc6, 0x22, | ||||
| 	0x9c, 0xd4, 0x43, 0x8f, 0x61, 0xc5, 0x75, 0xfa, 0x07, 0xc4, 0x26, 0x03, 0xca, 0xc7, 0x8c, 0x23, | ||||
| 	0xf1, 0x07, 0xb2, 0x60, 0x36, 0x0b, 0x9d, 0xf7, 0xc2, 0xc9, 0xf4, 0x28, 0xaf, 0xf2, 0x82, 0x53, | ||||
| 	0x84, 0xfc, 0xb2, 0x28, 0xea, 0x22, 0x48, 0xe4, 0x41, 0x63, 0x28, 0x9f, 0x7b, 0x49, 0xf4, 0x82, | ||||
| 	0xff, 0x5b, 0x76, 0xa6, 0xc9, 0xb0, 0x93, 0x94, 0x65, 0xdc, 0xfd, 0xd3, 0xeb, 0x38, 0xe3, 0xa1, | ||||
| 	0x94, 0xb8, 0xd5, 0xff, 0x1f, 0xe2, 0xa6, 0xfe, 0xbb, 0x0a, 0x37, 0x73, 0xad, 0x12, 0xfd, 0xf8, | ||||
| 	0x1c, 0x86, 0x73, 0xeb, 0xca, 0xd8, 0x4d, 0x6e, 0x40, 0x9f, 0xbd, 0xc4, 0x80, 0xbe, 0x0b, 0xcb, | ||||
| 	0xfa, 0xd0, 0xf3, 0xa8, 0xcd, 0x32, 0xac, 0x26, 0xa2, 0x46, 0x7b, 0x69, 0x31, 0xce, 0xea, 0x17, | ||||
| 	0xb1, 0xab, 0xda, 0x25, 0xd9, 0x55, 0x32, 0x0a, 0x39, 0x21, 0x07, 0x69, 0x97, 0x8f, 0x42, 0x0e, | ||||
| 	0xca, 0x59, 0x7d, 0x3e, 0x1d, 0x04, 0xa8, 0x11, 0xc2, 0x7c, 0x7a, 0x3a, 0x38, 0x49, 0x49, 0x71, | ||||
| 	0x46, 0xbb, 0x80, 0xa9, 0x2c, 0x4c, 0xcb, 0x54, 0x10, 0x49, 0x91, 0x30, 0x10, 0x35, 0xbe, 0x3d, | ||||
| 	0x4d, 0x2e, 0x4f, 0xcd, 0xc2, 0xd4, 0xbf, 0x29, 0xf0, 0x72, 0x69, 0x11, 0xa0, 0xdd, 0xd4, 0x93, | ||||
| 	0xbb, 0x9d, 0x79, 0x72, 0xbf, 0x57, 0x6a, 0x98, 0x78, 0x77, 0xbd, 0x62, 0x6a, 0xf4, 0xc1, 0x74, | ||||
| 	0xd4, 0xa8, 0x60, 0x6e, 0xbf, 0x98, 0x23, 0x75, 0xb6, 0x9f, 0x3e, 0x6b, 0xcd, 0x7c, 0xfd, 0xac, | ||||
| 	0x35, 0xf3, 0xcd, 0xb3, 0xd6, 0xcc, 0x6f, 0x26, 0x2d, 0xe5, 0xe9, 0xa4, 0xa5, 0x7c, 0x3d, 0x69, | ||||
| 	0x29, 0xdf, 0x4c, 0x5a, 0xca, 0x3f, 0x26, 0x2d, 0xe5, 0x77, 0xcf, 0x5b, 0x33, 0x9f, 0xcf, 0x4b, | ||||
| 	0x8f, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x9d, 0x5d, 0x9e, 0x04, 0x8c, 0x1b, 0x00, 0x00, | ||||
| } | ||||
|  |  | |||
|  | @ -338,6 +338,27 @@ message StatefulSet { | |||
|   optional StatefulSetStatus status = 3; | ||||
| } | ||||
| 
 | ||||
| // StatefulSetCondition describes the state of a statefulset at a certain point. | ||||
| message StatefulSetCondition { | ||||
|   // Type of statefulset condition. | ||||
|   optional string type = 1; | ||||
| 
 | ||||
|   // Status of the condition, one of True, False, Unknown. | ||||
|   optional string status = 2; | ||||
| 
 | ||||
|   // Last time the condition transitioned from one status to another. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; | ||||
| 
 | ||||
|   // The reason for the condition's last transition. | ||||
|   // +optional | ||||
|   optional string reason = 4; | ||||
| 
 | ||||
|   // A human readable message indicating details about the transition. | ||||
|   // +optional | ||||
|   optional string message = 5; | ||||
| } | ||||
| 
 | ||||
| // StatefulSetList is a collection of StatefulSets. | ||||
| message StatefulSetList { | ||||
|   // +optional | ||||
|  | @ -442,6 +463,12 @@ message StatefulSetStatus { | |||
|   // newest ControllerRevision. | ||||
|   // +optional | ||||
|   optional int32 collisionCount = 9; | ||||
| 
 | ||||
|   // Represents the latest available observations of a statefulset's current state. | ||||
|   // +optional | ||||
|   // +patchMergeKey=type | ||||
|   // +patchStrategy=merge | ||||
|   repeated StatefulSetCondition conditions = 10; | ||||
| } | ||||
| 
 | ||||
| // StatefulSetUpdateStrategy indicates the strategy that the StatefulSet | ||||
|  |  | |||
|  | @ -41,7 +41,7 @@ var ( | |||
| 	AddToScheme        = localSchemeBuilder.AddToScheme | ||||
| ) | ||||
| 
 | ||||
| // Adds the list of known types to api.Scheme.
 | ||||
| // Adds the list of known types to the given scheme.
 | ||||
| func addKnownTypes(scheme *runtime.Scheme) error { | ||||
| 	scheme.AddKnownTypes(SchemeGroupVersion, | ||||
| 		&Deployment{}, | ||||
|  |  | |||
|  | @ -26,6 +26,7 @@ import ( | |||
| const ( | ||||
| 	ControllerRevisionHashLabelKey = "controller-revision-hash" | ||||
| 	StatefulSetRevisionLabel       = ControllerRevisionHashLabelKey | ||||
| 	StatefulSetPodNameLabel        = "statefulset.kubernetes.io/pod-name" | ||||
| ) | ||||
| 
 | ||||
| // ScaleSpec describes the attributes of a scale subresource
 | ||||
|  | @ -247,6 +248,31 @@ type StatefulSetStatus struct { | |||
| 	// newest ControllerRevision.
 | ||||
| 	// +optional
 | ||||
| 	CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"` | ||||
| 
 | ||||
| 	// Represents the latest available observations of a statefulset's current state.
 | ||||
| 	// +optional
 | ||||
| 	// +patchMergeKey=type
 | ||||
| 	// +patchStrategy=merge
 | ||||
| 	Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` | ||||
| } | ||||
| 
 | ||||
| type StatefulSetConditionType string | ||||
| 
 | ||||
| // StatefulSetCondition describes the state of a statefulset at a certain point.
 | ||||
| type StatefulSetCondition struct { | ||||
| 	// Type of statefulset condition.
 | ||||
| 	Type StatefulSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetConditionType"` | ||||
| 	// Status of the condition, one of True, False, Unknown.
 | ||||
| 	Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` | ||||
| 	// Last time the condition transitioned from one status to another.
 | ||||
| 	// +optional
 | ||||
| 	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` | ||||
| 	// The reason for the condition's last transition.
 | ||||
| 	// +optional
 | ||||
| 	Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` | ||||
| 	// A human readable message indicating details about the transition.
 | ||||
| 	// +optional
 | ||||
| 	Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` | ||||
| } | ||||
| 
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
|  |  | |||
|  | @ -206,6 +206,19 @@ func (StatefulSet) SwaggerDoc() map[string]string { | |||
| 	return map_StatefulSet | ||||
| } | ||||
| 
 | ||||
| var map_StatefulSetCondition = map[string]string{ | ||||
| 	"":                   "StatefulSetCondition describes the state of a statefulset at a certain point.", | ||||
| 	"type":               "Type of statefulset condition.", | ||||
| 	"status":             "Status of the condition, one of True, False, Unknown.", | ||||
| 	"lastTransitionTime": "Last time the condition transitioned from one status to another.", | ||||
| 	"reason":             "The reason for the condition's last transition.", | ||||
| 	"message":            "A human readable message indicating details about the transition.", | ||||
| } | ||||
| 
 | ||||
| func (StatefulSetCondition) SwaggerDoc() map[string]string { | ||||
| 	return map_StatefulSetCondition | ||||
| } | ||||
| 
 | ||||
| var map_StatefulSetList = map[string]string{ | ||||
| 	"": "StatefulSetList is a collection of StatefulSets.", | ||||
| } | ||||
|  | @ -240,6 +253,7 @@ var map_StatefulSetStatus = map[string]string{ | |||
| 	"currentRevision":    "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", | ||||
| 	"updateRevision":     "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", | ||||
| 	"collisionCount":     "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", | ||||
| 	"conditions":         "Represents the latest available observations of a statefulset's current state.", | ||||
| } | ||||
| 
 | ||||
| func (StatefulSetStatus) SwaggerDoc() map[string]string { | ||||
|  |  | |||
|  | @ -23,105 +23,10 @@ package v1beta1 | |||
| import ( | ||||
| 	core_v1 "k8s.io/api/core/v1" | ||||
| 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
| 	conversion "k8s.io/apimachinery/pkg/conversion" | ||||
| 	runtime "k8s.io/apimachinery/pkg/runtime" | ||||
| 	intstr "k8s.io/apimachinery/pkg/util/intstr" | ||||
| 	reflect "reflect" | ||||
| ) | ||||
| 
 | ||||
| func init() { | ||||
| 	SchemeBuilder.Register(RegisterDeepCopies) | ||||
| } | ||||
| 
 | ||||
| // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
 | ||||
| // to allow building arbitrary schemes.
 | ||||
| //
 | ||||
| // Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
 | ||||
| func RegisterDeepCopies(scheme *runtime.Scheme) error { | ||||
| 	return scheme.AddGeneratedDeepCopyFuncs( | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ControllerRevision).DeepCopyInto(out.(*ControllerRevision)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ControllerRevision{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ControllerRevisionList).DeepCopyInto(out.(*ControllerRevisionList)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ControllerRevisionList{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*Deployment).DeepCopyInto(out.(*Deployment)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&Deployment{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DeploymentCondition).DeepCopyInto(out.(*DeploymentCondition)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DeploymentCondition{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DeploymentList).DeepCopyInto(out.(*DeploymentList)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DeploymentList{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DeploymentRollback).DeepCopyInto(out.(*DeploymentRollback)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DeploymentRollback{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DeploymentSpec).DeepCopyInto(out.(*DeploymentSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DeploymentSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DeploymentStatus).DeepCopyInto(out.(*DeploymentStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DeploymentStatus{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DeploymentStrategy).DeepCopyInto(out.(*DeploymentStrategy)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DeploymentStrategy{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*RollbackConfig).DeepCopyInto(out.(*RollbackConfig)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&RollbackConfig{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*RollingUpdateDeployment).DeepCopyInto(out.(*RollingUpdateDeployment)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&RollingUpdateDeployment{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*RollingUpdateStatefulSetStrategy).DeepCopyInto(out.(*RollingUpdateStatefulSetStrategy)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&RollingUpdateStatefulSetStrategy{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*Scale).DeepCopyInto(out.(*Scale)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&Scale{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ScaleSpec).DeepCopyInto(out.(*ScaleSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ScaleSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ScaleStatus).DeepCopyInto(out.(*ScaleStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ScaleStatus{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*StatefulSet).DeepCopyInto(out.(*StatefulSet)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&StatefulSet{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*StatefulSetList).DeepCopyInto(out.(*StatefulSetList)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&StatefulSetList{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*StatefulSetSpec).DeepCopyInto(out.(*StatefulSetSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&StatefulSetSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*StatefulSetStatus).DeepCopyInto(out.(*StatefulSetStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&StatefulSetStatus{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*StatefulSetUpdateStrategy).DeepCopyInto(out.(*StatefulSetUpdateStrategy)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&StatefulSetUpdateStrategy{})}, | ||||
| 	) | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *ControllerRevision) DeepCopyInto(out *ControllerRevision) { | ||||
| 	*out = *in | ||||
|  | @ -591,6 +496,23 @@ func (in *StatefulSet) DeepCopyObject() runtime.Object { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *StatefulSetCondition) DeepCopyInto(out *StatefulSetCondition) { | ||||
| 	*out = *in | ||||
| 	in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetCondition.
 | ||||
| func (in *StatefulSetCondition) DeepCopy() *StatefulSetCondition { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(StatefulSetCondition) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *StatefulSetList) DeepCopyInto(out *StatefulSetList) { | ||||
| 	*out = *in | ||||
|  | @ -698,6 +620,13 @@ func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus) { | |||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	if in.Conditions != nil { | ||||
| 		in, out := &in.Conditions, &out.Conditions | ||||
| 		*out = make([]StatefulSetCondition, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -21,7 +21,6 @@ go_library( | |||
|         "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", | ||||
|         "//vendor/k8s.io/api/core/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/schema:go_default_library", | ||||
|         "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| // +k8s:deepcopy-gen=package,register
 | ||||
| // +k8s:deepcopy-gen=package
 | ||||
| // +k8s:openapi-gen=true
 | ||||
| 
 | ||||
| package v1beta2 // import "k8s.io/api/apps/v1beta2"
 | ||||
|  |  | |||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -31,6 +31,8 @@ import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; | |||
| // Package-wide variables from generator "generated". | ||||
| option go_package = "v1beta2"; | ||||
| 
 | ||||
| // DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the | ||||
| // release notes for more information. | ||||
| // ControllerRevision implements an immutable snapshot of state data. Clients | ||||
| // are responsible for serializing and deserializing the objects that contain | ||||
| // their internal state. | ||||
|  | @ -63,6 +65,8 @@ message ControllerRevisionList { | |||
|   repeated ControllerRevision items = 2; | ||||
| } | ||||
| 
 | ||||
| // DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for | ||||
| // more information. | ||||
| // DaemonSet represents the configuration of a daemon set. | ||||
| message DaemonSet { | ||||
|   // Standard object's metadata. | ||||
|  | @ -84,6 +88,27 @@ message DaemonSet { | |||
|   optional DaemonSetStatus status = 3; | ||||
| } | ||||
| 
 | ||||
| // DaemonSetCondition describes the state of a DaemonSet at a certain point. | ||||
| message DaemonSetCondition { | ||||
|   // Type of DaemonSet condition. | ||||
|   optional string type = 1; | ||||
| 
 | ||||
|   // Status of the condition, one of True, False, Unknown. | ||||
|   optional string status = 2; | ||||
| 
 | ||||
|   // Last time the condition transitioned from one status to another. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; | ||||
| 
 | ||||
|   // The reason for the condition's last transition. | ||||
|   // +optional | ||||
|   optional string reason = 4; | ||||
| 
 | ||||
|   // A human readable message indicating details about the transition. | ||||
|   // +optional | ||||
|   optional string message = 5; | ||||
| } | ||||
| 
 | ||||
| // DaemonSetList is a collection of daemon sets. | ||||
| message DaemonSetList { | ||||
|   // Standard list metadata. | ||||
|  | @ -99,9 +124,8 @@ message DaemonSetList { | |||
| message DaemonSetSpec { | ||||
|   // A label query over pods that are managed by the daemon set. | ||||
|   // Must match in order to be controlled. | ||||
|   // If empty, defaulted to labels on Pod template. | ||||
|   // It must match the pod template's labels. | ||||
|   // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1; | ||||
| 
 | ||||
|   // An object that describes the pod that will be created. | ||||
|  | @ -175,6 +199,12 @@ message DaemonSetStatus { | |||
|   // create the name for the newest ControllerRevision. | ||||
|   // +optional | ||||
|   optional int32 collisionCount = 9; | ||||
| 
 | ||||
|   // Represents the latest available observations of a DaemonSet's current state. | ||||
|   // +optional | ||||
|   // +patchMergeKey=type | ||||
|   // +patchStrategy=merge | ||||
|   repeated DaemonSetCondition conditions = 10; | ||||
| } | ||||
| 
 | ||||
| // DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. | ||||
|  | @ -192,6 +222,8 @@ message DaemonSetUpdateStrategy { | |||
|   optional RollingUpdateDaemonSet rollingUpdate = 2; | ||||
| } | ||||
| 
 | ||||
| // DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for | ||||
| // more information. | ||||
| // Deployment enables declarative updates for Pods and ReplicaSets. | ||||
| message Deployment { | ||||
|   // Standard object metadata. | ||||
|  | @ -247,7 +279,7 @@ message DeploymentSpec { | |||
| 
 | ||||
|   // Label selector for pods. Existing ReplicaSets whose pods are | ||||
|   // selected by this will be the ones affected by this deployment. | ||||
|   // +optional | ||||
|   // It must match the pod template's labels. | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; | ||||
| 
 | ||||
|   // Template describes the pods that will be created. | ||||
|  | @ -336,6 +368,8 @@ message DeploymentStrategy { | |||
|   optional RollingUpdateDeployment rollingUpdate = 2; | ||||
| } | ||||
| 
 | ||||
| // DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for | ||||
| // more information. | ||||
| // ReplicaSet ensures that a specified number of pod replicas are running at any given time. | ||||
| message ReplicaSet { | ||||
|   // If the Labels of a ReplicaSet are empty, they are defaulted to | ||||
|  | @ -407,10 +441,9 @@ message ReplicaSetSpec { | |||
|   optional int32 minReadySeconds = 4; | ||||
| 
 | ||||
|   // Selector is a label query over pods that should match the replica count. | ||||
|   // If the selector is empty, it is defaulted to the labels present on the pod template. | ||||
|   // Label keys and values that must match in order to be controlled by this replica set. | ||||
|   // It must match the pod template's labels. | ||||
|   // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; | ||||
| 
 | ||||
|   // Template is the object that describes the pod that will be created if | ||||
|  | @ -549,6 +582,8 @@ message ScaleStatus { | |||
|   optional string targetSelector = 3; | ||||
| } | ||||
| 
 | ||||
| // DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for | ||||
| // more information. | ||||
| // StatefulSet represents a set of pods with consistent identities. | ||||
| // Identities are defined as: | ||||
| //  - Network: A single stable DNS and hostname. | ||||
|  | @ -569,6 +604,27 @@ message StatefulSet { | |||
|   optional StatefulSetStatus status = 3; | ||||
| } | ||||
| 
 | ||||
| // StatefulSetCondition describes the state of a statefulset at a certain point. | ||||
| message StatefulSetCondition { | ||||
|   // Type of statefulset condition. | ||||
|   optional string type = 1; | ||||
| 
 | ||||
|   // Status of the condition, one of True, False, Unknown. | ||||
|   optional string status = 2; | ||||
| 
 | ||||
|   // Last time the condition transitioned from one status to another. | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; | ||||
| 
 | ||||
|   // The reason for the condition's last transition. | ||||
|   // +optional | ||||
|   optional string reason = 4; | ||||
| 
 | ||||
|   // A human readable message indicating details about the transition. | ||||
|   // +optional | ||||
|   optional string message = 5; | ||||
| } | ||||
| 
 | ||||
| // StatefulSetList is a collection of StatefulSets. | ||||
| message StatefulSetList { | ||||
|   // +optional | ||||
|  | @ -588,9 +644,8 @@ message StatefulSetSpec { | |||
|   optional int32 replicas = 1; | ||||
| 
 | ||||
|   // selector is a label query over pods that should match the replica count. | ||||
|   // If empty, defaulted to labels on the pod template. | ||||
|   // It must match the pod template's labels. | ||||
|   // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors | ||||
|   // +optional | ||||
|   optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; | ||||
| 
 | ||||
|   // template is the object that describes the pod that will be created if | ||||
|  | @ -673,6 +728,12 @@ message StatefulSetStatus { | |||
|   // newest ControllerRevision. | ||||
|   // +optional | ||||
|   optional int32 collisionCount = 9; | ||||
| 
 | ||||
|   // Represents the latest available observations of a statefulset's current state. | ||||
|   // +optional | ||||
|   // +patchMergeKey=type | ||||
|   // +patchStrategy=merge | ||||
|   repeated StatefulSetCondition conditions = 10; | ||||
| } | ||||
| 
 | ||||
| // StatefulSetUpdateStrategy indicates the strategy that the StatefulSet | ||||
|  |  | |||
|  | @ -41,7 +41,7 @@ var ( | |||
| 	AddToScheme        = localSchemeBuilder.AddToScheme | ||||
| ) | ||||
| 
 | ||||
| // Adds the list of known types to api.Scheme.
 | ||||
| // Adds the list of known types to the given scheme.
 | ||||
| func addKnownTypes(scheme *runtime.Scheme) error { | ||||
| 	scheme.AddKnownTypes(SchemeGroupVersion, | ||||
| 		&Deployment{}, | ||||
|  |  | |||
|  | @ -28,6 +28,7 @@ const ( | |||
| 	StatefulSetRevisionLabel       = ControllerRevisionHashLabelKey | ||||
| 	DeprecatedRollbackTo           = "deprecated.deployment.rollback.to" | ||||
| 	DeprecatedTemplateGeneration   = "deprecated.daemonset.template.generation" | ||||
| 	StatefulSetPodNameLabel        = "statefulset.kubernetes.io/pod-name" | ||||
| ) | ||||
| 
 | ||||
| // ScaleSpec describes the attributes of a scale subresource
 | ||||
|  | @ -81,6 +82,8 @@ type Scale struct { | |||
| // +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for
 | ||||
| // more information.
 | ||||
| // StatefulSet represents a set of pods with consistent identities.
 | ||||
| // Identities are defined as:
 | ||||
| //  - Network: A single stable DNS and hostname.
 | ||||
|  | @ -169,10 +172,9 @@ type StatefulSetSpec struct { | |||
| 	Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` | ||||
| 
 | ||||
| 	// selector is a label query over pods that should match the replica count.
 | ||||
| 	// If empty, defaulted to labels on the pod template.
 | ||||
| 	// It must match the pod template's labels.
 | ||||
| 	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
 | ||||
| 	// +optional
 | ||||
| 	Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` | ||||
| 	Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"` | ||||
| 
 | ||||
| 	// template is the object that describes the pod that will be created if
 | ||||
| 	// insufficient replicas are detected. Each pod stamped out by the StatefulSet
 | ||||
|  | @ -254,6 +256,31 @@ type StatefulSetStatus struct { | |||
| 	// newest ControllerRevision.
 | ||||
| 	// +optional
 | ||||
| 	CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"` | ||||
| 
 | ||||
| 	// Represents the latest available observations of a statefulset's current state.
 | ||||
| 	// +optional
 | ||||
| 	// +patchMergeKey=type
 | ||||
| 	// +patchStrategy=merge
 | ||||
| 	Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` | ||||
| } | ||||
| 
 | ||||
| type StatefulSetConditionType string | ||||
| 
 | ||||
| // StatefulSetCondition describes the state of a statefulset at a certain point.
 | ||||
| type StatefulSetCondition struct { | ||||
| 	// Type of statefulset condition.
 | ||||
| 	Type StatefulSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetConditionType"` | ||||
| 	// Status of the condition, one of True, False, Unknown.
 | ||||
| 	Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` | ||||
| 	// Last time the condition transitioned from one status to another.
 | ||||
| 	// +optional
 | ||||
| 	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` | ||||
| 	// The reason for the condition's last transition.
 | ||||
| 	// +optional
 | ||||
| 	Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` | ||||
| 	// A human readable message indicating details about the transition.
 | ||||
| 	// +optional
 | ||||
| 	Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` | ||||
| } | ||||
| 
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
|  | @ -269,6 +296,8 @@ type StatefulSetList struct { | |||
| // +genclient
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for
 | ||||
| // more information.
 | ||||
| // Deployment enables declarative updates for Pods and ReplicaSets.
 | ||||
| type Deployment struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
|  | @ -294,8 +323,8 @@ type DeploymentSpec struct { | |||
| 
 | ||||
| 	// Label selector for pods. Existing ReplicaSets whose pods are
 | ||||
| 	// selected by this will be the ones affected by this deployment.
 | ||||
| 	// +optional
 | ||||
| 	Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` | ||||
| 	// It must match the pod template's labels.
 | ||||
| 	Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"` | ||||
| 
 | ||||
| 	// Template describes the pods that will be created.
 | ||||
| 	Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"` | ||||
|  | @ -525,10 +554,9 @@ type RollingUpdateDaemonSet struct { | |||
| type DaemonSetSpec struct { | ||||
| 	// A label query over pods that are managed by the daemon set.
 | ||||
| 	// Must match in order to be controlled.
 | ||||
| 	// If empty, defaulted to labels on Pod template.
 | ||||
| 	// It must match the pod template's labels.
 | ||||
| 	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
 | ||||
| 	// +optional
 | ||||
| 	Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"` | ||||
| 	Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,1,opt,name=selector"` | ||||
| 
 | ||||
| 	// An object that describes the pod that will be created.
 | ||||
| 	// The DaemonSet will create exactly one copy of this pod on every node
 | ||||
|  | @ -601,11 +629,40 @@ type DaemonSetStatus struct { | |||
| 	// create the name for the newest ControllerRevision.
 | ||||
| 	// +optional
 | ||||
| 	CollisionCount *int32 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"` | ||||
| 
 | ||||
| 	// Represents the latest available observations of a DaemonSet's current state.
 | ||||
| 	// +optional
 | ||||
| 	// +patchMergeKey=type
 | ||||
| 	// +patchStrategy=merge
 | ||||
| 	Conditions []DaemonSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` | ||||
| } | ||||
| 
 | ||||
| type DaemonSetConditionType string | ||||
| 
 | ||||
| // TODO: Add valid condition types of a DaemonSet.
 | ||||
| 
 | ||||
| // DaemonSetCondition describes the state of a DaemonSet at a certain point.
 | ||||
| type DaemonSetCondition struct { | ||||
| 	// Type of DaemonSet condition.
 | ||||
| 	Type DaemonSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DaemonSetConditionType"` | ||||
| 	// Status of the condition, one of True, False, Unknown.
 | ||||
| 	Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` | ||||
| 	// Last time the condition transitioned from one status to another.
 | ||||
| 	// +optional
 | ||||
| 	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` | ||||
| 	// The reason for the condition's last transition.
 | ||||
| 	// +optional
 | ||||
| 	Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` | ||||
| 	// A human readable message indicating details about the transition.
 | ||||
| 	// +optional
 | ||||
| 	Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` | ||||
| } | ||||
| 
 | ||||
| // +genclient
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for
 | ||||
| // more information.
 | ||||
| // DaemonSet represents the configuration of a daemon set.
 | ||||
| type DaemonSet struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
|  | @ -652,6 +709,8 @@ type DaemonSetList struct { | |||
| // +genclient
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for
 | ||||
| // more information.
 | ||||
| // ReplicaSet ensures that a specified number of pod replicas are running at any given time.
 | ||||
| type ReplicaSet struct { | ||||
| 	metav1.TypeMeta `json:",inline"` | ||||
|  | @ -707,11 +766,10 @@ type ReplicaSetSpec struct { | |||
| 	MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"` | ||||
| 
 | ||||
| 	// Selector is a label query over pods that should match the replica count.
 | ||||
| 	// If the selector is empty, it is defaulted to the labels present on the pod template.
 | ||||
| 	// Label keys and values that must match in order to be controlled by this replica set.
 | ||||
| 	// It must match the pod template's labels.
 | ||||
| 	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
 | ||||
| 	// +optional
 | ||||
| 	Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` | ||||
| 	Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"` | ||||
| 
 | ||||
| 	// Template is the object that describes the pod that will be created if
 | ||||
| 	// insufficient replicas are detected.
 | ||||
|  | @ -779,6 +837,8 @@ type ReplicaSetCondition struct { | |||
| // +genclient
 | ||||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | ||||
| 
 | ||||
| // DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the
 | ||||
| // release notes for more information.
 | ||||
| // ControllerRevision implements an immutable snapshot of state data. Clients
 | ||||
| // are responsible for serializing and deserializing the objects that contain
 | ||||
| // their internal state.
 | ||||
|  |  | |||
|  | @ -28,7 +28,7 @@ package v1beta2 | |||
| 
 | ||||
| // AUTO-GENERATED FUNCTIONS START HERE
 | ||||
| var map_ControllerRevision = map[string]string{ | ||||
| 	"":         "ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", | ||||
| 	"":         "DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", | ||||
| 	"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", | ||||
| 	"data":     "Data is the serialized representation of the state.", | ||||
| 	"revision": "Revision indicates the revision of the state represented by Data.", | ||||
|  | @ -49,7 +49,7 @@ func (ControllerRevisionList) SwaggerDoc() map[string]string { | |||
| } | ||||
| 
 | ||||
| var map_DaemonSet = map[string]string{ | ||||
| 	"":         "DaemonSet represents the configuration of a daemon set.", | ||||
| 	"":         "DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.", | ||||
| 	"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", | ||||
| 	"spec":     "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", | ||||
| 	"status":   "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", | ||||
|  | @ -59,6 +59,19 @@ func (DaemonSet) SwaggerDoc() map[string]string { | |||
| 	return map_DaemonSet | ||||
| } | ||||
| 
 | ||||
| var map_DaemonSetCondition = map[string]string{ | ||||
| 	"":                   "DaemonSetCondition describes the state of a DaemonSet at a certain point.", | ||||
| 	"type":               "Type of DaemonSet condition.", | ||||
| 	"status":             "Status of the condition, one of True, False, Unknown.", | ||||
| 	"lastTransitionTime": "Last time the condition transitioned from one status to another.", | ||||
| 	"reason":             "The reason for the condition's last transition.", | ||||
| 	"message":            "A human readable message indicating details about the transition.", | ||||
| } | ||||
| 
 | ||||
| func (DaemonSetCondition) SwaggerDoc() map[string]string { | ||||
| 	return map_DaemonSetCondition | ||||
| } | ||||
| 
 | ||||
| var map_DaemonSetList = map[string]string{ | ||||
| 	"":         "DaemonSetList is a collection of daemon sets.", | ||||
| 	"metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", | ||||
|  | @ -71,7 +84,7 @@ func (DaemonSetList) SwaggerDoc() map[string]string { | |||
| 
 | ||||
| var map_DaemonSetSpec = map[string]string{ | ||||
| 	"":                     "DaemonSetSpec is the specification of a daemon set.", | ||||
| 	"selector":             "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", | ||||
| 	"selector":             "A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", | ||||
| 	"template":             "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", | ||||
| 	"updateStrategy":       "An update strategy to replace existing DaemonSet pods with new pods.", | ||||
| 	"minReadySeconds":      "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).", | ||||
|  | @ -93,6 +106,7 @@ var map_DaemonSetStatus = map[string]string{ | |||
| 	"numberAvailable":        "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", | ||||
| 	"numberUnavailable":      "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", | ||||
| 	"collisionCount":         "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", | ||||
| 	"conditions":             "Represents the latest available observations of a DaemonSet's current state.", | ||||
| } | ||||
| 
 | ||||
| func (DaemonSetStatus) SwaggerDoc() map[string]string { | ||||
|  | @ -110,7 +124,7 @@ func (DaemonSetUpdateStrategy) SwaggerDoc() map[string]string { | |||
| } | ||||
| 
 | ||||
| var map_Deployment = map[string]string{ | ||||
| 	"":         "Deployment enables declarative updates for Pods and ReplicaSets.", | ||||
| 	"":         "DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.", | ||||
| 	"metadata": "Standard object metadata.", | ||||
| 	"spec":     "Specification of the desired behavior of the Deployment.", | ||||
| 	"status":   "Most recently observed status of the Deployment.", | ||||
|  | @ -147,7 +161,7 @@ func (DeploymentList) SwaggerDoc() map[string]string { | |||
| var map_DeploymentSpec = map[string]string{ | ||||
| 	"":                        "DeploymentSpec is the specification of the desired behavior of the Deployment.", | ||||
| 	"replicas":                "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", | ||||
| 	"selector":                "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", | ||||
| 	"selector":                "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.", | ||||
| 	"template":                "Template describes the pods that will be created.", | ||||
| 	"strategy":                "The deployment strategy to use to replace existing pods with new ones.", | ||||
| 	"minReadySeconds":         "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", | ||||
|  | @ -187,7 +201,7 @@ func (DeploymentStrategy) SwaggerDoc() map[string]string { | |||
| } | ||||
| 
 | ||||
| var map_ReplicaSet = map[string]string{ | ||||
| 	"":         "ReplicaSet ensures that a specified number of pod replicas are running at any given time.", | ||||
| 	"":         "DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.", | ||||
| 	"metadata": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", | ||||
| 	"spec":     "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", | ||||
| 	"status":   "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", | ||||
|  | @ -224,7 +238,7 @@ var map_ReplicaSetSpec = map[string]string{ | |||
| 	"":                "ReplicaSetSpec is the specification of a ReplicaSet.", | ||||
| 	"replicas":        "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", | ||||
| 	"minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", | ||||
| 	"selector":        "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", | ||||
| 	"selector":        "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", | ||||
| 	"template":        "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", | ||||
| } | ||||
| 
 | ||||
|  | @ -306,7 +320,7 @@ func (ScaleStatus) SwaggerDoc() map[string]string { | |||
| } | ||||
| 
 | ||||
| var map_StatefulSet = map[string]string{ | ||||
| 	"":       "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", | ||||
| 	"":       "DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", | ||||
| 	"spec":   "Spec defines the desired identities of pods in this set.", | ||||
| 	"status": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", | ||||
| } | ||||
|  | @ -315,6 +329,19 @@ func (StatefulSet) SwaggerDoc() map[string]string { | |||
| 	return map_StatefulSet | ||||
| } | ||||
| 
 | ||||
| var map_StatefulSetCondition = map[string]string{ | ||||
| 	"":                   "StatefulSetCondition describes the state of a statefulset at a certain point.", | ||||
| 	"type":               "Type of statefulset condition.", | ||||
| 	"status":             "Status of the condition, one of True, False, Unknown.", | ||||
| 	"lastTransitionTime": "Last time the condition transitioned from one status to another.", | ||||
| 	"reason":             "The reason for the condition's last transition.", | ||||
| 	"message":            "A human readable message indicating details about the transition.", | ||||
| } | ||||
| 
 | ||||
| func (StatefulSetCondition) SwaggerDoc() map[string]string { | ||||
| 	return map_StatefulSetCondition | ||||
| } | ||||
| 
 | ||||
| var map_StatefulSetList = map[string]string{ | ||||
| 	"": "StatefulSetList is a collection of StatefulSets.", | ||||
| } | ||||
|  | @ -326,7 +353,7 @@ func (StatefulSetList) SwaggerDoc() map[string]string { | |||
| var map_StatefulSetSpec = map[string]string{ | ||||
| 	"":                     "A StatefulSetSpec is the specification of a StatefulSet.", | ||||
| 	"replicas":             "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", | ||||
| 	"selector":             "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", | ||||
| 	"selector":             "selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", | ||||
| 	"template":             "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", | ||||
| 	"volumeClaimTemplates": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", | ||||
| 	"serviceName":          "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", | ||||
|  | @ -349,6 +376,7 @@ var map_StatefulSetStatus = map[string]string{ | |||
| 	"currentRevision":    "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", | ||||
| 	"updateRevision":     "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", | ||||
| 	"collisionCount":     "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", | ||||
| 	"conditions":         "Represents the latest available observations of a statefulset's current state.", | ||||
| } | ||||
| 
 | ||||
| func (StatefulSetStatus) SwaggerDoc() map[string]string { | ||||
|  |  | |||
|  | @ -23,141 +23,10 @@ package v1beta2 | |||
| import ( | ||||
| 	core_v1 "k8s.io/api/core/v1" | ||||
| 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
| 	conversion "k8s.io/apimachinery/pkg/conversion" | ||||
| 	runtime "k8s.io/apimachinery/pkg/runtime" | ||||
| 	intstr "k8s.io/apimachinery/pkg/util/intstr" | ||||
| 	reflect "reflect" | ||||
| ) | ||||
| 
 | ||||
| func init() { | ||||
| 	SchemeBuilder.Register(RegisterDeepCopies) | ||||
| } | ||||
| 
 | ||||
| // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
 | ||||
| // to allow building arbitrary schemes.
 | ||||
| //
 | ||||
| // Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
 | ||||
| func RegisterDeepCopies(scheme *runtime.Scheme) error { | ||||
| 	return scheme.AddGeneratedDeepCopyFuncs( | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ControllerRevision).DeepCopyInto(out.(*ControllerRevision)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ControllerRevision{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ControllerRevisionList).DeepCopyInto(out.(*ControllerRevisionList)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ControllerRevisionList{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DaemonSet).DeepCopyInto(out.(*DaemonSet)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DaemonSet{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DaemonSetList).DeepCopyInto(out.(*DaemonSetList)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DaemonSetList{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DaemonSetSpec).DeepCopyInto(out.(*DaemonSetSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DaemonSetSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DaemonSetStatus).DeepCopyInto(out.(*DaemonSetStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DaemonSetStatus{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DaemonSetUpdateStrategy).DeepCopyInto(out.(*DaemonSetUpdateStrategy)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DaemonSetUpdateStrategy{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*Deployment).DeepCopyInto(out.(*Deployment)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&Deployment{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DeploymentCondition).DeepCopyInto(out.(*DeploymentCondition)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DeploymentCondition{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DeploymentList).DeepCopyInto(out.(*DeploymentList)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DeploymentList{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DeploymentSpec).DeepCopyInto(out.(*DeploymentSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DeploymentSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DeploymentStatus).DeepCopyInto(out.(*DeploymentStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DeploymentStatus{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*DeploymentStrategy).DeepCopyInto(out.(*DeploymentStrategy)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&DeploymentStrategy{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ReplicaSet).DeepCopyInto(out.(*ReplicaSet)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ReplicaSet{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ReplicaSetCondition).DeepCopyInto(out.(*ReplicaSetCondition)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ReplicaSetCondition{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ReplicaSetList).DeepCopyInto(out.(*ReplicaSetList)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ReplicaSetList{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ReplicaSetSpec).DeepCopyInto(out.(*ReplicaSetSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ReplicaSetSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ReplicaSetStatus).DeepCopyInto(out.(*ReplicaSetStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ReplicaSetStatus{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*RollingUpdateDaemonSet).DeepCopyInto(out.(*RollingUpdateDaemonSet)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&RollingUpdateDaemonSet{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*RollingUpdateDeployment).DeepCopyInto(out.(*RollingUpdateDeployment)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&RollingUpdateDeployment{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*RollingUpdateStatefulSetStrategy).DeepCopyInto(out.(*RollingUpdateStatefulSetStrategy)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&RollingUpdateStatefulSetStrategy{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*Scale).DeepCopyInto(out.(*Scale)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&Scale{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ScaleSpec).DeepCopyInto(out.(*ScaleSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ScaleSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ScaleStatus).DeepCopyInto(out.(*ScaleStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ScaleStatus{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*StatefulSet).DeepCopyInto(out.(*StatefulSet)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&StatefulSet{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*StatefulSetList).DeepCopyInto(out.(*StatefulSetList)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&StatefulSetList{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*StatefulSetSpec).DeepCopyInto(out.(*StatefulSetSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&StatefulSetSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*StatefulSetStatus).DeepCopyInto(out.(*StatefulSetStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&StatefulSetStatus{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*StatefulSetUpdateStrategy).DeepCopyInto(out.(*StatefulSetUpdateStrategy)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&StatefulSetUpdateStrategy{})}, | ||||
| 	) | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *ControllerRevision) DeepCopyInto(out *ControllerRevision) { | ||||
| 	*out = *in | ||||
|  | @ -249,6 +118,23 @@ func (in *DaemonSet) DeepCopyObject() runtime.Object { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *DaemonSetCondition) DeepCopyInto(out *DaemonSetCondition) { | ||||
| 	*out = *in | ||||
| 	in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetCondition.
 | ||||
| func (in *DaemonSetCondition) DeepCopy() *DaemonSetCondition { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(DaemonSetCondition) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *DaemonSetList) DeepCopyInto(out *DaemonSetList) { | ||||
| 	*out = *in | ||||
|  | @ -331,6 +217,13 @@ func (in *DaemonSetStatus) DeepCopyInto(out *DaemonSetStatus) { | |||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	if in.Conditions != nil { | ||||
| 		in, out := &in.Conditions, &out.Conditions | ||||
| 		*out = make([]DaemonSetCondition, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
|  | @ -880,6 +773,23 @@ func (in *StatefulSet) DeepCopyObject() runtime.Object { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *StatefulSetCondition) DeepCopyInto(out *StatefulSetCondition) { | ||||
| 	*out = *in | ||||
| 	in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetCondition.
 | ||||
| func (in *StatefulSetCondition) DeepCopy() *StatefulSetCondition { | ||||
| 	if in == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	out := new(StatefulSetCondition) | ||||
| 	in.DeepCopyInto(out) | ||||
| 	return out | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *StatefulSetList) DeepCopyInto(out *StatefulSetList) { | ||||
| 	*out = *in | ||||
|  | @ -978,6 +888,13 @@ func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus) { | |||
| 			**out = **in | ||||
| 		} | ||||
| 	} | ||||
| 	if in.Conditions != nil { | ||||
| 		in, out := &in.Conditions, &out.Conditions | ||||
| 		*out = make([]StatefulSetCondition, len(*in)) | ||||
| 		for i := range *in { | ||||
| 			(*in)[i].DeepCopyInto(&(*out)[i]) | ||||
| 		} | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -20,7 +20,6 @@ go_library( | |||
|         "//vendor/github.com/gogo/protobuf/proto:go_default_library", | ||||
|         "//vendor/github.com/gogo/protobuf/sortkeys: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/schema:go_default_library", | ||||
|     ], | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| // +k8s:deepcopy-gen=package,register
 | ||||
| // +k8s:deepcopy-gen=package
 | ||||
| // +groupName=authentication.k8s.io
 | ||||
| // +k8s:openapi-gen=true
 | ||||
| package v1 // import "k8s.io/api/authentication/v1"
 | ||||
|  |  | |||
|  | @ -41,7 +41,7 @@ var ( | |||
| 	AddToScheme        = localSchemeBuilder.AddToScheme | ||||
| ) | ||||
| 
 | ||||
| // Adds the list of known types to api.Scheme.
 | ||||
| // Adds the list of known types to the given scheme.
 | ||||
| func addKnownTypes(scheme *runtime.Scheme) error { | ||||
| 	scheme.AddKnownTypes(SchemeGroupVersion, | ||||
| 		&TokenReview{}, | ||||
|  |  | |||
|  | @ -21,40 +21,9 @@ limitations under the License. | |||
| package v1 | ||||
| 
 | ||||
| import ( | ||||
| 	conversion "k8s.io/apimachinery/pkg/conversion" | ||||
| 	runtime "k8s.io/apimachinery/pkg/runtime" | ||||
| 	reflect "reflect" | ||||
| ) | ||||
| 
 | ||||
| func init() { | ||||
| 	SchemeBuilder.Register(RegisterDeepCopies) | ||||
| } | ||||
| 
 | ||||
| // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
 | ||||
| // to allow building arbitrary schemes.
 | ||||
| //
 | ||||
| // Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
 | ||||
| func RegisterDeepCopies(scheme *runtime.Scheme) error { | ||||
| 	return scheme.AddGeneratedDeepCopyFuncs( | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*TokenReview).DeepCopyInto(out.(*TokenReview)) | ||||
| 			return nil | ||||
| 		}, 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{})}, | ||||
| 	) | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *TokenReview) DeepCopyInto(out *TokenReview) { | ||||
| 	*out = *in | ||||
|  |  | |||
|  | @ -20,7 +20,6 @@ go_library( | |||
|         "//vendor/github.com/gogo/protobuf/proto:go_default_library", | ||||
|         "//vendor/github.com/gogo/protobuf/sortkeys: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/schema:go_default_library", | ||||
|     ], | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| // +k8s:deepcopy-gen=package,register
 | ||||
| // +k8s:deepcopy-gen=package
 | ||||
| // +groupName=authentication.k8s.io
 | ||||
| // +k8s:openapi-gen=true
 | ||||
| package v1beta1 // import "k8s.io/api/authentication/v1beta1"
 | ||||
|  |  | |||
|  | @ -41,7 +41,7 @@ var ( | |||
| 	AddToScheme        = localSchemeBuilder.AddToScheme | ||||
| ) | ||||
| 
 | ||||
| // Adds the list of known types to api.Scheme.
 | ||||
| // Adds the list of known types to the given scheme.
 | ||||
| func addKnownTypes(scheme *runtime.Scheme) error { | ||||
| 	scheme.AddKnownTypes(SchemeGroupVersion, | ||||
| 		&TokenReview{}, | ||||
|  |  | |||
|  | @ -21,40 +21,9 @@ limitations under the License. | |||
| package v1beta1 | ||||
| 
 | ||||
| import ( | ||||
| 	conversion "k8s.io/apimachinery/pkg/conversion" | ||||
| 	runtime "k8s.io/apimachinery/pkg/runtime" | ||||
| 	reflect "reflect" | ||||
| ) | ||||
| 
 | ||||
| func init() { | ||||
| 	SchemeBuilder.Register(RegisterDeepCopies) | ||||
| } | ||||
| 
 | ||||
| // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
 | ||||
| // to allow building arbitrary schemes.
 | ||||
| //
 | ||||
| // Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
 | ||||
| func RegisterDeepCopies(scheme *runtime.Scheme) error { | ||||
| 	return scheme.AddGeneratedDeepCopyFuncs( | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*TokenReview).DeepCopyInto(out.(*TokenReview)) | ||||
| 			return nil | ||||
| 		}, 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{})}, | ||||
| 	) | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *TokenReview) DeepCopyInto(out *TokenReview) { | ||||
| 	*out = *in | ||||
|  |  | |||
|  | @ -20,7 +20,6 @@ go_library( | |||
|         "//vendor/github.com/gogo/protobuf/proto:go_default_library", | ||||
|         "//vendor/github.com/gogo/protobuf/sortkeys: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/schema:go_default_library", | ||||
|     ], | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| // +k8s:deepcopy-gen=package,register
 | ||||
| // +k8s:deepcopy-gen=package
 | ||||
| // +k8s:openapi-gen=true
 | ||||
| 
 | ||||
| // +groupName=authorization.k8s.io
 | ||||
|  |  | |||
|  | @ -730,6 +730,14 @@ func (m *SubjectAccessReviewStatus) MarshalTo(dAtA []byte) (int, error) { | |||
| 	i++ | ||||
| 	i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError))) | ||||
| 	i += copy(dAtA[i:], m.EvaluationError) | ||||
| 	dAtA[i] = 0x20 | ||||
| 	i++ | ||||
| 	if m.Denied { | ||||
| 		dAtA[i] = 1 | ||||
| 	} else { | ||||
| 		dAtA[i] = 0 | ||||
| 	} | ||||
| 	i++ | ||||
| 	return i, nil | ||||
| } | ||||
| 
 | ||||
|  | @ -1015,6 +1023,7 @@ func (m *SubjectAccessReviewStatus) Size() (n int) { | |||
| 	n += 1 + l + sovGenerated(uint64(l)) | ||||
| 	l = len(m.EvaluationError) | ||||
| 	n += 1 + l + sovGenerated(uint64(l)) | ||||
| 	n += 2 | ||||
| 	return n | ||||
| } | ||||
| 
 | ||||
|  | @ -1205,6 +1214,7 @@ func (this *SubjectAccessReviewStatus) String() string { | |||
| 		`Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`, | ||||
| 		`Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, | ||||
| 		`EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`, | ||||
| 		`Denied:` + fmt.Sprintf("%v", this.Denied) + `,`, | ||||
| 		`}`, | ||||
| 	}, "") | ||||
| 	return s | ||||
|  | @ -3130,6 +3140,26 @@ func (m *SubjectAccessReviewStatus) Unmarshal(dAtA []byte) error { | |||
| 			} | ||||
| 			m.EvaluationError = string(dAtA[iNdEx:postIndex]) | ||||
| 			iNdEx = postIndex | ||||
| 		case 4: | ||||
| 			if wireType != 0 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Denied", wireType) | ||||
| 			} | ||||
| 			var v int | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowGenerated | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				v |= (int(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			m.Denied = bool(v != 0) | ||||
| 		default: | ||||
| 			iNdEx = preIndex | ||||
| 			skippy, err := skipGenerated(dAtA[iNdEx:]) | ||||
|  | @ -3422,77 +3452,77 @@ func init() { | |||
| } | ||||
| 
 | ||||
| var fileDescriptorGenerated = []byte{ | ||||
| 	// 1137 bytes of a gzipped FileDescriptorProto
 | ||||
| 	// 1152 bytes of a gzipped FileDescriptorProto
 | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0x1b, 0x45, | ||||
| 	0x14, 0xf7, 0xae, 0xed, 0xc4, 0x1e, 0x37, 0x24, 0x9d, 0x28, 0xcd, 0x36, 0x15, 0x76, 0xb4, 0x48, | ||||
| 	0x90, 0x8a, 0xb2, 0x4b, 0x4c, 0xdb, 0x44, 0x95, 0x2a, 0x14, 0xab, 0x11, 0x8a, 0xd4, 0x96, 0x6a, | ||||
| 	0x14, 0xf7, 0xae, 0xed, 0xd4, 0x1e, 0x37, 0x24, 0x9d, 0x28, 0xcd, 0x36, 0x15, 0x76, 0xb4, 0x48, | ||||
| 	0x90, 0x8a, 0xb2, 0x4b, 0x4c, 0xdb, 0x44, 0x95, 0x2a, 0x14, 0x2b, 0x11, 0x8a, 0xd4, 0x96, 0x6a, | ||||
| 	0xa2, 0x44, 0xa2, 0x08, 0xc4, 0x78, 0x3d, 0xb1, 0x97, 0xd8, 0xbb, 0xcb, 0xcc, 0xac, 0x43, 0x38, | ||||
| 	0x55, 0xe2, 0x0b, 0x70, 0xe4, 0xc0, 0x81, 0x6f, 0x80, 0x90, 0x90, 0xb8, 0x71, 0xe0, 0x80, 0x72, | ||||
| 	0xec, 0xb1, 0x07, 0x64, 0x91, 0xe5, 0xcc, 0x77, 0x40, 0x33, 0x3b, 0xf6, 0xae, 0x93, 0xb5, 0x9b, | ||||
| 	0x70, 0xa0, 0x97, 0xde, 0x76, 0xdf, 0xef, 0xf7, 0xfe, 0xcc, 0x7b, 0x6f, 0xde, 0x3c, 0xf0, 0xe0, | ||||
| 	0x70, 0x93, 0x59, 0xae, 0x6f, 0x1f, 0x86, 0x4d, 0x42, 0x3d, 0xc2, 0x09, 0xb3, 0xfb, 0xc4, 0x6b, | ||||
| 	0xf9, 0xd4, 0x56, 0x00, 0x0e, 0x5c, 0x1b, 0x87, 0xbc, 0xe3, 0x53, 0xf7, 0x1b, 0xcc, 0x5d, 0xdf, | ||||
| 	0xb3, 0xfb, 0xeb, 0x76, 0x9b, 0x78, 0x84, 0x62, 0x4e, 0x5a, 0x56, 0x40, 0x7d, 0xee, 0xc3, 0x1b, | ||||
| 	0x31, 0xd9, 0xc2, 0x81, 0x6b, 0x8d, 0x91, 0xad, 0xfe, 0xfa, 0xca, 0x7b, 0x6d, 0x97, 0x77, 0xc2, | ||||
| 	0xa6, 0xe5, 0xf8, 0x3d, 0xbb, 0xed, 0xb7, 0x7d, 0x5b, 0xea, 0x34, 0xc3, 0x03, 0xf9, 0x27, 0x7f, | ||||
| 	0xe4, 0x57, 0x6c, 0x6b, 0xe5, 0x76, 0xe2, 0xb8, 0x87, 0x9d, 0x8e, 0xeb, 0x11, 0x7a, 0x6c, 0x07, | ||||
| 	0x87, 0x6d, 0x21, 0x60, 0x76, 0x8f, 0x70, 0x9c, 0x11, 0xc1, 0x8a, 0x3d, 0x49, 0x8b, 0x86, 0x1e, | ||||
| 	0x77, 0x7b, 0xe4, 0x9c, 0xc2, 0xdd, 0x97, 0x29, 0x30, 0xa7, 0x43, 0x7a, 0xf8, 0x9c, 0xde, 0x07, | ||||
| 	0x93, 0xf4, 0x42, 0xee, 0x76, 0x6d, 0xd7, 0xe3, 0x8c, 0xd3, 0xb3, 0x4a, 0xe6, 0x06, 0x00, 0xdb, | ||||
| 	0x5f, 0x73, 0x8a, 0xf7, 0x71, 0x37, 0x24, 0xb0, 0x06, 0x8a, 0x2e, 0x27, 0x3d, 0x66, 0x68, 0xab, | ||||
| 	0xf9, 0xb5, 0x72, 0xa3, 0x1c, 0x0d, 0x6a, 0xc5, 0x1d, 0x21, 0x40, 0xb1, 0xfc, 0x5e, 0xe9, 0xfb, | ||||
| 	0x1f, 0x6b, 0xb9, 0x67, 0x7f, 0xae, 0xe6, 0xcc, 0x5f, 0x74, 0x60, 0x3c, 0xf4, 0x1d, 0xdc, 0xdd, | ||||
| 	0x0d, 0x9b, 0x5f, 0x12, 0x87, 0x6f, 0x39, 0x0e, 0x61, 0x0c, 0x91, 0xbe, 0x4b, 0x8e, 0xe0, 0x17, | ||||
| 	0xa0, 0x24, 0xd2, 0xd1, 0xc2, 0x1c, 0x1b, 0xda, 0xaa, 0xb6, 0x56, 0xa9, 0xbf, 0x6f, 0x25, 0x85, | ||||
| 	0x18, 0x45, 0x67, 0x05, 0x87, 0x6d, 0x21, 0x60, 0x96, 0x60, 0x5b, 0xfd, 0x75, 0xeb, 0x63, 0x69, | ||||
| 	0xeb, 0x11, 0xe1, 0xb8, 0x01, 0x4f, 0x06, 0xb5, 0x5c, 0x34, 0xa8, 0x81, 0x44, 0x86, 0x46, 0x56, | ||||
| 	0xe1, 0x3e, 0x28, 0xb0, 0x80, 0x38, 0x86, 0x2e, 0xad, 0xdf, 0xb6, 0xa6, 0x94, 0xd9, 0xca, 0x88, | ||||
| 	0x70, 0x37, 0x20, 0x4e, 0xe3, 0x8a, 0xf2, 0x50, 0x10, 0x7f, 0x48, 0xda, 0x83, 0x9f, 0x83, 0x19, | ||||
| 	0xc6, 0x31, 0x0f, 0x99, 0x91, 0x97, 0x96, 0xef, 0x5e, 0xda, 0xb2, 0xd4, 0x6e, 0xbc, 0xa1, 0x6c, | ||||
| 	0xcf, 0xc4, 0xff, 0x48, 0x59, 0x35, 0x3f, 0x05, 0x4b, 0x8f, 0x7d, 0x0f, 0x11, 0xe6, 0x87, 0xd4, | ||||
| 	0x21, 0x5b, 0x9c, 0x53, 0xb7, 0x19, 0x72, 0xc2, 0xe0, 0x2a, 0x28, 0x04, 0x98, 0x77, 0x64, 0xba, | ||||
| 	0xca, 0x49, 0x68, 0x4f, 0x30, 0xef, 0x20, 0x89, 0x08, 0x46, 0x9f, 0xd0, 0xa6, 0x3c, 0x72, 0x8a, | ||||
| 	0xb1, 0x4f, 0x68, 0x13, 0x49, 0xc4, 0xfc, 0x0a, 0xcc, 0xa7, 0x8c, 0xa3, 0xb0, 0x2b, 0x2b, 0x2a, | ||||
| 	0xa0, 0xb1, 0x8a, 0x0a, 0x0d, 0x86, 0x62, 0x39, 0xbc, 0x0f, 0xe6, 0xbd, 0x44, 0x67, 0x0f, 0x3d, | ||||
| 	0x64, 0x86, 0x2e, 0xa9, 0x8b, 0xd1, 0xa0, 0x96, 0x36, 0x27, 0x20, 0x74, 0x96, 0x6b, 0xfe, 0xa6, | ||||
| 	0x03, 0x98, 0x71, 0x1a, 0x1b, 0x94, 0x3d, 0xdc, 0x23, 0x2c, 0xc0, 0x0e, 0x51, 0x47, 0xba, 0xaa, | ||||
| 	0x02, 0x2e, 0x3f, 0x1e, 0x02, 0x28, 0xe1, 0xbc, 0xfc, 0x70, 0xf0, 0x2d, 0x50, 0x6c, 0x53, 0x3f, | ||||
| 	0x0c, 0x64, 0x61, 0xca, 0x8d, 0x39, 0x45, 0x29, 0x7e, 0x24, 0x84, 0x28, 0xc6, 0xe0, 0x4d, 0x30, | ||||
| 	0xdb, 0x27, 0x94, 0xb9, 0xbe, 0x67, 0x14, 0x24, 0x6d, 0x5e, 0xd1, 0x66, 0xf7, 0x63, 0x31, 0x1a, | ||||
| 	0xe2, 0xf0, 0x16, 0x28, 0x51, 0x15, 0xb8, 0x51, 0x94, 0xdc, 0x05, 0xc5, 0x2d, 0x8d, 0x32, 0x38, | ||||
| 	0x62, 0xc0, 0x3b, 0xa0, 0xc2, 0xc2, 0xe6, 0x48, 0x61, 0x46, 0x2a, 0x2c, 0x2a, 0x85, 0xca, 0x6e, | ||||
| 	0x02, 0xa1, 0x34, 0x4f, 0x1c, 0x4b, 0x9c, 0xd1, 0x98, 0x1d, 0x3f, 0x96, 0x48, 0x01, 0x92, 0x88, | ||||
| 	0xf9, 0xbb, 0x06, 0xae, 0x5c, 0xae, 0x62, 0xef, 0x82, 0x32, 0x0e, 0x5c, 0x79, 0xec, 0x61, 0xad, | ||||
| 	0xe6, 0x44, 0x5e, 0xb7, 0x9e, 0xec, 0xc4, 0x42, 0x94, 0xe0, 0x82, 0x3c, 0x0c, 0x46, 0xb4, 0xf4, | ||||
| 	0x88, 0x3c, 0x74, 0xc9, 0x50, 0x82, 0xc3, 0x0d, 0x30, 0x37, 0xfc, 0x91, 0x45, 0x32, 0x0a, 0x52, | ||||
| 	0xe1, 0x6a, 0x34, 0xa8, 0xcd, 0xa1, 0x34, 0x80, 0xc6, 0x79, 0xe6, 0xaf, 0x3a, 0x58, 0xde, 0x25, | ||||
| 	0xdd, 0x83, 0x57, 0x33, 0x0b, 0x9e, 0x8e, 0xcd, 0x82, 0xcd, 0xe9, 0x37, 0x36, 0x3b, 0xca, 0x57, | ||||
| 	0x36, 0x0f, 0x7e, 0xd0, 0xc1, 0x8d, 0x29, 0x31, 0xc1, 0x23, 0x00, 0xe9, 0xb9, 0xeb, 0xa5, 0xf2, | ||||
| 	0x68, 0x4f, 0x8d, 0xe5, 0xfc, 0xad, 0x6c, 0x5c, 0x8b, 0x06, 0xb5, 0x8c, 0xdb, 0x8a, 0x32, 0x5c, | ||||
| 	0xc0, 0x6f, 0x35, 0xb0, 0xe4, 0x65, 0x4d, 0x2a, 0x95, 0xe6, 0xfa, 0x54, 0xe7, 0x99, 0x33, 0xae, | ||||
| 	0x71, 0x3d, 0x1a, 0xd4, 0xb2, 0xc7, 0x1f, 0xca, 0xf6, 0x25, 0x5e, 0x99, 0x6b, 0xa9, 0xf4, 0x88, | ||||
| 	0x0b, 0xf2, 0xff, 0xf5, 0xd5, 0x27, 0x63, 0x7d, 0xb5, 0x71, 0xd1, 0xbe, 0x4a, 0x05, 0x39, 0xb1, | ||||
| 	0xad, 0x3e, 0x3b, 0xd3, 0x56, 0x77, 0x2e, 0xd2, 0x56, 0x69, 0xc3, 0xd3, 0xbb, 0xea, 0x11, 0x58, | ||||
| 	0x99, 0x1c, 0xd0, 0xa5, 0x87, 0xb3, 0xf9, 0x93, 0x0e, 0x16, 0x5f, 0x3f, 0xf3, 0x97, 0xb9, 0xd6, | ||||
| 	0x7f, 0x14, 0xc0, 0xf2, 0xeb, 0x2b, 0x3d, 0x69, 0xd1, 0x09, 0x19, 0xa1, 0xea, 0x19, 0x1f, 0x15, | ||||
| 	0x67, 0x8f, 0x11, 0x8a, 0x24, 0x02, 0x4d, 0x30, 0xd3, 0x8e, 0x5f, 0xb7, 0xf8, 0xfd, 0x01, 0x22, | ||||
| 	0xc1, 0xea, 0x69, 0x53, 0x08, 0x6c, 0x81, 0x22, 0x11, 0x7b, 0xab, 0x51, 0x5c, 0xcd, 0xaf, 0x55, | ||||
| 	0xea, 0x1f, 0xfe, 0x97, 0xce, 0xb0, 0xe4, 0xe6, 0xbb, 0xed, 0x71, 0x7a, 0x9c, 0xac, 0x13, 0x52, | ||||
| 	0x86, 0x62, 0xe3, 0xf0, 0x4d, 0x90, 0x0f, 0xdd, 0x96, 0x7a, 0xed, 0x2b, 0x8a, 0x92, 0xdf, 0xdb, | ||||
| 	0x79, 0x80, 0x84, 0x7c, 0x05, 0xab, 0xe5, 0x59, 0x9a, 0x80, 0x0b, 0x20, 0x7f, 0x48, 0x8e, 0xe3, | ||||
| 	0x0b, 0x85, 0xc4, 0x27, 0xbc, 0x0f, 0x8a, 0x7d, 0xb1, 0x57, 0xab, 0xfc, 0xbe, 0x33, 0x35, 0xc8, | ||||
| 	0x64, 0x0d, 0x47, 0xb1, 0xd6, 0x3d, 0x7d, 0x53, 0x33, 0x7f, 0xd6, 0xc0, 0xf5, 0x89, 0xed, 0x27, | ||||
| 	0xd6, 0x1d, 0xdc, 0xed, 0xfa, 0x47, 0xa4, 0x25, 0xdd, 0x96, 0x92, 0x75, 0x67, 0x2b, 0x16, 0xa3, | ||||
| 	0x21, 0x0e, 0xdf, 0x06, 0x33, 0x94, 0x60, 0xe6, 0x7b, 0x6a, 0xc5, 0x1a, 0x75, 0x2e, 0x92, 0x52, | ||||
| 	0xa4, 0x50, 0xb8, 0x05, 0xe6, 0x89, 0x70, 0x2f, 0xe3, 0xda, 0xa6, 0xd4, 0x1f, 0x56, 0x6a, 0x59, | ||||
| 	0x29, 0xcc, 0x6f, 0x8f, 0xc3, 0xe8, 0x2c, 0xdf, 0xfc, 0x47, 0x07, 0xc6, 0xa4, 0x91, 0x05, 0x0f, | ||||
| 	0x92, 0x1d, 0x43, 0x82, 0x72, 0xcd, 0xa9, 0xd4, 0x6f, 0x5e, 0xa8, 0xf1, 0x85, 0x46, 0x63, 0x49, | ||||
| 	0x05, 0x32, 0x97, 0x96, 0xa6, 0x56, 0x12, 0xf9, 0x0b, 0x29, 0x58, 0xf0, 0xc6, 0x77, 0xe1, 0x78, | ||||
| 	0x59, 0xaa, 0xd4, 0x6f, 0x5d, 0xb4, 0xcd, 0xa5, 0x37, 0x43, 0x79, 0x5b, 0x38, 0x03, 0x30, 0x74, | ||||
| 	0xce, 0x3e, 0xac, 0x03, 0xe0, 0x7a, 0x8e, 0xdf, 0x0b, 0xba, 0x84, 0x13, 0x99, 0xb6, 0x52, 0x32, | ||||
| 	0xdf, 0x76, 0x46, 0x08, 0x4a, 0xb1, 0xb2, 0xf2, 0x5d, 0xb8, 0x5c, 0xbe, 0x1b, 0x6b, 0x27, 0xa7, | ||||
| 	0xd5, 0xdc, 0xf3, 0xd3, 0x6a, 0xee, 0xc5, 0x69, 0x35, 0xf7, 0x2c, 0xaa, 0x6a, 0x27, 0x51, 0x55, | ||||
| 	0x7b, 0x1e, 0x55, 0xb5, 0x17, 0x51, 0x55, 0xfb, 0x2b, 0xaa, 0x6a, 0xdf, 0xfd, 0x5d, 0xcd, 0x3d, | ||||
| 	0xd5, 0xfb, 0xeb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x3f, 0xd9, 0x21, 0x54, 0x0f, 0x00, | ||||
| 	0x00, | ||||
| 	0x55, 0xe2, 0x0b, 0x70, 0xe4, 0xc0, 0x81, 0x6f, 0xc0, 0x05, 0x89, 0x1b, 0x07, 0x0e, 0x28, 0xc7, | ||||
| 	0x1e, 0x8b, 0x84, 0x2c, 0xb2, 0x9c, 0xf9, 0x0e, 0x68, 0x66, 0xc7, 0xde, 0x75, 0xb2, 0x76, 0x13, | ||||
| 	0x0e, 0xf4, 0xd2, 0xdb, 0xee, 0xfb, 0xfd, 0xde, 0x9f, 0x79, 0x7f, 0x66, 0x1e, 0xd8, 0x3a, 0xdc, | ||||
| 	0x60, 0x96, 0xeb, 0xdb, 0x87, 0x61, 0x93, 0x50, 0x8f, 0x70, 0xc2, 0xec, 0x3e, 0xf1, 0x5a, 0x3e, | ||||
| 	0xb5, 0x15, 0x80, 0x03, 0xd7, 0xc6, 0x21, 0xef, 0xf8, 0xd4, 0xfd, 0x06, 0x73, 0xd7, 0xf7, 0xec, | ||||
| 	0xfe, 0x9a, 0xdd, 0x26, 0x1e, 0xa1, 0x98, 0x93, 0x96, 0x15, 0x50, 0x9f, 0xfb, 0xf0, 0x66, 0x4c, | ||||
| 	0xb6, 0x70, 0xe0, 0x5a, 0x63, 0x64, 0xab, 0xbf, 0xb6, 0xfc, 0x5e, 0xdb, 0xe5, 0x9d, 0xb0, 0x69, | ||||
| 	0x39, 0x7e, 0xcf, 0x6e, 0xfb, 0x6d, 0xdf, 0x96, 0x3a, 0xcd, 0xf0, 0x40, 0xfe, 0xc9, 0x1f, 0xf9, | ||||
| 	0x15, 0xdb, 0x5a, 0xbe, 0x93, 0x38, 0xee, 0x61, 0xa7, 0xe3, 0x7a, 0x84, 0x1e, 0xdb, 0xc1, 0x61, | ||||
| 	0x5b, 0x08, 0x98, 0xdd, 0x23, 0x1c, 0x67, 0x44, 0xb0, 0x6c, 0x4f, 0xd2, 0xa2, 0xa1, 0xc7, 0xdd, | ||||
| 	0x1e, 0x39, 0xa7, 0x70, 0xef, 0x65, 0x0a, 0xcc, 0xe9, 0x90, 0x1e, 0x3e, 0xa7, 0xf7, 0xc1, 0x24, | ||||
| 	0xbd, 0x90, 0xbb, 0x5d, 0xdb, 0xf5, 0x38, 0xe3, 0xf4, 0xac, 0x92, 0xb9, 0x0e, 0xc0, 0xf6, 0xd7, | ||||
| 	0x9c, 0xe2, 0x7d, 0xdc, 0x0d, 0x09, 0xac, 0x81, 0xa2, 0xcb, 0x49, 0x8f, 0x19, 0xda, 0x4a, 0x7e, | ||||
| 	0xb5, 0xdc, 0x28, 0x47, 0x83, 0x5a, 0x71, 0x47, 0x08, 0x50, 0x2c, 0xbf, 0x5f, 0xfa, 0xfe, 0xc7, | ||||
| 	0x5a, 0xee, 0xd9, 0x9f, 0x2b, 0x39, 0xf3, 0x67, 0x1d, 0x18, 0x0f, 0x7d, 0x07, 0x77, 0x77, 0xc3, | ||||
| 	0xe6, 0x97, 0xc4, 0xe1, 0x9b, 0x8e, 0x43, 0x18, 0x43, 0xa4, 0xef, 0x92, 0x23, 0xf8, 0x05, 0x28, | ||||
| 	0x89, 0x74, 0xb4, 0x30, 0xc7, 0x86, 0xb6, 0xa2, 0xad, 0x56, 0xea, 0xef, 0x5b, 0x49, 0x21, 0x46, | ||||
| 	0xd1, 0x59, 0xc1, 0x61, 0x5b, 0x08, 0x98, 0x25, 0xd8, 0x56, 0x7f, 0xcd, 0xfa, 0x58, 0xda, 0x7a, | ||||
| 	0x44, 0x38, 0x6e, 0xc0, 0x93, 0x41, 0x2d, 0x17, 0x0d, 0x6a, 0x20, 0x91, 0xa1, 0x91, 0x55, 0xb8, | ||||
| 	0x0f, 0x0a, 0x2c, 0x20, 0x8e, 0xa1, 0x4b, 0xeb, 0x77, 0xac, 0x29, 0x65, 0xb6, 0x32, 0x22, 0xdc, | ||||
| 	0x0d, 0x88, 0xd3, 0xb8, 0xaa, 0x3c, 0x14, 0xc4, 0x1f, 0x92, 0xf6, 0xe0, 0xe7, 0x60, 0x86, 0x71, | ||||
| 	0xcc, 0x43, 0x66, 0xe4, 0xa5, 0xe5, 0x7b, 0x97, 0xb6, 0x2c, 0xb5, 0x1b, 0x6f, 0x28, 0xdb, 0x33, | ||||
| 	0xf1, 0x3f, 0x52, 0x56, 0xcd, 0x4f, 0xc1, 0xe2, 0x63, 0xdf, 0x43, 0x84, 0xf9, 0x21, 0x75, 0xc8, | ||||
| 	0x26, 0xe7, 0xd4, 0x6d, 0x86, 0x9c, 0x30, 0xb8, 0x02, 0x0a, 0x01, 0xe6, 0x1d, 0x99, 0xae, 0x72, | ||||
| 	0x12, 0xda, 0x13, 0xcc, 0x3b, 0x48, 0x22, 0x82, 0xd1, 0x27, 0xb4, 0x29, 0x8f, 0x9c, 0x62, 0xec, | ||||
| 	0x13, 0xda, 0x44, 0x12, 0x31, 0xbf, 0x02, 0x73, 0x29, 0xe3, 0x28, 0xec, 0xca, 0x8a, 0x0a, 0x68, | ||||
| 	0xac, 0xa2, 0x42, 0x83, 0xa1, 0x58, 0x0e, 0x1f, 0x80, 0x39, 0x2f, 0xd1, 0xd9, 0x43, 0x0f, 0x99, | ||||
| 	0xa1, 0x4b, 0xea, 0x42, 0x34, 0xa8, 0xa5, 0xcd, 0x09, 0x08, 0x9d, 0xe5, 0x9a, 0xbf, 0xea, 0x00, | ||||
| 	0x66, 0x9c, 0xc6, 0x06, 0x65, 0x0f, 0xf7, 0x08, 0x0b, 0xb0, 0x43, 0xd4, 0x91, 0xae, 0xa9, 0x80, | ||||
| 	0xcb, 0x8f, 0x87, 0x00, 0x4a, 0x38, 0x2f, 0x3f, 0x1c, 0x7c, 0x0b, 0x14, 0xdb, 0xd4, 0x0f, 0x03, | ||||
| 	0x59, 0x98, 0x72, 0x63, 0x56, 0x51, 0x8a, 0x1f, 0x09, 0x21, 0x8a, 0x31, 0x78, 0x0b, 0x5c, 0xe9, | ||||
| 	0x13, 0xca, 0x5c, 0xdf, 0x33, 0x0a, 0x92, 0x36, 0xa7, 0x68, 0x57, 0xf6, 0x63, 0x31, 0x1a, 0xe2, | ||||
| 	0xf0, 0x36, 0x28, 0x51, 0x15, 0xb8, 0x51, 0x94, 0xdc, 0x79, 0xc5, 0x2d, 0x8d, 0x32, 0x38, 0x62, | ||||
| 	0xc0, 0xbb, 0xa0, 0xc2, 0xc2, 0xe6, 0x48, 0x61, 0x46, 0x2a, 0x2c, 0x28, 0x85, 0xca, 0x6e, 0x02, | ||||
| 	0xa1, 0x34, 0x4f, 0x1c, 0x4b, 0x9c, 0xd1, 0xb8, 0x32, 0x7e, 0x2c, 0x91, 0x02, 0x24, 0x11, 0xf3, | ||||
| 	0x37, 0x0d, 0x5c, 0xbd, 0x5c, 0xc5, 0xde, 0x05, 0x65, 0x1c, 0xb8, 0xf2, 0xd8, 0xc3, 0x5a, 0xcd, | ||||
| 	0x8a, 0xbc, 0x6e, 0x3e, 0xd9, 0x89, 0x85, 0x28, 0xc1, 0x05, 0x79, 0x18, 0x8c, 0x68, 0xe9, 0x11, | ||||
| 	0x79, 0xe8, 0x92, 0xa1, 0x04, 0x87, 0xeb, 0x60, 0x76, 0xf8, 0x23, 0x8b, 0x64, 0x14, 0xa4, 0xc2, | ||||
| 	0xb5, 0x68, 0x50, 0x9b, 0x45, 0x69, 0x00, 0x8d, 0xf3, 0xcc, 0x5f, 0x74, 0xb0, 0xb4, 0x4b, 0xba, | ||||
| 	0x07, 0xaf, 0xe6, 0x2e, 0x78, 0x3a, 0x76, 0x17, 0x6c, 0x4c, 0x9f, 0xd8, 0xec, 0x28, 0x5f, 0xd9, | ||||
| 	0x7d, 0xf0, 0x83, 0x0e, 0x6e, 0x4e, 0x89, 0x09, 0x1e, 0x01, 0x48, 0xcf, 0x8d, 0x97, 0xca, 0xa3, | ||||
| 	0x3d, 0x35, 0x96, 0xf3, 0x53, 0xd9, 0xb8, 0x1e, 0x0d, 0x6a, 0x19, 0xd3, 0x8a, 0x32, 0x5c, 0xc0, | ||||
| 	0x6f, 0x35, 0xb0, 0xe8, 0x65, 0xdd, 0x54, 0x2a, 0xcd, 0xf5, 0xa9, 0xce, 0x33, 0xef, 0xb8, 0xc6, | ||||
| 	0x8d, 0x68, 0x50, 0xcb, 0xbe, 0xfe, 0x50, 0xb6, 0x2f, 0xf1, 0xca, 0x5c, 0x4f, 0xa5, 0x47, 0x0c, | ||||
| 	0xc8, 0xff, 0xd7, 0x57, 0x9f, 0x8c, 0xf5, 0xd5, 0xfa, 0x45, 0xfb, 0x2a, 0x15, 0xe4, 0xc4, 0xb6, | ||||
| 	0xfa, 0xec, 0x4c, 0x5b, 0xdd, 0xbd, 0x48, 0x5b, 0xa5, 0x0d, 0x4f, 0xef, 0xaa, 0x47, 0x60, 0x79, | ||||
| 	0x72, 0x40, 0x97, 0xbe, 0x9c, 0xcd, 0x9f, 0x74, 0xb0, 0xf0, 0xfa, 0x99, 0xbf, 0xcc, 0x58, 0xff, | ||||
| 	0x5e, 0x00, 0x4b, 0xaf, 0x47, 0x7a, 0xd2, 0xa2, 0x13, 0x32, 0x42, 0xd5, 0x33, 0x3e, 0x2a, 0xce, | ||||
| 	0x1e, 0x23, 0x14, 0x49, 0x04, 0x9a, 0x60, 0xa6, 0x1d, 0xbf, 0x6e, 0xf1, 0xfb, 0x03, 0x44, 0x82, | ||||
| 	0xd5, 0xd3, 0xa6, 0x10, 0xd8, 0x02, 0x45, 0x22, 0xf6, 0x56, 0xa3, 0xb8, 0x92, 0x5f, 0xad, 0xd4, | ||||
| 	0x3f, 0xfc, 0x2f, 0x9d, 0x61, 0xc9, 0xcd, 0x77, 0xdb, 0xe3, 0xf4, 0x38, 0x59, 0x27, 0xa4, 0x0c, | ||||
| 	0xc5, 0xc6, 0xe1, 0x9b, 0x20, 0x1f, 0xba, 0x2d, 0xf5, 0xda, 0x57, 0x14, 0x25, 0xbf, 0xb7, 0xb3, | ||||
| 	0x85, 0x84, 0x7c, 0x19, 0xab, 0xe5, 0x59, 0x9a, 0x80, 0xf3, 0x20, 0x7f, 0x48, 0x8e, 0xe3, 0x81, | ||||
| 	0x42, 0xe2, 0x13, 0x3e, 0x00, 0xc5, 0xbe, 0xd8, 0xab, 0x55, 0x7e, 0xdf, 0x99, 0x1a, 0x64, 0xb2, | ||||
| 	0x86, 0xa3, 0x58, 0xeb, 0xbe, 0xbe, 0xa1, 0x99, 0x7f, 0x68, 0xe0, 0xc6, 0xc4, 0xf6, 0x13, 0xeb, | ||||
| 	0x0e, 0xee, 0x76, 0xfd, 0x23, 0xd2, 0x92, 0x6e, 0x4b, 0xc9, 0xba, 0xb3, 0x19, 0x8b, 0xd1, 0x10, | ||||
| 	0x87, 0x6f, 0x83, 0x19, 0x4a, 0x30, 0xf3, 0x3d, 0xb5, 0x62, 0x8d, 0x3a, 0x17, 0x49, 0x29, 0x52, | ||||
| 	0x28, 0xdc, 0x04, 0x73, 0x44, 0xb8, 0x97, 0x71, 0x6d, 0x53, 0xea, 0x0f, 0x2b, 0xb5, 0xa4, 0x14, | ||||
| 	0xe6, 0xb6, 0xc7, 0x61, 0x74, 0x96, 0x2f, 0x5c, 0xb5, 0x88, 0xe7, 0x92, 0x96, 0xdc, 0xc1, 0x4a, | ||||
| 	0x89, 0xab, 0x2d, 0x29, 0x45, 0x0a, 0x35, 0xff, 0xd1, 0x81, 0x31, 0xe9, 0x6a, 0x83, 0x07, 0xc9, | ||||
| 	0x2e, 0x22, 0x41, 0xb9, 0x0e, 0x55, 0xea, 0xb7, 0x2e, 0x34, 0x20, 0x42, 0xa3, 0xb1, 0xa8, 0xdc, | ||||
| 	0xce, 0xa6, 0xa5, 0xa9, 0xd5, 0x45, 0xfe, 0x42, 0x0a, 0xe6, 0xbd, 0xf1, 0x9d, 0x39, 0x5e, 0xaa, | ||||
| 	0x2a, 0xf5, 0xdb, 0x17, 0x1d, 0x07, 0xe9, 0xcd, 0x50, 0xde, 0xe6, 0xcf, 0x00, 0x0c, 0x9d, 0xb3, | ||||
| 	0x0f, 0xeb, 0x00, 0xb8, 0x9e, 0xe3, 0xf7, 0x82, 0x2e, 0xe1, 0x44, 0xa6, 0xb7, 0x94, 0xdc, 0x83, | ||||
| 	0x3b, 0x23, 0x04, 0xa5, 0x58, 0x59, 0x75, 0x29, 0x5c, 0xae, 0x2e, 0x8d, 0xd5, 0x93, 0xd3, 0x6a, | ||||
| 	0xee, 0xf9, 0x69, 0x35, 0xf7, 0xe2, 0xb4, 0x9a, 0x7b, 0x16, 0x55, 0xb5, 0x93, 0xa8, 0xaa, 0x3d, | ||||
| 	0x8f, 0xaa, 0xda, 0x8b, 0xa8, 0xaa, 0xfd, 0x15, 0x55, 0xb5, 0xef, 0xfe, 0xae, 0xe6, 0x9e, 0xea, | ||||
| 	0xfd, 0xb5, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x0e, 0xab, 0x82, 0x7c, 0x0f, 0x00, 0x00, | ||||
| } | ||||
|  |  | |||
|  | @ -226,9 +226,16 @@ message SubjectAccessReviewSpec { | |||
| 
 | ||||
| // SubjectAccessReviewStatus | ||||
| message SubjectAccessReviewStatus { | ||||
|   // Allowed is required.  True if the action would be allowed, false otherwise. | ||||
|   // Allowed is required. True if the action would be allowed, false otherwise. | ||||
|   optional bool allowed = 1; | ||||
| 
 | ||||
|   // Denied is optional. True if the action would be denied, otherwise | ||||
|   // false. If both allowed is false and denied is false, then the | ||||
|   // authorizer has no opinion on whether to authorize the action. Denied | ||||
|   // may not be true if Allowed is true. | ||||
|   // +optional | ||||
|   optional bool denied = 4; | ||||
| 
 | ||||
|   // Reason is optional.  It indicates why a request was allowed or denied. | ||||
|   // +optional | ||||
|   optional string reason = 2; | ||||
|  |  | |||
|  | @ -41,7 +41,7 @@ var ( | |||
| 	AddToScheme        = localSchemeBuilder.AddToScheme | ||||
| ) | ||||
| 
 | ||||
| // Adds the list of known types to api.Scheme.
 | ||||
| // Adds the list of known types to the given scheme.
 | ||||
| func addKnownTypes(scheme *runtime.Scheme) error { | ||||
| 	scheme.AddKnownTypes(SchemeGroupVersion, | ||||
| 		&SelfSubjectRulesReview{}, | ||||
|  |  | |||
|  | @ -169,8 +169,14 @@ type SelfSubjectAccessReviewSpec struct { | |||
| 
 | ||||
| // SubjectAccessReviewStatus
 | ||||
| type SubjectAccessReviewStatus struct { | ||||
| 	// Allowed is required.  True if the action would be allowed, false otherwise.
 | ||||
| 	// Allowed is required. True if the action would be allowed, false otherwise.
 | ||||
| 	Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"` | ||||
| 	// Denied is optional. True if the action would be denied, otherwise
 | ||||
| 	// false. If both allowed is false and denied is false, then the
 | ||||
| 	// authorizer has no opinion on whether to authorize the action. Denied
 | ||||
| 	// may not be true if Allowed is true.
 | ||||
| 	// +optional
 | ||||
| 	Denied bool `json:"denied,omitempty" protobuf:"varint,4,opt,name=denied"` | ||||
| 	// Reason is optional.  It indicates why a request was allowed or denied.
 | ||||
| 	// +optional
 | ||||
| 	Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"` | ||||
|  |  | |||
|  | @ -148,7 +148,8 @@ func (SubjectAccessReviewSpec) SwaggerDoc() map[string]string { | |||
| 
 | ||||
| var map_SubjectAccessReviewStatus = map[string]string{ | ||||
| 	"":                "SubjectAccessReviewStatus", | ||||
| 	"allowed":         "Allowed is required.  True if the action would be allowed, false otherwise.", | ||||
| 	"allowed":         "Allowed is required. True if the action would be allowed, false otherwise.", | ||||
| 	"denied":          "Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.", | ||||
| 	"reason":          "Reason is optional.  It indicates why a request was allowed or denied.", | ||||
| 	"evaluationError": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", | ||||
| } | ||||
|  |  | |||
|  | @ -21,76 +21,9 @@ limitations under the License. | |||
| package v1 | ||||
| 
 | ||||
| import ( | ||||
| 	conversion "k8s.io/apimachinery/pkg/conversion" | ||||
| 	runtime "k8s.io/apimachinery/pkg/runtime" | ||||
| 	reflect "reflect" | ||||
| ) | ||||
| 
 | ||||
| func init() { | ||||
| 	SchemeBuilder.Register(RegisterDeepCopies) | ||||
| } | ||||
| 
 | ||||
| // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
 | ||||
| // to allow building arbitrary schemes.
 | ||||
| //
 | ||||
| // Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
 | ||||
| func RegisterDeepCopies(scheme *runtime.Scheme) error { | ||||
| 	return scheme.AddGeneratedDeepCopyFuncs( | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*LocalSubjectAccessReview).DeepCopyInto(out.(*LocalSubjectAccessReview)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&LocalSubjectAccessReview{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*NonResourceAttributes).DeepCopyInto(out.(*NonResourceAttributes)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&NonResourceAttributes{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*NonResourceRule).DeepCopyInto(out.(*NonResourceRule)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&NonResourceRule{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ResourceAttributes).DeepCopyInto(out.(*ResourceAttributes)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ResourceAttributes{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ResourceRule).DeepCopyInto(out.(*ResourceRule)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ResourceRule{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SelfSubjectAccessReview).DeepCopyInto(out.(*SelfSubjectAccessReview)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SelfSubjectAccessReview{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SelfSubjectAccessReviewSpec).DeepCopyInto(out.(*SelfSubjectAccessReviewSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SelfSubjectRulesReview).DeepCopyInto(out.(*SelfSubjectRulesReview)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SelfSubjectRulesReview{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SelfSubjectRulesReviewSpec).DeepCopyInto(out.(*SelfSubjectRulesReviewSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SelfSubjectRulesReviewSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SubjectAccessReview).DeepCopyInto(out.(*SubjectAccessReview)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SubjectAccessReview{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SubjectAccessReviewSpec).DeepCopyInto(out.(*SubjectAccessReviewSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SubjectAccessReviewStatus).DeepCopyInto(out.(*SubjectAccessReviewStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SubjectRulesReviewStatus).DeepCopyInto(out.(*SubjectRulesReviewStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SubjectRulesReviewStatus{})}, | ||||
| 	) | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *LocalSubjectAccessReview) DeepCopyInto(out *LocalSubjectAccessReview) { | ||||
| 	*out = *in | ||||
|  |  | |||
|  | @ -20,7 +20,6 @@ go_library( | |||
|         "//vendor/github.com/gogo/protobuf/proto:go_default_library", | ||||
|         "//vendor/github.com/gogo/protobuf/sortkeys: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/schema:go_default_library", | ||||
|     ], | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| // +k8s:deepcopy-gen=package,register
 | ||||
| // +k8s:deepcopy-gen=package
 | ||||
| // +k8s:openapi-gen=true
 | ||||
| 
 | ||||
| // +groupName=authorization.k8s.io
 | ||||
|  |  | |||
|  | @ -730,6 +730,14 @@ func (m *SubjectAccessReviewStatus) MarshalTo(dAtA []byte) (int, error) { | |||
| 	i++ | ||||
| 	i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError))) | ||||
| 	i += copy(dAtA[i:], m.EvaluationError) | ||||
| 	dAtA[i] = 0x20 | ||||
| 	i++ | ||||
| 	if m.Denied { | ||||
| 		dAtA[i] = 1 | ||||
| 	} else { | ||||
| 		dAtA[i] = 0 | ||||
| 	} | ||||
| 	i++ | ||||
| 	return i, nil | ||||
| } | ||||
| 
 | ||||
|  | @ -1015,6 +1023,7 @@ func (m *SubjectAccessReviewStatus) Size() (n int) { | |||
| 	n += 1 + l + sovGenerated(uint64(l)) | ||||
| 	l = len(m.EvaluationError) | ||||
| 	n += 1 + l + sovGenerated(uint64(l)) | ||||
| 	n += 2 | ||||
| 	return n | ||||
| } | ||||
| 
 | ||||
|  | @ -1205,6 +1214,7 @@ func (this *SubjectAccessReviewStatus) String() string { | |||
| 		`Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`, | ||||
| 		`Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, | ||||
| 		`EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`, | ||||
| 		`Denied:` + fmt.Sprintf("%v", this.Denied) + `,`, | ||||
| 		`}`, | ||||
| 	}, "") | ||||
| 	return s | ||||
|  | @ -3130,6 +3140,26 @@ func (m *SubjectAccessReviewStatus) Unmarshal(dAtA []byte) error { | |||
| 			} | ||||
| 			m.EvaluationError = string(dAtA[iNdEx:postIndex]) | ||||
| 			iNdEx = postIndex | ||||
| 		case 4: | ||||
| 			if wireType != 0 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Denied", wireType) | ||||
| 			} | ||||
| 			var v int | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowGenerated | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				v |= (int(b) & 0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			m.Denied = bool(v != 0) | ||||
| 		default: | ||||
| 			iNdEx = preIndex | ||||
| 			skippy, err := skipGenerated(dAtA[iNdEx:]) | ||||
|  | @ -3422,77 +3452,78 @@ func init() { | |||
| } | ||||
| 
 | ||||
| var fileDescriptorGenerated = []byte{ | ||||
| 	// 1139 bytes of a gzipped FileDescriptorProto
 | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcf, 0x6f, 0x1b, 0x45, | ||||
| 	0x14, 0xf6, 0xfa, 0x47, 0x62, 0x8f, 0x1b, 0x92, 0x4e, 0x94, 0x66, 0x1b, 0x84, 0x6d, 0x19, 0x09, | ||||
| 	0x05, 0xd1, 0xee, 0x92, 0x50, 0x48, 0x09, 0xf4, 0x10, 0xab, 0x11, 0x8a, 0xd4, 0x96, 0x6a, 0xa2, | ||||
| 	0xe4, 0x40, 0x25, 0x60, 0x76, 0x33, 0xb1, 0x17, 0xdb, 0xbb, 0xcb, 0xcc, 0xac, 0x43, 0x10, 0x87, | ||||
| 	0x1e, 0x39, 0x72, 0xe4, 0xc8, 0x89, 0x3b, 0x47, 0x2e, 0x48, 0x70, 0xca, 0xb1, 0xc7, 0x1c, 0x90, | ||||
| 	0x45, 0x96, 0x3f, 0x82, 0x2b, 0x9a, 0xd9, 0xb1, 0x77, 0x1d, 0xaf, 0xe3, 0x24, 0x87, 0xf6, 0xd2, | ||||
| 	0xdb, 0xce, 0xfb, 0xde, 0xf7, 0xde, 0x9b, 0x37, 0xef, 0xbd, 0x7d, 0x60, 0xa7, 0x7d, 0x9f, 0x19, | ||||
| 	0x8e, 0x67, 0xb6, 0x03, 0x8b, 0x50, 0x97, 0x70, 0xc2, 0xcc, 0x1e, 0x71, 0x0f, 0x3c, 0x6a, 0x2a, | ||||
| 	0x00, 0xfb, 0x8e, 0x89, 0x03, 0xde, 0xf2, 0xa8, 0xf3, 0x3d, 0xe6, 0x8e, 0xe7, 0x9a, 0xbd, 0x35, | ||||
| 	0x8b, 0x70, 0xbc, 0x66, 0x36, 0x89, 0x4b, 0x28, 0xe6, 0xe4, 0xc0, 0xf0, 0xa9, 0xc7, 0x3d, 0x58, | ||||
| 	0x8b, 0x18, 0x06, 0xf6, 0x1d, 0x63, 0x84, 0x61, 0x28, 0xc6, 0xca, 0xdd, 0xa6, 0xc3, 0x5b, 0x81, | ||||
| 	0x65, 0xd8, 0x5e, 0xd7, 0x6c, 0x7a, 0x4d, 0xcf, 0x94, 0x44, 0x2b, 0x38, 0x94, 0x27, 0x79, 0x90, | ||||
| 	0x5f, 0x91, 0xc1, 0x95, 0x7b, 0x71, 0x08, 0x5d, 0x6c, 0xb7, 0x1c, 0x97, 0xd0, 0x63, 0xd3, 0x6f, | ||||
| 	0x37, 0x85, 0x80, 0x99, 0x5d, 0xc2, 0xb1, 0xd9, 0x1b, 0x0b, 0x63, 0xc5, 0x9c, 0xc4, 0xa2, 0x81, | ||||
| 	0xcb, 0x9d, 0x2e, 0x19, 0x23, 0x7c, 0x34, 0x8d, 0xc0, 0xec, 0x16, 0xe9, 0xe2, 0x31, 0xde, 0x07, | ||||
| 	0x93, 0x78, 0x01, 0x77, 0x3a, 0xa6, 0xe3, 0x72, 0xc6, 0xe9, 0x79, 0x52, 0x7d, 0x03, 0x80, 0xed, | ||||
| 	0xef, 0x38, 0xc5, 0xfb, 0xb8, 0x13, 0x10, 0x58, 0x05, 0x05, 0x87, 0x93, 0x2e, 0xd3, 0xb5, 0x5a, | ||||
| 	0x6e, 0xb5, 0xd4, 0x28, 0x85, 0xfd, 0x6a, 0x61, 0x47, 0x08, 0x50, 0x24, 0xdf, 0x2c, 0xfe, 0xfc, | ||||
| 	0x4b, 0x35, 0xf3, 0xfc, 0xef, 0x5a, 0xa6, 0xfe, 0x47, 0x16, 0xe8, 0x8f, 0x3c, 0x1b, 0x77, 0x76, | ||||
| 	0x03, 0xeb, 0x1b, 0x62, 0xf3, 0x2d, 0xdb, 0x26, 0x8c, 0x21, 0xd2, 0x73, 0xc8, 0x11, 0xfc, 0x1a, | ||||
| 	0x14, 0x45, 0x3a, 0x0e, 0x30, 0xc7, 0xba, 0x56, 0xd3, 0x56, 0xcb, 0xeb, 0xef, 0x1b, 0xf1, 0x6b, | ||||
| 	0x0c, 0xa3, 0x33, 0xfc, 0x76, 0x53, 0x08, 0x98, 0x21, 0xb4, 0x8d, 0xde, 0x9a, 0xf1, 0xb9, 0xb4, | ||||
| 	0xf5, 0x98, 0x70, 0xdc, 0x80, 0x27, 0xfd, 0x6a, 0x26, 0xec, 0x57, 0x41, 0x2c, 0x43, 0x43, 0xab, | ||||
| 	0xf0, 0x19, 0xc8, 0x33, 0x9f, 0xd8, 0x7a, 0x56, 0x5a, 0xff, 0xd8, 0x98, 0xf6, 0xd6, 0x46, 0x4a, | ||||
| 	0x98, 0xbb, 0x3e, 0xb1, 0x1b, 0x37, 0x94, 0x9b, 0xbc, 0x38, 0x21, 0x69, 0x14, 0xda, 0x60, 0x86, | ||||
| 	0x71, 0xcc, 0x03, 0xa6, 0xe7, 0xa4, 0xf9, 0x4f, 0xae, 0x67, 0x5e, 0x9a, 0x68, 0xbc, 0xa1, 0x1c, | ||||
| 	0xcc, 0x44, 0x67, 0xa4, 0x4c, 0xd7, 0x9f, 0x81, 0xa5, 0x27, 0x9e, 0x8b, 0x08, 0xf3, 0x02, 0x6a, | ||||
| 	0x93, 0x2d, 0xce, 0xa9, 0x63, 0x05, 0x9c, 0x30, 0x58, 0x03, 0x79, 0x1f, 0xf3, 0x96, 0x4c, 0x5c, | ||||
| 	0x29, 0x8e, 0xef, 0x29, 0xe6, 0x2d, 0x24, 0x11, 0xa1, 0xd1, 0x23, 0xd4, 0x92, 0x97, 0x4f, 0x68, | ||||
| 	0xec, 0x13, 0x6a, 0x21, 0x89, 0xd4, 0xbf, 0x05, 0xf3, 0x09, 0xe3, 0x28, 0xe8, 0xc8, 0xb7, 0x15, | ||||
| 	0xd0, 0xc8, 0xdb, 0x0a, 0x06, 0x43, 0x91, 0x1c, 0x3e, 0x00, 0xf3, 0x6e, 0xcc, 0xd9, 0x43, 0x8f, | ||||
| 	0x98, 0x9e, 0x95, 0xaa, 0x8b, 0x61, 0xbf, 0x9a, 0x34, 0x27, 0x20, 0x74, 0x5e, 0x57, 0x14, 0x04, | ||||
| 	0x4c, 0xb9, 0x8d, 0x09, 0x4a, 0x2e, 0xee, 0x12, 0xe6, 0x63, 0x9b, 0xa8, 0x2b, 0xdd, 0x54, 0x01, | ||||
| 	0x97, 0x9e, 0x0c, 0x00, 0x14, 0xeb, 0x4c, 0xbf, 0x1c, 0x7c, 0x1b, 0x14, 0x9a, 0xd4, 0x0b, 0x7c, | ||||
| 	0xf9, 0x3a, 0xa5, 0xc6, 0x9c, 0x52, 0x29, 0x7c, 0x26, 0x84, 0x28, 0xc2, 0xe0, 0xbb, 0x60, 0xb6, | ||||
| 	0x47, 0x28, 0x73, 0x3c, 0x57, 0xcf, 0x4b, 0xb5, 0x79, 0xa5, 0x36, 0xbb, 0x1f, 0x89, 0xd1, 0x00, | ||||
| 	0x87, 0x77, 0x40, 0x91, 0xaa, 0xc0, 0xf5, 0x82, 0xd4, 0x5d, 0x50, 0xba, 0xc5, 0x61, 0x06, 0x87, | ||||
| 	0x1a, 0xf0, 0x43, 0x50, 0x66, 0x81, 0x35, 0x24, 0xcc, 0x48, 0xc2, 0xa2, 0x22, 0x94, 0x77, 0x63, | ||||
| 	0x08, 0x25, 0xf5, 0xc4, 0xb5, 0xc4, 0x1d, 0xf5, 0xd9, 0xd1, 0x6b, 0x89, 0x14, 0x20, 0x89, 0xd4, | ||||
| 	0xff, 0xd2, 0xc0, 0x8d, 0xab, 0xbd, 0xd8, 0x7b, 0xa0, 0x84, 0x7d, 0x47, 0x5e, 0x7b, 0xf0, 0x56, | ||||
| 	0x73, 0x22, 0xaf, 0x5b, 0x4f, 0x77, 0x22, 0x21, 0x8a, 0x71, 0xa1, 0x3c, 0x08, 0x46, 0xd4, 0xf5, | ||||
| 	0x50, 0x79, 0xe0, 0x92, 0xa1, 0x18, 0x87, 0x1b, 0x60, 0x6e, 0x70, 0x90, 0x8f, 0xa4, 0xe7, 0x25, | ||||
| 	0xe1, 0x66, 0xd8, 0xaf, 0xce, 0xa1, 0x24, 0x80, 0x46, 0xf5, 0xea, 0x7f, 0x66, 0xc1, 0xf2, 0x2e, | ||||
| 	0xe9, 0x1c, 0xbe, 0x9a, 0xa9, 0xf0, 0xd5, 0xc8, 0x54, 0x78, 0x70, 0x89, 0xb6, 0x4d, 0x0f, 0xf5, | ||||
| 	0xd5, 0x4e, 0x86, 0x5f, 0xb3, 0xe0, 0xcd, 0x0b, 0x02, 0x83, 0x3f, 0x00, 0x48, 0xc7, 0x1a, 0x4d, | ||||
| 	0x65, 0xf4, 0xde, 0xf4, 0x80, 0xc6, 0x9b, 0xb4, 0x71, 0x2b, 0xec, 0x57, 0x53, 0x9a, 0x17, 0xa5, | ||||
| 	0xf8, 0x81, 0x3f, 0x6a, 0x60, 0xc9, 0x4d, 0x1b, 0x5c, 0x2a, 0xeb, 0x1b, 0xd3, 0x23, 0x48, 0x9d, | ||||
| 	0x7b, 0x8d, 0xdb, 0x61, 0xbf, 0x9a, 0x3e, 0x12, 0x51, 0xba, 0x43, 0x31, 0x72, 0x6e, 0x25, 0x12, | ||||
| 	0x25, 0x9a, 0xe6, 0xe5, 0xd5, 0xda, 0x97, 0x23, 0xb5, 0xf6, 0xe9, 0x95, 0x6a, 0x2d, 0x11, 0xe9, | ||||
| 	0xc4, 0x52, 0xb3, 0xce, 0x95, 0xda, 0xe6, 0xa5, 0x4b, 0x2d, 0x69, 0xfd, 0xe2, 0x4a, 0x7b, 0x0c, | ||||
| 	0x56, 0x26, 0x47, 0x75, 0xe5, 0xd1, 0x5d, 0xff, 0x3d, 0x0b, 0x16, 0x5f, 0xaf, 0x03, 0xd7, 0x6b, | ||||
| 	0xfa, 0xd3, 0x3c, 0x58, 0x7e, 0xdd, 0xf0, 0x17, 0x37, 0xbc, 0xf8, 0x89, 0x06, 0x8c, 0x50, 0xf5, | ||||
| 	0xe3, 0x1f, 0xbe, 0xd5, 0x1e, 0x23, 0x14, 0x49, 0x04, 0xd6, 0x06, 0xbb, 0x41, 0xf4, 0xc3, 0x02, | ||||
| 	0x22, 0xd3, 0xea, 0x5f, 0xa8, 0x16, 0x03, 0x07, 0x14, 0x88, 0xd8, 0x78, 0xf5, 0x42, 0x2d, 0xb7, | ||||
| 	0x5a, 0x5e, 0x7f, 0x78, 0xed, 0x5a, 0x31, 0xe4, 0xe2, 0xbc, 0xed, 0x72, 0x7a, 0x1c, 0xef, 0x20, | ||||
| 	0x52, 0x86, 0x22, 0x0f, 0xf0, 0x2d, 0x90, 0x0b, 0x9c, 0x03, 0xb5, 0x22, 0x94, 0x95, 0x4a, 0x6e, | ||||
| 	0x6f, 0xe7, 0x21, 0x12, 0xf2, 0x95, 0x43, 0xb5, 0x7b, 0x4b, 0x13, 0x70, 0x01, 0xe4, 0xda, 0xe4, | ||||
| 	0x38, 0xea, 0x33, 0x24, 0x3e, 0x61, 0x03, 0x14, 0x7a, 0x62, 0x2d, 0x57, 0x79, 0xbe, 0x33, 0x3d, | ||||
| 	0xd2, 0x78, 0x95, 0x47, 0x11, 0x75, 0x33, 0x7b, 0x5f, 0xab, 0xff, 0xa6, 0x81, 0xdb, 0x13, 0x0b, | ||||
| 	0x52, 0x2c, 0x4a, 0xb8, 0xd3, 0xf1, 0x8e, 0xc8, 0x81, 0xf4, 0x5d, 0x8c, 0x17, 0xa5, 0xad, 0x48, | ||||
| 	0x8c, 0x06, 0x38, 0x7c, 0x07, 0xcc, 0x50, 0x82, 0x99, 0xe7, 0xaa, 0xe5, 0x6c, 0x58, 0xcb, 0x48, | ||||
| 	0x4a, 0x91, 0x42, 0xe1, 0x16, 0x98, 0x27, 0xc2, 0xbd, 0x0c, 0x6e, 0x9b, 0x52, 0x6f, 0xf0, 0x62, | ||||
| 	0xcb, 0x8a, 0x30, 0xbf, 0x3d, 0x0a, 0xa3, 0xf3, 0xfa, 0xf5, 0xff, 0xb2, 0x40, 0x9f, 0x34, 0xce, | ||||
| 	0x60, 0x3b, 0xde, 0x4e, 0x24, 0x28, 0x17, 0xa4, 0xf2, 0xba, 0x71, 0xf9, 0x56, 0x10, 0xb4, 0xc6, | ||||
| 	0x92, 0x8a, 0x66, 0x2e, 0x29, 0x4d, 0x6c, 0x34, 0xf2, 0x08, 0x8f, 0xc0, 0x82, 0x3b, 0xba, 0x4a, | ||||
| 	0x47, 0xbb, 0x56, 0x79, 0x7d, 0xed, 0x4a, 0x85, 0x2f, 0x5d, 0xea, 0xca, 0xe5, 0xc2, 0x39, 0x80, | ||||
| 	0xa1, 0x31, 0x27, 0x70, 0x1d, 0x00, 0xc7, 0xb5, 0xbd, 0xae, 0xdf, 0x21, 0x9c, 0xc8, 0x04, 0x16, | ||||
| 	0xe3, 0x29, 0xb8, 0x33, 0x44, 0x50, 0x42, 0x2b, 0x2d, 0xf3, 0xf9, 0xab, 0x65, 0xbe, 0x71, 0xf7, | ||||
| 	0xe4, 0xac, 0x92, 0x79, 0x71, 0x56, 0xc9, 0x9c, 0x9e, 0x55, 0x32, 0xcf, 0xc3, 0x8a, 0x76, 0x12, | ||||
| 	0x56, 0xb4, 0x17, 0x61, 0x45, 0x3b, 0x0d, 0x2b, 0xda, 0x3f, 0x61, 0x45, 0xfb, 0xe9, 0xdf, 0x4a, | ||||
| 	0xe6, 0x8b, 0x59, 0x75, 0xc3, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x29, 0xa9, 0x9d, 0x7c, 0xb1, | ||||
| 	0x0f, 0x00, 0x00, | ||||
| 	// 1154 bytes of a gzipped FileDescriptorProto
 | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4d, 0x6f, 0x1b, 0xc5, | ||||
| 	0x1b, 0xf7, 0xfa, 0x25, 0xb1, 0xc7, 0xcd, 0x3f, 0xe9, 0x44, 0x69, 0xb6, 0xf9, 0x0b, 0xdb, 0x32, | ||||
| 	0x12, 0x0a, 0xa2, 0xdd, 0x25, 0xa1, 0x90, 0x12, 0xe8, 0x21, 0x56, 0x22, 0x14, 0xa9, 0x2d, 0xd5, | ||||
| 	0x44, 0xc9, 0x81, 0x4a, 0xc0, 0x78, 0x3d, 0xb1, 0x17, 0xdb, 0xbb, 0xcb, 0xcc, 0xac, 0x43, 0x10, | ||||
| 	0x87, 0x1e, 0x39, 0x72, 0xe4, 0xc8, 0x89, 0xef, 0xc0, 0x05, 0x09, 0x4e, 0x39, 0xf6, 0x18, 0x24, | ||||
| 	0x64, 0x91, 0xe5, 0x43, 0x70, 0x45, 0x33, 0x3b, 0xf6, 0xae, 0xe3, 0x75, 0x1c, 0xe7, 0x40, 0x2f, | ||||
| 	0xbd, 0xed, 0x3c, 0xbf, 0xe7, 0x6d, 0x9e, 0x97, 0xd9, 0x1f, 0xd8, 0x6f, 0x3f, 0x64, 0x86, 0xed, | ||||
| 	0x9a, 0x6d, 0xbf, 0x4e, 0xa8, 0x43, 0x38, 0x61, 0x66, 0x8f, 0x38, 0x0d, 0x97, 0x9a, 0x0a, 0xc0, | ||||
| 	0x9e, 0x6d, 0x62, 0x9f, 0xb7, 0x5c, 0x6a, 0x7f, 0x8b, 0xb9, 0xed, 0x3a, 0x66, 0x6f, 0xa3, 0x4e, | ||||
| 	0x38, 0xde, 0x30, 0x9b, 0xc4, 0x21, 0x14, 0x73, 0xd2, 0x30, 0x3c, 0xea, 0x72, 0x17, 0x56, 0x42, | ||||
| 	0x0b, 0x03, 0x7b, 0xb6, 0x31, 0x62, 0x61, 0x28, 0x8b, 0xb5, 0xfb, 0x4d, 0x9b, 0xb7, 0xfc, 0xba, | ||||
| 	0x61, 0xb9, 0x5d, 0xb3, 0xe9, 0x36, 0x5d, 0x53, 0x1a, 0xd6, 0xfd, 0x63, 0x79, 0x92, 0x07, 0xf9, | ||||
| 	0x15, 0x3a, 0x5c, 0x7b, 0x10, 0xa5, 0xd0, 0xc5, 0x56, 0xcb, 0x76, 0x08, 0x3d, 0x35, 0xbd, 0x76, | ||||
| 	0x53, 0x08, 0x98, 0xd9, 0x25, 0x1c, 0x9b, 0xbd, 0xb1, 0x34, 0xd6, 0xcc, 0x49, 0x56, 0xd4, 0x77, | ||||
| 	0xb8, 0xdd, 0x25, 0x63, 0x06, 0x1f, 0x4c, 0x33, 0x60, 0x56, 0x8b, 0x74, 0xf1, 0x98, 0xdd, 0x7b, | ||||
| 	0x93, 0xec, 0x7c, 0x6e, 0x77, 0x4c, 0xdb, 0xe1, 0x8c, 0xd3, 0xcb, 0x46, 0xd5, 0x2d, 0x00, 0xf6, | ||||
| 	0xbe, 0xe1, 0x14, 0x1f, 0xe1, 0x8e, 0x4f, 0x60, 0x19, 0xe4, 0x6c, 0x4e, 0xba, 0x4c, 0xd7, 0x2a, | ||||
| 	0x99, 0xf5, 0x42, 0xad, 0x10, 0xf4, 0xcb, 0xb9, 0x7d, 0x21, 0x40, 0xa1, 0x7c, 0x3b, 0xff, 0xe3, | ||||
| 	0x4f, 0xe5, 0xd4, 0x8b, 0x3f, 0x2b, 0xa9, 0xea, 0xaf, 0x69, 0xa0, 0x3f, 0x76, 0x2d, 0xdc, 0x39, | ||||
| 	0xf0, 0xeb, 0x5f, 0x11, 0x8b, 0xef, 0x58, 0x16, 0x61, 0x0c, 0x91, 0x9e, 0x4d, 0x4e, 0xe0, 0x97, | ||||
| 	0x20, 0x2f, 0xca, 0xd1, 0xc0, 0x1c, 0xeb, 0x5a, 0x45, 0x5b, 0x2f, 0x6e, 0xbe, 0x6b, 0x44, 0xdd, | ||||
| 	0x18, 0x66, 0x67, 0x78, 0xed, 0xa6, 0x10, 0x30, 0x43, 0x68, 0x1b, 0xbd, 0x0d, 0xe3, 0x53, 0xe9, | ||||
| 	0xeb, 0x09, 0xe1, 0xb8, 0x06, 0xcf, 0xfa, 0xe5, 0x54, 0xd0, 0x2f, 0x83, 0x48, 0x86, 0x86, 0x5e, | ||||
| 	0xe1, 0x73, 0x90, 0x65, 0x1e, 0xb1, 0xf4, 0xb4, 0xf4, 0xfe, 0xa1, 0x31, 0xad, 0xd7, 0x46, 0x42, | ||||
| 	0x9a, 0x07, 0x1e, 0xb1, 0x6a, 0xb7, 0x54, 0x98, 0xac, 0x38, 0x21, 0xe9, 0x14, 0x5a, 0x60, 0x8e, | ||||
| 	0x71, 0xcc, 0x7d, 0xa6, 0x67, 0xa4, 0xfb, 0x8f, 0x6e, 0xe6, 0x5e, 0xba, 0xa8, 0xfd, 0x4f, 0x05, | ||||
| 	0x98, 0x0b, 0xcf, 0x48, 0xb9, 0xae, 0x3e, 0x07, 0x2b, 0x4f, 0x5d, 0x07, 0x11, 0xe6, 0xfa, 0xd4, | ||||
| 	0x22, 0x3b, 0x9c, 0x53, 0xbb, 0xee, 0x73, 0xc2, 0x60, 0x05, 0x64, 0x3d, 0xcc, 0x5b, 0xb2, 0x70, | ||||
| 	0x85, 0x28, 0xbf, 0x67, 0x98, 0xb7, 0x90, 0x44, 0x84, 0x46, 0x8f, 0xd0, 0xba, 0xbc, 0x7c, 0x4c, | ||||
| 	0xe3, 0x88, 0xd0, 0x3a, 0x92, 0x48, 0xf5, 0x6b, 0xb0, 0x18, 0x73, 0x8e, 0xfc, 0x8e, 0xec, 0xad, | ||||
| 	0x80, 0x46, 0x7a, 0x2b, 0x2c, 0x18, 0x0a, 0xe5, 0xf0, 0x11, 0x58, 0x74, 0x22, 0x9b, 0x43, 0xf4, | ||||
| 	0x98, 0xe9, 0x69, 0xa9, 0xba, 0x1c, 0xf4, 0xcb, 0x71, 0x77, 0x02, 0x42, 0x97, 0x75, 0xc5, 0x40, | ||||
| 	0xc0, 0x84, 0xdb, 0x98, 0xa0, 0xe0, 0xe0, 0x2e, 0x61, 0x1e, 0xb6, 0x88, 0xba, 0xd2, 0x6d, 0x95, | ||||
| 	0x70, 0xe1, 0xe9, 0x00, 0x40, 0x91, 0xce, 0xf4, 0xcb, 0xc1, 0x37, 0x41, 0xae, 0x49, 0x5d, 0xdf, | ||||
| 	0x93, 0xdd, 0x29, 0xd4, 0x16, 0x94, 0x4a, 0xee, 0x13, 0x21, 0x44, 0x21, 0x06, 0xdf, 0x06, 0xf3, | ||||
| 	0x3d, 0x42, 0x99, 0xed, 0x3a, 0x7a, 0x56, 0xaa, 0x2d, 0x2a, 0xb5, 0xf9, 0xa3, 0x50, 0x8c, 0x06, | ||||
| 	0x38, 0xbc, 0x07, 0xf2, 0x54, 0x25, 0xae, 0xe7, 0xa4, 0xee, 0x92, 0xd2, 0xcd, 0x0f, 0x2b, 0x38, | ||||
| 	0xd4, 0x80, 0xef, 0x83, 0x22, 0xf3, 0xeb, 0x43, 0x83, 0x39, 0x69, 0xb0, 0xac, 0x0c, 0x8a, 0x07, | ||||
| 	0x11, 0x84, 0xe2, 0x7a, 0xe2, 0x5a, 0xe2, 0x8e, 0xfa, 0xfc, 0xe8, 0xb5, 0x44, 0x09, 0x90, 0x44, | ||||
| 	0xaa, 0xbf, 0x6b, 0xe0, 0xd6, 0x6c, 0x1d, 0x7b, 0x07, 0x14, 0xb0, 0x67, 0xcb, 0x6b, 0x0f, 0x7a, | ||||
| 	0xb5, 0x20, 0xea, 0xba, 0xf3, 0x6c, 0x3f, 0x14, 0xa2, 0x08, 0x17, 0xca, 0x83, 0x64, 0xc4, 0x5c, | ||||
| 	0x0f, 0x95, 0x07, 0x21, 0x19, 0x8a, 0x70, 0xb8, 0x05, 0x16, 0x06, 0x07, 0xd9, 0x24, 0x3d, 0x2b, | ||||
| 	0x0d, 0x6e, 0x07, 0xfd, 0xf2, 0x02, 0x8a, 0x03, 0x68, 0x54, 0xaf, 0xfa, 0x5b, 0x1a, 0xac, 0x1e, | ||||
| 	0x90, 0xce, 0xf1, 0xab, 0x79, 0x15, 0xbe, 0x18, 0x79, 0x15, 0x1e, 0x5d, 0x63, 0x6d, 0x93, 0x53, | ||||
| 	0x7d, 0xb5, 0x2f, 0xc3, 0xcf, 0x69, 0xf0, 0xff, 0x2b, 0x12, 0x83, 0xdf, 0x01, 0x48, 0xc7, 0x16, | ||||
| 	0x4d, 0x55, 0xf4, 0xc1, 0xf4, 0x84, 0xc6, 0x97, 0xb4, 0x76, 0x27, 0xe8, 0x97, 0x13, 0x96, 0x17, | ||||
| 	0x25, 0xc4, 0x81, 0xdf, 0x6b, 0x60, 0xc5, 0x49, 0x7a, 0xb8, 0x54, 0xd5, 0xb7, 0xa6, 0x67, 0x90, | ||||
| 	0xf8, 0xee, 0xd5, 0xee, 0x06, 0xfd, 0x72, 0xf2, 0x93, 0x88, 0x92, 0x03, 0x8a, 0x27, 0xe7, 0x4e, | ||||
| 	0xac, 0x50, 0x62, 0x69, 0xfe, 0xbb, 0x59, 0xfb, 0x7c, 0x64, 0xd6, 0x3e, 0x9e, 0x69, 0xd6, 0x62, | ||||
| 	0x99, 0x4e, 0x1c, 0xb5, 0xfa, 0xa5, 0x51, 0xdb, 0xbe, 0xf6, 0xa8, 0xc5, 0xbd, 0x5f, 0x3d, 0x69, | ||||
| 	0x4f, 0xc0, 0xda, 0xe4, 0xac, 0x66, 0x7e, 0xba, 0xab, 0xbf, 0xa4, 0xc1, 0xf2, 0x6b, 0x3a, 0x70, | ||||
| 	0xb3, 0xa5, 0x3f, 0xcf, 0x82, 0xd5, 0xd7, 0x0b, 0x7f, 0xf5, 0xc2, 0x8b, 0x9f, 0xa8, 0xcf, 0x08, | ||||
| 	0x55, 0x3f, 0xfe, 0x61, 0xaf, 0x0e, 0x19, 0xa1, 0x48, 0x22, 0xb0, 0x32, 0xe0, 0x06, 0xe1, 0x0f, | ||||
| 	0x0b, 0x88, 0x4a, 0xab, 0x7f, 0xa1, 0x22, 0x06, 0x36, 0xc8, 0x11, 0xc1, 0x78, 0xf5, 0x5c, 0x25, | ||||
| 	0xb3, 0x5e, 0xdc, 0xdc, 0xbd, 0xf1, 0xac, 0x18, 0x92, 0x38, 0xef, 0x39, 0x9c, 0x9e, 0x46, 0x1c, | ||||
| 	0x44, 0xca, 0x50, 0x18, 0x01, 0xbe, 0x01, 0x32, 0xbe, 0xdd, 0x50, 0x14, 0xa1, 0xa8, 0x54, 0x32, | ||||
| 	0x87, 0xfb, 0xbb, 0x48, 0xc8, 0xd7, 0x8e, 0x15, 0xf7, 0x96, 0x2e, 0xe0, 0x12, 0xc8, 0xb4, 0xc9, | ||||
| 	0x69, 0xb8, 0x67, 0x48, 0x7c, 0xc2, 0x1a, 0xc8, 0xf5, 0x04, 0x2d, 0x57, 0x75, 0xbe, 0x37, 0x3d, | ||||
| 	0xd3, 0x88, 0xca, 0xa3, 0xd0, 0x74, 0x3b, 0xfd, 0x50, 0xab, 0xfe, 0xa1, 0x81, 0xbb, 0x13, 0x07, | ||||
| 	0x52, 0x10, 0x25, 0xdc, 0xe9, 0xb8, 0x27, 0xa4, 0x21, 0x63, 0xe7, 0x23, 0xa2, 0xb4, 0x13, 0x8a, | ||||
| 	0xd1, 0x00, 0x87, 0x6f, 0x81, 0x39, 0x4a, 0x30, 0x73, 0x1d, 0x45, 0xce, 0x86, 0xb3, 0x8c, 0xa4, | ||||
| 	0x14, 0x29, 0x14, 0xee, 0x80, 0x45, 0x22, 0xc2, 0xcb, 0xe4, 0xf6, 0x28, 0x75, 0x07, 0x1d, 0x5b, | ||||
| 	0x55, 0x06, 0x8b, 0x7b, 0xa3, 0x30, 0xba, 0xac, 0x2f, 0x42, 0x35, 0x88, 0x63, 0x93, 0x86, 0x64, | ||||
| 	0x6f, 0xf9, 0x28, 0xd4, 0xae, 0x94, 0x22, 0x85, 0x56, 0xff, 0x49, 0x03, 0x7d, 0xd2, 0xb3, 0x07, | ||||
| 	0xdb, 0x11, 0x8b, 0x91, 0xa0, 0x24, 0x52, 0xc5, 0x4d, 0xe3, 0xfa, 0x2b, 0x23, 0xcc, 0x6a, 0x2b, | ||||
| 	0x2a, 0xf6, 0x42, 0x5c, 0x1a, 0x63, 0x3e, 0xf2, 0x08, 0x4f, 0xc0, 0x92, 0x33, 0x4a, 0xb9, 0x43, | ||||
| 	0x4e, 0x56, 0xdc, 0xdc, 0x98, 0x69, 0x41, 0x64, 0x48, 0x5d, 0x85, 0x5c, 0xba, 0x04, 0x30, 0x34, | ||||
| 	0x16, 0x04, 0x6e, 0x02, 0x60, 0x3b, 0x96, 0xdb, 0xf5, 0x3a, 0x84, 0x13, 0x59, 0xe8, 0x7c, 0xf4, | ||||
| 	0x5a, 0xee, 0x0f, 0x11, 0x14, 0xd3, 0x4a, 0xea, 0x50, 0x76, 0xb6, 0x0e, 0xd5, 0xee, 0x9f, 0x5d, | ||||
| 	0x94, 0x52, 0x2f, 0x2f, 0x4a, 0xa9, 0xf3, 0x8b, 0x52, 0xea, 0x45, 0x50, 0xd2, 0xce, 0x82, 0x92, | ||||
| 	0xf6, 0x32, 0x28, 0x69, 0xe7, 0x41, 0x49, 0xfb, 0x2b, 0x28, 0x69, 0x3f, 0xfc, 0x5d, 0x4a, 0x7d, | ||||
| 	0x36, 0xaf, 0x6e, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, 0xb3, 0x5e, 0x05, 0xd9, 0x0f, | ||||
| 	0x00, 0x00, | ||||
| } | ||||
|  |  | |||
|  | @ -226,9 +226,16 @@ message SubjectAccessReviewSpec { | |||
| 
 | ||||
| // SubjectAccessReviewStatus | ||||
| message SubjectAccessReviewStatus { | ||||
|   // Allowed is required.  True if the action would be allowed, false otherwise. | ||||
|   // Allowed is required. True if the action would be allowed, false otherwise. | ||||
|   optional bool allowed = 1; | ||||
| 
 | ||||
|   // Denied is optional. True if the action would be denied, otherwise | ||||
|   // false. If both allowed is false and denied is false, then the | ||||
|   // authorizer has no opinion on whether to authorize the action. Denied | ||||
|   // may not be true if Allowed is true. | ||||
|   // +optional | ||||
|   optional bool denied = 4; | ||||
| 
 | ||||
|   // Reason is optional.  It indicates why a request was allowed or denied. | ||||
|   // +optional | ||||
|   optional string reason = 2; | ||||
|  |  | |||
|  | @ -41,7 +41,7 @@ var ( | |||
| 	AddToScheme        = localSchemeBuilder.AddToScheme | ||||
| ) | ||||
| 
 | ||||
| // Adds the list of known types to api.Scheme.
 | ||||
| // Adds the list of known types to the given scheme.
 | ||||
| func addKnownTypes(scheme *runtime.Scheme) error { | ||||
| 	scheme.AddKnownTypes(SchemeGroupVersion, | ||||
| 		&SelfSubjectRulesReview{}, | ||||
|  |  | |||
|  | @ -169,8 +169,14 @@ type SelfSubjectAccessReviewSpec struct { | |||
| 
 | ||||
| // SubjectAccessReviewStatus
 | ||||
| type SubjectAccessReviewStatus struct { | ||||
| 	// Allowed is required.  True if the action would be allowed, false otherwise.
 | ||||
| 	// Allowed is required. True if the action would be allowed, false otherwise.
 | ||||
| 	Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"` | ||||
| 	// Denied is optional. True if the action would be denied, otherwise
 | ||||
| 	// false. If both allowed is false and denied is false, then the
 | ||||
| 	// authorizer has no opinion on whether to authorize the action. Denied
 | ||||
| 	// may not be true if Allowed is true.
 | ||||
| 	// +optional
 | ||||
| 	Denied bool `json:"denied,omitempty" protobuf:"varint,4,opt,name=denied"` | ||||
| 	// Reason is optional.  It indicates why a request was allowed or denied.
 | ||||
| 	// +optional
 | ||||
| 	Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"` | ||||
|  |  | |||
|  | @ -148,7 +148,8 @@ func (SubjectAccessReviewSpec) SwaggerDoc() map[string]string { | |||
| 
 | ||||
| var map_SubjectAccessReviewStatus = map[string]string{ | ||||
| 	"":                "SubjectAccessReviewStatus", | ||||
| 	"allowed":         "Allowed is required.  True if the action would be allowed, false otherwise.", | ||||
| 	"allowed":         "Allowed is required. True if the action would be allowed, false otherwise.", | ||||
| 	"denied":          "Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.", | ||||
| 	"reason":          "Reason is optional.  It indicates why a request was allowed or denied.", | ||||
| 	"evaluationError": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", | ||||
| } | ||||
|  |  | |||
|  | @ -21,76 +21,9 @@ limitations under the License. | |||
| package v1beta1 | ||||
| 
 | ||||
| import ( | ||||
| 	conversion "k8s.io/apimachinery/pkg/conversion" | ||||
| 	runtime "k8s.io/apimachinery/pkg/runtime" | ||||
| 	reflect "reflect" | ||||
| ) | ||||
| 
 | ||||
| func init() { | ||||
| 	SchemeBuilder.Register(RegisterDeepCopies) | ||||
| } | ||||
| 
 | ||||
| // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
 | ||||
| // to allow building arbitrary schemes.
 | ||||
| //
 | ||||
| // Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
 | ||||
| func RegisterDeepCopies(scheme *runtime.Scheme) error { | ||||
| 	return scheme.AddGeneratedDeepCopyFuncs( | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*LocalSubjectAccessReview).DeepCopyInto(out.(*LocalSubjectAccessReview)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&LocalSubjectAccessReview{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*NonResourceAttributes).DeepCopyInto(out.(*NonResourceAttributes)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&NonResourceAttributes{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*NonResourceRule).DeepCopyInto(out.(*NonResourceRule)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&NonResourceRule{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ResourceAttributes).DeepCopyInto(out.(*ResourceAttributes)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ResourceAttributes{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*ResourceRule).DeepCopyInto(out.(*ResourceRule)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&ResourceRule{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SelfSubjectAccessReview).DeepCopyInto(out.(*SelfSubjectAccessReview)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SelfSubjectAccessReview{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SelfSubjectAccessReviewSpec).DeepCopyInto(out.(*SelfSubjectAccessReviewSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SelfSubjectRulesReview).DeepCopyInto(out.(*SelfSubjectRulesReview)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SelfSubjectRulesReview{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SelfSubjectRulesReviewSpec).DeepCopyInto(out.(*SelfSubjectRulesReviewSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SelfSubjectRulesReviewSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SubjectAccessReview).DeepCopyInto(out.(*SubjectAccessReview)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SubjectAccessReview{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SubjectAccessReviewSpec).DeepCopyInto(out.(*SubjectAccessReviewSpec)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SubjectAccessReviewStatus).DeepCopyInto(out.(*SubjectAccessReviewStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})}, | ||||
| 		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { | ||||
| 			in.(*SubjectRulesReviewStatus).DeepCopyInto(out.(*SubjectRulesReviewStatus)) | ||||
| 			return nil | ||||
| 		}, InType: reflect.TypeOf(&SubjectRulesReviewStatus{})}, | ||||
| 	) | ||||
| } | ||||
| 
 | ||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | ||||
| func (in *LocalSubjectAccessReview) DeepCopyInto(out *LocalSubjectAccessReview) { | ||||
| 	*out = *in | ||||
|  |  | |||
|  | @ -21,7 +21,6 @@ go_library( | |||
|         "//vendor/k8s.io/api/core/v1:go_default_library", | ||||
|         "//vendor/k8s.io/apimachinery/pkg/api/resource: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/schema:go_default_library", | ||||
|     ], | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
| limitations under the License. | ||||
| */ | ||||
| 
 | ||||
| // +k8s:deepcopy-gen=package,register
 | ||||
| // +k8s:deepcopy-gen=package
 | ||||
| // +k8s:openapi-gen=true
 | ||||
| 
 | ||||
| package v1 // import "k8s.io/api/autoscaling/v1"
 | ||||
|  |  | |||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue