diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index dbbb145f17..b6b45db7b4 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -124,13 +124,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -282,13 +275,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -386,13 +372,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -490,13 +469,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -594,13 +566,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -799,13 +764,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -881,13 +839,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -1145,13 +1096,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -1677,13 +1621,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -2209,13 +2146,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -2741,13 +2671,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -3273,13 +3196,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -3979,13 +3895,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -4458,13 +4367,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -4556,13 +4458,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -5859,13 +5754,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -6391,13 +6279,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -7271,13 +7152,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -7977,13 +7851,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -8509,13 +8376,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -8955,13 +8815,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -10688,13 +10541,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -11691,13 +11537,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -11982,13 +11821,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -12477,13 +12309,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -12581,13 +12406,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -12685,13 +12503,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -12789,13 +12600,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -12893,13 +12697,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -12997,13 +12794,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -13101,13 +12891,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -13205,13 +12988,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -13309,13 +13085,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -13413,13 +13182,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -13517,13 +13279,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -13621,13 +13376,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -13725,13 +13473,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -13837,13 +13578,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -13957,13 +13691,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -14069,13 +13796,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -14189,13 +13909,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -14301,13 +14014,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -14421,13 +14127,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -14533,13 +14232,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -14653,13 +14345,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -14765,13 +14450,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -14885,13 +14563,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -14997,13 +14668,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -15117,13 +14781,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -15229,13 +14886,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -15349,13 +14999,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -15461,13 +15104,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -15581,13 +15217,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -15693,13 +15322,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -15813,13 +15435,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -15925,13 +15540,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -16045,13 +15653,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -16157,13 +15758,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -16277,13 +15871,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -16389,13 +15976,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -16509,13 +16089,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -16621,13 +16194,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -16725,13 +16291,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -16837,13 +16396,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -16941,13 +16493,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -17045,13 +16590,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -17157,13 +16695,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -17261,13 +16792,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -17365,13 +16889,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -17469,13 +16986,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -17573,13 +17083,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -17677,13 +17180,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -17781,13 +17277,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -17898,771 +17387,6 @@ } } }, - "/apis/admissionregistration.k8s.io/v1alpha1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "getAdmissionregistrationV1alpha1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations": { - "get": { - "description": "list or watch objects of kind InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "listAdmissionregistrationV1alpha1InitializerConfiguration", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfigurationList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "post": { - "description": "create an InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "createAdmissionregistrationV1alpha1InitializerConfiguration", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - { - "uniqueItems": true, - "type": "string", - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "name": "dryRun", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete collection of InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "deleteAdmissionregistrationV1alpha1CollectionInitializerConfiguration", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations/{name}": { - "get": { - "description": "read the specified InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "readAdmissionregistrationV1alpha1InitializerConfiguration", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "put": { - "description": "replace the specified InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "replaceAdmissionregistrationV1alpha1InitializerConfiguration", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - { - "uniqueItems": true, - "type": "string", - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "name": "dryRun", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete an InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "deleteAdmissionregistrationV1alpha1InitializerConfiguration", - "parameters": [ - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "string", - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "name": "dryRun", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "patch": { - "description": "partially update the specified InitializerConfiguration", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "patchAdmissionregistrationV1alpha1InitializerConfiguration", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - { - "uniqueItems": true, - "type": "string", - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "name": "dryRun", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the InitializerConfiguration", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/initializerconfigurations": { - "get": { - "description": "watch individual changes to a list of InitializerConfiguration. deprecated: use the 'watch' parameter with a list operation instead.", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "watchAdmissionregistrationV1alpha1InitializerConfigurationList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/initializerconfigurations/{name}": { - "get": { - "description": "watch changes to an object of kind InitializerConfiguration. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "watchAdmissionregistrationV1alpha1InitializerConfiguration", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the InitializerConfiguration", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, "/apis/admissionregistration.k8s.io/v1beta1/": { "get": { "description": "get available resources", @@ -18936,13 +17660,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -19452,13 +18169,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -19781,13 +18491,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -19885,13 +18588,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -19997,13 +18693,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -20101,13 +18790,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -20466,13 +19148,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -20961,13 +19636,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -21065,13 +19733,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -21430,13 +20091,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -21925,13 +20579,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -22029,13 +20676,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -22361,13 +21001,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -22856,13 +21489,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -22960,13 +21586,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -23138,13 +21757,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -23242,13 +21854,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -23346,13 +21951,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -23637,13 +22235,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -24169,13 +22760,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -24875,13 +23459,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -25755,13 +24332,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -26635,13 +25205,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -27328,13 +25891,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -27432,13 +25988,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -27536,13 +26085,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -27640,13 +26182,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -27744,13 +26279,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -27848,13 +26376,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -27960,13 +26481,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -28080,13 +26594,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -28192,13 +26699,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -28312,13 +26812,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -28424,13 +26917,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -28544,13 +27030,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -28656,13 +27135,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -28776,13 +27248,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -28888,13 +27353,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -29008,13 +27466,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -29112,13 +27563,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -29249,13 +27693,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -29353,13 +27790,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -29644,13 +28074,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -30176,13 +28599,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -30534,13 +28950,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -31154,13 +29563,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -31847,13 +30249,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -31951,13 +30346,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -32055,13 +30443,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -32159,13 +30540,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -32271,13 +30645,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -32391,13 +30758,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -32503,13 +30863,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -32623,13 +30976,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -32735,13 +31081,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -32855,13 +31194,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -32992,13 +31324,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -33096,13 +31421,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -33200,13 +31518,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -33491,13 +31802,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -34023,13 +32327,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -34729,13 +33026,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -35609,13 +33899,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -36489,13 +34772,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -37182,13 +35458,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -37286,13 +35555,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -37390,13 +35652,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -37494,13 +35749,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -37598,13 +35846,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -37702,13 +35943,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -37814,13 +36048,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -37934,13 +36161,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -38046,13 +36266,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -38166,13 +36379,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -38278,13 +36484,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -38398,13 +36597,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -38510,13 +36702,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -38630,13 +36815,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -38742,13 +36920,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -38862,13 +37033,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -38966,13 +37130,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -39323,13 +37480,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -39652,13 +37802,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -39756,13 +37899,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -39947,13 +38083,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -40062,13 +38191,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -40210,13 +38332,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -40300,13 +38415,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -40382,13 +38490,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -40464,13 +38565,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -40579,13 +38673,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -40669,13 +38756,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -40751,13 +38831,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -40833,13 +38906,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -40968,13 +39034,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -41259,13 +39318,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -41778,13 +39830,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -41882,13 +39927,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -41994,13 +40032,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -42147,13 +40178,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -42438,13 +40462,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -42957,13 +40974,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -43061,13 +41071,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -43173,13 +41176,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -43326,13 +41322,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -43617,13 +41606,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -44136,13 +42118,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -44240,13 +42215,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -44352,13 +42320,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -44538,13 +42499,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -44829,13 +42783,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -45348,13 +43295,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -45452,13 +43392,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -45564,13 +43497,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -45717,13 +43643,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -46008,13 +43927,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -46527,13 +44439,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -46631,13 +44536,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -46743,13 +44641,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -46896,13 +44787,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -47187,13 +45071,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -47706,13 +45583,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -47810,13 +45680,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -47922,13 +45785,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -48295,13 +46151,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -48867,13 +46716,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -48971,13 +46813,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -49149,13 +46984,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -49440,13 +47268,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -49785,13 +47606,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -49889,13 +47703,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -50001,13 +47808,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -50154,13 +47954,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -50445,13 +48238,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -50790,13 +48576,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -50894,13 +48673,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -51006,13 +48778,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -51192,13 +48957,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -51483,13 +49241,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -51828,13 +49579,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -51932,13 +49676,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -52044,13 +49781,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -52230,13 +49960,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -52334,13 +50057,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -52438,13 +50154,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -52729,13 +50438,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -53435,13 +51137,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -53793,13 +51488,6 @@ "name": "dryRun", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -54413,13 +52101,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -55119,13 +52800,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -55651,13 +53325,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -56518,13 +54185,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -56809,13 +54469,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -57138,13 +54791,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -57242,13 +54888,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -57346,13 +54985,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -57450,13 +55082,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -57554,13 +55179,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -57666,13 +55284,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -57786,13 +55397,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -57898,13 +55502,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -58018,13 +55615,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -58130,13 +55720,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -58250,13 +55833,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -58362,13 +55938,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -58482,13 +56051,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -58594,13 +56156,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -58714,13 +56269,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -58818,13 +56366,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -58922,13 +56463,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -59034,13 +56568,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -59391,13 +56918,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -59736,13 +57256,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -59840,13 +57353,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -59952,13 +57458,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -60072,13 +57571,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -60429,13 +57921,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -60948,13 +58433,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -61239,13 +58717,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -61568,13 +59039,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -61680,13 +59144,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -61800,13 +59257,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -61904,13 +59354,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -62008,13 +59451,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -62373,13 +59809,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -62873,13 +60302,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -63373,13 +60795,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -63889,13 +61304,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -64218,13 +61626,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -64322,13 +61723,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -64426,13 +61820,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -64530,13 +61917,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -64642,13 +62022,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -64746,13 +62119,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -64858,13 +62224,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -64970,13 +62329,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -65090,13 +62442,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -65202,13 +62547,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -65322,13 +62660,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -65426,13 +62757,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -65750,13 +63074,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -66250,13 +63567,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -66750,13 +64060,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -67266,13 +64569,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -67595,13 +64891,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -67699,13 +64988,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -67803,13 +65085,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -67907,13 +65182,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -68019,13 +65287,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -68123,13 +65384,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -68235,13 +65489,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -68347,13 +65594,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -68467,13 +65707,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -68579,13 +65812,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -68699,13 +65925,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -68803,13 +66022,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -69127,13 +66339,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -69627,13 +66832,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -70127,13 +67325,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -70643,13 +67834,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -70972,13 +68156,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -71076,13 +68253,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -71180,13 +68350,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -71284,13 +68447,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -71396,13 +68552,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -71500,13 +68649,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -71612,13 +68754,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -71724,13 +68859,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -71844,13 +68972,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -71956,13 +69077,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -72076,13 +69190,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -72180,13 +69287,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -72537,13 +69637,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -72866,13 +69959,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -72970,13 +70056,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -73302,13 +70381,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -73631,13 +70703,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -73735,13 +70800,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -74100,13 +71158,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -74445,13 +71496,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -74549,13 +71593,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -74661,13 +71698,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -74781,13 +71811,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -75138,13 +72161,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -75654,13 +72670,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -76149,13 +73158,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -76253,13 +73255,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -76365,13 +73360,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -76469,13 +73457,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -76801,13 +73782,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -77130,13 +74104,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -77234,13 +74201,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -77566,13 +74526,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -78082,13 +75035,6 @@ } }, "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -78411,13 +75357,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -78515,13 +75454,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -78627,13 +75559,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -78731,13 +75656,6 @@ "name": "fieldSelector", "in": "query" }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, { "uniqueItems": true, "type": "string", @@ -78863,122 +75781,6 @@ } }, "definitions": { - "io.k8s.api.admissionregistration.v1alpha1.Initializer": { - "description": "Initializer describes the name and the failure policy of an initializer, and what resources it applies to.", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "description": "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", - "type": "string" - }, - "rules": { - "description": "Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Rule" - } - } - } - }, - "io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration": { - "description": "InitializerConfiguration describes the configuration of initializers.", - "type": "object", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - "type": "string" - }, - "initializers": { - "description": "Initializers is a list of resources and their default initializers Order-sensitive. When merging multiple InitializerConfigurations, we sort the initializers from different InitializerConfigurations by the name of the InitializerConfigurations; the order of the initializers from the same InitializerConfiguration is preserved.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Initializer" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.admissionregistration.v1alpha1.InitializerConfigurationList": { - "description": "InitializerConfigurationList is a list of InitializerConfiguration.", - "type": "object", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of InitializerConfiguration.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfigurationList", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.admissionregistration.v1alpha1.Rule": { - "description": "Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.", - "type": "object", - "properties": { - "apiGroups": { - "description": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", - "type": "array", - "items": { - "type": "string" - } - }, - "apiVersions": { - "description": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, "io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfiguration": { "description": "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.", "type": "object", @@ -95340,11 +92142,6 @@ "kind": "DeleteOptions", "version": "v1beta1" }, - { - "group": "admissionregistration.k8s.io", - "kind": "DeleteOptions", - "version": "v1alpha1" - }, { "group": "admissionregistration.k8s.io", "kind": "DeleteOptions", @@ -95691,7 +92488,7 @@ "format": "int64" }, "initializers": { - "description": "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.", + "description": "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.\n\nDEPRECATED - initializers are an alpha field and will be removed in v1.15.", "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Initializers" }, "labels": { @@ -95930,11 +92727,6 @@ "kind": "WatchEvent", "version": "v1beta1" }, - { - "group": "admissionregistration.k8s.io", - "kind": "WatchEvent", - "version": "v1alpha1" - }, { "group": "admissionregistration.k8s.io", "kind": "WatchEvent", @@ -97101,22 +93893,6 @@ "description": "Deprecated. Please use io.k8s.api.core.v1.WeightedPodAffinityTerm instead.", "$ref": "#/definitions/io.k8s.api.core.v1.WeightedPodAffinityTerm" }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.Initializer": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.Initializer instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Initializer" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.InitializerConfiguration": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.InitializerConfigurationList": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.InitializerConfigurationList instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfigurationList" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.Rule": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.Rule instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Rule" - }, "io.k8s.kubernetes.pkg.apis.apps.v1beta1.ControllerRevision": { "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.ControllerRevision instead.", "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevision" diff --git a/build/kazel_generated.bzl b/build/kazel_generated.bzl index 12dfa3a56e..9924953bbe 100644 --- a/build/kazel_generated.bzl +++ b/build/kazel_generated.bzl @@ -39,7 +39,6 @@ tags_values_pkgs = {"openapi-gen": { "pkg/apis/abac/v1beta1", "pkg/apis/auditregistration", "pkg/version", - "staging/src/k8s.io/api/admissionregistration/v1alpha1", "staging/src/k8s.io/api/admissionregistration/v1beta1", "staging/src/k8s.io/api/apps/v1", "staging/src/k8s.io/api/apps/v1beta1", @@ -110,7 +109,6 @@ tags_pkgs_values = {"openapi-gen": { "pkg/apis/auditregistration": ["true"], "pkg/version": ["true"], "staging/src/k8s.io/api/admission/v1beta1": ["false"], - "staging/src/k8s.io/api/admissionregistration/v1alpha1": ["true"], "staging/src/k8s.io/api/admissionregistration/v1beta1": ["true"], "staging/src/k8s.io/api/apps/v1": ["true"], "staging/src/k8s.io/api/apps/v1beta1": ["true"], diff --git a/cmd/kube-apiserver/app/aggregator.go b/cmd/kube-apiserver/app/aggregator.go index 92e733a7e9..ebe612f428 100644 --- a/cmd/kube-apiserver/app/aggregator.go +++ b/cmd/kube-apiserver/app/aggregator.go @@ -235,39 +235,38 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{ // can reasonably expect seems questionable. {Group: "extensions", Version: "v1beta1"}: {group: 17900, version: 1}, // to my knowledge, nothing below here collides - {Group: "apps", Version: "v1beta1"}: {group: 17800, version: 1}, - {Group: "apps", Version: "v1beta2"}: {group: 17800, version: 9}, - {Group: "apps", Version: "v1"}: {group: 17800, version: 15}, - {Group: "events.k8s.io", Version: "v1beta1"}: {group: 17750, version: 5}, - {Group: "authentication.k8s.io", Version: "v1"}: {group: 17700, version: 15}, - {Group: "authentication.k8s.io", Version: "v1beta1"}: {group: 17700, version: 9}, - {Group: "authorization.k8s.io", Version: "v1"}: {group: 17600, version: 15}, - {Group: "authorization.k8s.io", Version: "v1beta1"}: {group: 17600, version: 9}, - {Group: "autoscaling", Version: "v1"}: {group: 17500, version: 15}, - {Group: "autoscaling", Version: "v2beta1"}: {group: 17500, version: 9}, - {Group: "autoscaling", Version: "v2beta2"}: {group: 17500, version: 1}, - {Group: "batch", Version: "v1"}: {group: 17400, version: 15}, - {Group: "batch", Version: "v1beta1"}: {group: 17400, version: 9}, - {Group: "batch", Version: "v2alpha1"}: {group: 17400, version: 9}, - {Group: "certificates.k8s.io", Version: "v1beta1"}: {group: 17300, version: 9}, - {Group: "networking.k8s.io", Version: "v1"}: {group: 17200, version: 15}, - {Group: "policy", Version: "v1beta1"}: {group: 17100, version: 9}, - {Group: "rbac.authorization.k8s.io", Version: "v1"}: {group: 17000, version: 15}, - {Group: "rbac.authorization.k8s.io", Version: "v1beta1"}: {group: 17000, version: 12}, - {Group: "rbac.authorization.k8s.io", Version: "v1alpha1"}: {group: 17000, version: 9}, - {Group: "settings.k8s.io", Version: "v1alpha1"}: {group: 16900, version: 9}, - {Group: "storage.k8s.io", Version: "v1"}: {group: 16800, version: 15}, - {Group: "storage.k8s.io", Version: "v1beta1"}: {group: 16800, version: 9}, - {Group: "storage.k8s.io", Version: "v1alpha1"}: {group: 16800, version: 1}, - {Group: "apiextensions.k8s.io", Version: "v1beta1"}: {group: 16700, version: 9}, - {Group: "admissionregistration.k8s.io", Version: "v1"}: {group: 16700, version: 15}, - {Group: "admissionregistration.k8s.io", Version: "v1beta1"}: {group: 16700, version: 12}, - {Group: "admissionregistration.k8s.io", Version: "v1alpha1"}: {group: 16700, version: 9}, - {Group: "scheduling.k8s.io", Version: "v1beta1"}: {group: 16600, version: 12}, - {Group: "scheduling.k8s.io", Version: "v1alpha1"}: {group: 16600, version: 9}, - {Group: "coordination.k8s.io", Version: "v1"}: {group: 16500, version: 15}, - {Group: "coordination.k8s.io", Version: "v1beta1"}: {group: 16500, version: 9}, - {Group: "auditregistration.k8s.io", Version: "v1alpha1"}: {group: 16400, version: 1}, + {Group: "apps", Version: "v1beta1"}: {group: 17800, version: 1}, + {Group: "apps", Version: "v1beta2"}: {group: 17800, version: 9}, + {Group: "apps", Version: "v1"}: {group: 17800, version: 15}, + {Group: "events.k8s.io", Version: "v1beta1"}: {group: 17750, version: 5}, + {Group: "authentication.k8s.io", Version: "v1"}: {group: 17700, version: 15}, + {Group: "authentication.k8s.io", Version: "v1beta1"}: {group: 17700, version: 9}, + {Group: "authorization.k8s.io", Version: "v1"}: {group: 17600, version: 15}, + {Group: "authorization.k8s.io", Version: "v1beta1"}: {group: 17600, version: 9}, + {Group: "autoscaling", Version: "v1"}: {group: 17500, version: 15}, + {Group: "autoscaling", Version: "v2beta1"}: {group: 17500, version: 9}, + {Group: "autoscaling", Version: "v2beta2"}: {group: 17500, version: 1}, + {Group: "batch", Version: "v1"}: {group: 17400, version: 15}, + {Group: "batch", Version: "v1beta1"}: {group: 17400, version: 9}, + {Group: "batch", Version: "v2alpha1"}: {group: 17400, version: 9}, + {Group: "certificates.k8s.io", Version: "v1beta1"}: {group: 17300, version: 9}, + {Group: "networking.k8s.io", Version: "v1"}: {group: 17200, version: 15}, + {Group: "policy", Version: "v1beta1"}: {group: 17100, version: 9}, + {Group: "rbac.authorization.k8s.io", Version: "v1"}: {group: 17000, version: 15}, + {Group: "rbac.authorization.k8s.io", Version: "v1beta1"}: {group: 17000, version: 12}, + {Group: "rbac.authorization.k8s.io", Version: "v1alpha1"}: {group: 17000, version: 9}, + {Group: "settings.k8s.io", Version: "v1alpha1"}: {group: 16900, version: 9}, + {Group: "storage.k8s.io", Version: "v1"}: {group: 16800, version: 15}, + {Group: "storage.k8s.io", Version: "v1beta1"}: {group: 16800, version: 9}, + {Group: "storage.k8s.io", Version: "v1alpha1"}: {group: 16800, version: 1}, + {Group: "apiextensions.k8s.io", Version: "v1beta1"}: {group: 16700, version: 9}, + {Group: "admissionregistration.k8s.io", Version: "v1"}: {group: 16700, version: 15}, + {Group: "admissionregistration.k8s.io", Version: "v1beta1"}: {group: 16700, version: 12}, + {Group: "scheduling.k8s.io", Version: "v1beta1"}: {group: 16600, version: 12}, + {Group: "scheduling.k8s.io", Version: "v1alpha1"}: {group: 16600, version: 9}, + {Group: "coordination.k8s.io", Version: "v1"}: {group: 16500, version: 15}, + {Group: "coordination.k8s.io", Version: "v1beta1"}: {group: 16500, version: 9}, + {Group: "auditregistration.k8s.io", Version: "v1alpha1"}: {group: 16400, version: 1}, // Append a new group to the end of the list if unsure. // You can use min(existing group)-100 as the initial value for a group. // Version can be set to 9 (to have space around) for a new group. diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index 1ede5e28fc..50bf1fe889 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -689,7 +689,6 @@ func postProcessOpenAPISpecForBackwardCompatibility(s *spec.Swagger) (*spec.Swag "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentStatus": "io.k8s.api.extensions.v1beta1.DeploymentStatus", "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.RoleRef": "io.k8s.api.rbac.v1beta1.RoleRef", "io.k8s.kubernetes.pkg.apis.apps.v1beta1.Scale": "io.k8s.api.apps.v1beta1.Scale", - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.InitializerConfiguration": "io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration", "io.k8s.kubernetes.pkg.api.v1.PhotonPersistentDiskVolumeSource": "io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource", "io.k8s.kubernetes.pkg.api.v1.PreferredSchedulingTerm": "io.k8s.api.core.v1.PreferredSchedulingTerm", "io.k8s.kubernetes.pkg.apis.batch.v1.JobSpec": "io.k8s.api.batch.v1.JobSpec", @@ -727,7 +726,6 @@ func postProcessOpenAPISpecForBackwardCompatibility(s *spec.Swagger) (*spec.Swag "io.k8s.kubernetes.pkg.api.v1.Volume": "io.k8s.api.core.v1.Volume", "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.RoleBindingList": "io.k8s.api.rbac.v1alpha1.RoleBindingList", "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.Rule": "io.k8s.api.admissionregistration.v1alpha1.Rule", - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.InitializerConfigurationList": "io.k8s.api.admissionregistration.v1alpha1.InitializerConfigurationList", "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicy": "io.k8s.api.extensions.v1beta1.NetworkPolicy", "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleList": "io.k8s.api.rbac.v1alpha1.ClusterRoleList", "io.k8s.kubernetes.pkg.api.v1.ObjectFieldSelector": "io.k8s.api.core.v1.ObjectFieldSelector", diff --git a/hack/.golint_failures b/hack/.golint_failures index 2614b3fcb1..9586131194 100644 --- a/hack/.golint_failures +++ b/hack/.golint_failures @@ -15,7 +15,6 @@ pkg/apis/abac/latest pkg/apis/admission pkg/apis/admission/v1beta1 pkg/apis/admissionregistration -pkg/apis/admissionregistration/v1alpha1 pkg/apis/admissionregistration/v1beta1 pkg/apis/admissionregistration/validation pkg/apis/apps @@ -254,7 +253,6 @@ pkg/proxy/util pkg/proxy/winkernel pkg/proxy/winuserspace pkg/quota/v1/evaluator/core -pkg/registry/admissionregistration/initializerconfiguration/storage pkg/registry/admissionregistration/mutatingwebhookconfiguration/storage pkg/registry/admissionregistration/rest pkg/registry/admissionregistration/validatingwebhookconfiguration/storage @@ -423,7 +421,6 @@ plugin/pkg/auth/authorizer/node plugin/pkg/auth/authorizer/rbac plugin/pkg/auth/authorizer/rbac/bootstrappolicy staging/src/k8s.io/api/admission/v1beta1 -staging/src/k8s.io/api/admissionregistration/v1alpha1 staging/src/k8s.io/api/admissionregistration/v1beta1 staging/src/k8s.io/api/apps/v1 staging/src/k8s.io/api/apps/v1beta1 @@ -520,7 +517,6 @@ staging/src/k8s.io/apimachinery/pkg/watch staging/src/k8s.io/apiserver/pkg/admission staging/src/k8s.io/apiserver/pkg/admission/configuration staging/src/k8s.io/apiserver/pkg/admission/initializer -staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1 staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testcerts diff --git a/hack/lib/init.sh b/hack/lib/init.sh index f0b520fb1b..e1bf1c8b18 100755 --- a/hack/lib/init.sh +++ b/hack/lib/init.sh @@ -56,7 +56,6 @@ KUBE_OUTPUT_HOSTBIN="${KUBE_OUTPUT_BINPATH}/$(kube::util::host_platform)" # most preferred version for a group should appear first KUBE_AVAILABLE_GROUP_VERSIONS="${KUBE_AVAILABLE_GROUP_VERSIONS:-\ v1 \ -admissionregistration.k8s.io/v1alpha1 \ admissionregistration.k8s.io/v1beta1 \ admission.k8s.io/v1beta1 \ apps/v1 \ diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index c3b83ae96d..13b7c8ca52 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -522,13 +522,6 @@ function start_apiserver { priv_arg="--allow-privileged=${ALLOW_PRIVILEGED} " fi - if [[ ${ENABLE_ADMISSION_PLUGINS} == *"Initializers"* ]]; then - if [[ -n "${RUNTIME_CONFIG}" ]]; then - RUNTIME_CONFIG+="," - fi - RUNTIME_CONFIG+="admissionregistration.k8s.io/v1alpha1" - fi - runtime_config="" if [[ -n "${RUNTIME_CONFIG}" ]]; then runtime_config="--runtime-config=${RUNTIME_CONFIG}" diff --git a/hack/update-generated-protobuf-dockerized.sh b/hack/update-generated-protobuf-dockerized.sh index 6295034294..bb592b1a56 100755 --- a/hack/update-generated-protobuf-dockerized.sh +++ b/hack/update-generated-protobuf-dockerized.sh @@ -76,7 +76,6 @@ PACKAGES=( k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 k8s.io/api/storage/v1 - k8s.io/api/admissionregistration/v1alpha1 k8s.io/api/admissionregistration/v1beta1 k8s.io/api/admission/v1beta1 k8s.io/api/auditregistration/v1alpha1 diff --git a/pkg/apis/admissionregistration/BUILD b/pkg/apis/admissionregistration/BUILD index d227c45a64..ea2601a239 100644 --- a/pkg/apis/admissionregistration/BUILD +++ b/pkg/apis/admissionregistration/BUILD @@ -34,7 +34,6 @@ filegroup( ":package-srcs", "//pkg/apis/admissionregistration/fuzzer:all-srcs", "//pkg/apis/admissionregistration/install:all-srcs", - "//pkg/apis/admissionregistration/v1alpha1:all-srcs", "//pkg/apis/admissionregistration/v1beta1:all-srcs", "//pkg/apis/admissionregistration/validation:all-srcs", ], diff --git a/pkg/apis/admissionregistration/doc.go b/pkg/apis/admissionregistration/doc.go index 8c2f04230a..a81502498b 100644 --- a/pkg/apis/admissionregistration/doc.go +++ b/pkg/apis/admissionregistration/doc.go @@ -19,6 +19,6 @@ limitations under the License. // Package admissionregistration is the internal version of the API. // AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration -// InitializerConfiguration, ValidatingWebhookConfiguration, and MutatingWebhookConfiguration are for the +// ValidatingWebhookConfiguration, and MutatingWebhookConfiguration are for the // new dynamic admission controller configuration. package admissionregistration // import "k8s.io/kubernetes/pkg/apis/admissionregistration" diff --git a/pkg/apis/admissionregistration/install/BUILD b/pkg/apis/admissionregistration/install/BUILD index cbe1b9da56..a0a5899a1b 100644 --- a/pkg/apis/admissionregistration/install/BUILD +++ b/pkg/apis/admissionregistration/install/BUILD @@ -12,7 +12,6 @@ go_library( deps = [ "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/admissionregistration:go_default_library", - "//pkg/apis/admissionregistration/v1alpha1:go_default_library", "//pkg/apis/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", diff --git a/pkg/apis/admissionregistration/install/install.go b/pkg/apis/admissionregistration/install/install.go index 65a38b2fb3..e36aa7ea02 100644 --- a/pkg/apis/admissionregistration/install/install.go +++ b/pkg/apis/admissionregistration/install/install.go @@ -21,7 +21,6 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/admissionregistration" - "k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1" "k8s.io/kubernetes/pkg/apis/admissionregistration/v1beta1" ) @@ -32,7 +31,6 @@ func init() { // Install registers the API group and adds types to a scheme func Install(scheme *runtime.Scheme) { utilruntime.Must(admissionregistration.AddToScheme(scheme)) - utilruntime.Must(v1alpha1.AddToScheme(scheme)) utilruntime.Must(v1beta1.AddToScheme(scheme)) - utilruntime.Must(scheme.SetVersionPriority(v1beta1.SchemeGroupVersion, v1alpha1.SchemeGroupVersion)) + utilruntime.Must(scheme.SetVersionPriority(v1beta1.SchemeGroupVersion)) } diff --git a/pkg/apis/admissionregistration/register.go b/pkg/apis/admissionregistration/register.go index 941259ce62..861a45653a 100644 --- a/pkg/apis/admissionregistration/register.go +++ b/pkg/apis/admissionregistration/register.go @@ -44,8 +44,6 @@ var ( // Adds the list of known types to scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &InitializerConfiguration{}, - &InitializerConfigurationList{}, &ValidatingWebhookConfiguration{}, &ValidatingWebhookConfigurationList{}, &MutatingWebhookConfiguration{}, diff --git a/pkg/apis/admissionregistration/types.go b/pkg/apis/admissionregistration/types.go index e8880c49c6..9d4eb3813c 100644 --- a/pkg/apis/admissionregistration/types.go +++ b/pkg/apis/admissionregistration/types.go @@ -20,58 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// InitializerConfiguration describes the configuration of initializers. -type InitializerConfiguration struct { - metav1.TypeMeta - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - // +optional - metav1.ObjectMeta - - // Initializers is a list of resources and their default initializers - // Order-sensitive. - // When merging multiple InitializerConfigurations, we sort the initializers - // from different InitializerConfigurations by the name of the - // InitializerConfigurations; the order of the initializers from the same - // InitializerConfiguration is preserved. - // +optional - Initializers []Initializer -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// InitializerConfigurationList is a list of InitializerConfiguration. -type InitializerConfigurationList struct { - metav1.TypeMeta - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - metav1.ListMeta - - // List of InitializerConfiguration. - Items []InitializerConfiguration -} - -// Initializer describes the name and the failure policy of an initializer, and -// what resources it applies to. -type Initializer struct { - // 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 - Name string - - // Rules describes what resources/subresources the initializer cares about. - // The initializer cares about an operation if it matches _any_ Rule. - // Rule.Resources must not include subresources. - Rules []Rule -} - // 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 { diff --git a/pkg/apis/admissionregistration/v1alpha1/BUILD b/pkg/apis/admissionregistration/v1alpha1/BUILD deleted file mode 100644 index d0aef41ab9..0000000000 --- a/pkg/apis/admissionregistration/v1alpha1/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "defaults.go", - "doc.go", - "register.go", - "zz_generated.conversion.go", - "zz_generated.defaults.go", - ], - importpath = "k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1", - deps = [ - "//pkg/apis/admissionregistration:go_default_library", - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/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"], -) diff --git a/pkg/apis/admissionregistration/v1alpha1/defaults.go b/pkg/apis/admissionregistration/v1alpha1/defaults.go deleted file mode 100644 index 8949bb87cd..0000000000 --- a/pkg/apis/admissionregistration/v1alpha1/defaults.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -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 v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} diff --git a/pkg/apis/admissionregistration/v1alpha1/doc.go b/pkg/apis/admissionregistration/v1alpha1/doc.go deleted file mode 100644 index 833526f715..0000000000 --- a/pkg/apis/admissionregistration/v1alpha1/doc.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -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:conversion-gen=k8s.io/kubernetes/pkg/apis/admissionregistration -// +k8s:conversion-gen-external-types=k8s.io/api/admissionregistration/v1alpha1 -// +k8s:defaulter-gen=TypeMeta -// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/admissionregistration/v1alpha1 -// +groupName=admissionregistration.k8s.io - -// Package v1alpha1 is the v1alpha1 version of the API. -// AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration -// InitializerConfiguration, ValidatingWebhookConfiguration, and MutatingWebhookConfiguration are for the -// new dynamic admission controller configuration. -package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1" diff --git a/pkg/apis/admissionregistration/v1alpha1/register.go b/pkg/apis/admissionregistration/v1alpha1/register.go deleted file mode 100644 index f66c796afa..0000000000 --- a/pkg/apis/admissionregistration/v1alpha1/register.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -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 v1alpha1 - -import ( - admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" - "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: "v1alpha1"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - localSchemeBuilder = &admissionregistrationv1alpha1.SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addDefaultingFuncs) -} diff --git a/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go b/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index 3eb891669d..0000000000 --- a/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,170 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - unsafe "unsafe" - - v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*v1alpha1.Initializer)(nil), (*admissionregistration.Initializer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_Initializer_To_admissionregistration_Initializer(a.(*v1alpha1.Initializer), b.(*admissionregistration.Initializer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*admissionregistration.Initializer)(nil), (*v1alpha1.Initializer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_admissionregistration_Initializer_To_v1alpha1_Initializer(a.(*admissionregistration.Initializer), b.(*v1alpha1.Initializer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.InitializerConfiguration)(nil), (*admissionregistration.InitializerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration(a.(*v1alpha1.InitializerConfiguration), b.(*admissionregistration.InitializerConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*admissionregistration.InitializerConfiguration)(nil), (*v1alpha1.InitializerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration(a.(*admissionregistration.InitializerConfiguration), b.(*v1alpha1.InitializerConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.InitializerConfigurationList)(nil), (*admissionregistration.InitializerConfigurationList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList(a.(*v1alpha1.InitializerConfigurationList), b.(*admissionregistration.InitializerConfigurationList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*admissionregistration.InitializerConfigurationList)(nil), (*v1alpha1.InitializerConfigurationList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList(a.(*admissionregistration.InitializerConfigurationList), b.(*v1alpha1.InitializerConfigurationList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.Rule)(nil), (*admissionregistration.Rule)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_Rule_To_admissionregistration_Rule(a.(*v1alpha1.Rule), b.(*admissionregistration.Rule), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*admissionregistration.Rule)(nil), (*v1alpha1.Rule)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_admissionregistration_Rule_To_v1alpha1_Rule(a.(*admissionregistration.Rule), b.(*v1alpha1.Rule), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_Initializer_To_admissionregistration_Initializer(in *v1alpha1.Initializer, out *admissionregistration.Initializer, s conversion.Scope) error { - out.Name = in.Name - out.Rules = *(*[]admissionregistration.Rule)(unsafe.Pointer(&in.Rules)) - return nil -} - -// Convert_v1alpha1_Initializer_To_admissionregistration_Initializer is an autogenerated conversion function. -func Convert_v1alpha1_Initializer_To_admissionregistration_Initializer(in *v1alpha1.Initializer, out *admissionregistration.Initializer, s conversion.Scope) error { - return autoConvert_v1alpha1_Initializer_To_admissionregistration_Initializer(in, out, s) -} - -func autoConvert_admissionregistration_Initializer_To_v1alpha1_Initializer(in *admissionregistration.Initializer, out *v1alpha1.Initializer, s conversion.Scope) error { - out.Name = in.Name - out.Rules = *(*[]v1alpha1.Rule)(unsafe.Pointer(&in.Rules)) - return nil -} - -// Convert_admissionregistration_Initializer_To_v1alpha1_Initializer is an autogenerated conversion function. -func Convert_admissionregistration_Initializer_To_v1alpha1_Initializer(in *admissionregistration.Initializer, out *v1alpha1.Initializer, s conversion.Scope) error { - return autoConvert_admissionregistration_Initializer_To_v1alpha1_Initializer(in, out, s) -} - -func autoConvert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration(in *v1alpha1.InitializerConfiguration, out *admissionregistration.InitializerConfiguration, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.Initializers = *(*[]admissionregistration.Initializer)(unsafe.Pointer(&in.Initializers)) - return nil -} - -// Convert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration is an autogenerated conversion function. -func Convert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration(in *v1alpha1.InitializerConfiguration, out *admissionregistration.InitializerConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration(in, out, s) -} - -func autoConvert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration(in *admissionregistration.InitializerConfiguration, out *v1alpha1.InitializerConfiguration, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.Initializers = *(*[]v1alpha1.Initializer)(unsafe.Pointer(&in.Initializers)) - return nil -} - -// Convert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration is an autogenerated conversion function. -func Convert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration(in *admissionregistration.InitializerConfiguration, out *v1alpha1.InitializerConfiguration, s conversion.Scope) error { - return autoConvert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration(in, out, s) -} - -func autoConvert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList(in *v1alpha1.InitializerConfigurationList, out *admissionregistration.InitializerConfigurationList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]admissionregistration.InitializerConfiguration)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList is an autogenerated conversion function. -func Convert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList(in *v1alpha1.InitializerConfigurationList, out *admissionregistration.InitializerConfigurationList, s conversion.Scope) error { - return autoConvert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList(in, out, s) -} - -func autoConvert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList(in *admissionregistration.InitializerConfigurationList, out *v1alpha1.InitializerConfigurationList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha1.InitializerConfiguration)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList is an autogenerated conversion function. -func Convert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList(in *admissionregistration.InitializerConfigurationList, out *v1alpha1.InitializerConfigurationList, s conversion.Scope) error { - return autoConvert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList(in, out, s) -} - -func autoConvert_v1alpha1_Rule_To_admissionregistration_Rule(in *v1alpha1.Rule, out *admissionregistration.Rule, s conversion.Scope) error { - out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) - out.APIVersions = *(*[]string)(unsafe.Pointer(&in.APIVersions)) - out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) - return nil -} - -// Convert_v1alpha1_Rule_To_admissionregistration_Rule is an autogenerated conversion function. -func Convert_v1alpha1_Rule_To_admissionregistration_Rule(in *v1alpha1.Rule, out *admissionregistration.Rule, s conversion.Scope) error { - return autoConvert_v1alpha1_Rule_To_admissionregistration_Rule(in, out, s) -} - -func autoConvert_admissionregistration_Rule_To_v1alpha1_Rule(in *admissionregistration.Rule, out *v1alpha1.Rule, s conversion.Scope) error { - out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) - out.APIVersions = *(*[]string)(unsafe.Pointer(&in.APIVersions)) - out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) - return nil -} - -// Convert_admissionregistration_Rule_To_v1alpha1_Rule is an autogenerated conversion function. -func Convert_admissionregistration_Rule_To_v1alpha1_Rule(in *admissionregistration.Rule, out *v1alpha1.Rule, s conversion.Scope) error { - return autoConvert_admissionregistration_Rule_To_v1alpha1_Rule(in, out, s) -} diff --git a/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go b/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go deleted file mode 100644 index dd621a3acd..0000000000 --- a/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go +++ /dev/null @@ -1,32 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by defaulter-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/pkg/apis/admissionregistration/v1beta1/doc.go b/pkg/apis/admissionregistration/v1beta1/doc.go index 873110d12d..df5d2c03b5 100644 --- a/pkg/apis/admissionregistration/v1beta1/doc.go +++ b/pkg/apis/admissionregistration/v1beta1/doc.go @@ -22,6 +22,6 @@ limitations under the License. // Package v1beta1 is the v1beta1 version of the API. // AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration -// InitializerConfiguration, ValidatingWebhookConfiguration, and MutatingWebhookConfiguration are for the +// ValidatingWebhookConfiguration, and MutatingWebhookConfiguration are for the // new dynamic admission controller configuration. package v1beta1 // import "k8s.io/kubernetes/pkg/apis/admissionregistration/v1beta1" diff --git a/pkg/apis/admissionregistration/validation/validation.go b/pkg/apis/admissionregistration/validation/validation.go index 4f0fe60b2f..fcba295cac 100644 --- a/pkg/apis/admissionregistration/validation/validation.go +++ b/pkg/apis/admissionregistration/validation/validation.go @@ -29,26 +29,6 @@ import ( "k8s.io/kubernetes/pkg/apis/admissionregistration" ) -func ValidateInitializerConfiguration(ic *admissionregistration.InitializerConfiguration) field.ErrorList { - allErrors := genericvalidation.ValidateObjectMeta(&ic.ObjectMeta, false, genericvalidation.NameIsDNSSubdomain, field.NewPath("metadata")) - for i, initializer := range ic.Initializers { - allErrors = append(allErrors, validateInitializer(&initializer, field.NewPath("initializers").Index(i))...) - } - return allErrors -} - -func validateInitializer(initializer *admissionregistration.Initializer, fldPath *field.Path) field.ErrorList { - var allErrors field.ErrorList - // initlializer.Name must be fully qualified - allErrors = append(allErrors, validation.IsFullyQualifiedName(fldPath.Child("name"), initializer.Name)...) - - for i, rule := range initializer.Rules { - notAllowSubresources := false - allErrors = append(allErrors, validateRule(&rule, fldPath.Child("rules").Index(i), notAllowSubresources)...) - } - return allErrors -} - func hasWildcard(slice []string) bool { for _, s := range slice { if s == "*" { @@ -161,10 +141,6 @@ func validateRule(rule *admissionregistration.Rule, fldPath *field.Path, allowSu return allErrors } -func ValidateInitializerConfigurationUpdate(newIC, oldIC *admissionregistration.InitializerConfiguration) field.ErrorList { - return ValidateInitializerConfiguration(newIC) -} - func ValidateValidatingWebhookConfiguration(e *admissionregistration.ValidatingWebhookConfiguration) field.ErrorList { allErrors := genericvalidation.ValidateObjectMeta(&e.ObjectMeta, false, genericvalidation.NameIsDNSSubdomain, field.NewPath("metadata")) for i, hook := range e.Webhooks { diff --git a/pkg/apis/admissionregistration/validation/validation_test.go b/pkg/apis/admissionregistration/validation/validation_test.go index 6eaa1804a6..9a51b6631b 100644 --- a/pkg/apis/admissionregistration/validation/validation_test.go +++ b/pkg/apis/admissionregistration/validation/validation_test.go @@ -24,213 +24,6 @@ import ( "k8s.io/kubernetes/pkg/apis/admissionregistration" ) -func getInitializerConfiguration(initializers []admissionregistration.Initializer) *admissionregistration.InitializerConfiguration { - return &admissionregistration.InitializerConfiguration{ - ObjectMeta: metav1.ObjectMeta{ - Name: "config", - }, - Initializers: initializers, - } -} - -func TestValidateInitializerConfiguration(t *testing.T) { - tests := []struct { - name string - config *admissionregistration.InitializerConfiguration - expectedError string - }{ - { - name: "0 rule is valid", - config: getInitializerConfiguration( - []admissionregistration.Initializer{ - { - Name: "initializer.k8s.io", - }, - }), - }, - { - name: "all initializers must have a fully qualified name", - config: getInitializerConfiguration( - []admissionregistration.Initializer{ - { - Name: "initializer.k8s.io", - }, - { - Name: "k8s.io", - }, - { - Name: "", - }, - }), - expectedError: `initializers[1].name: Invalid value: "k8s.io": should be a domain with at least three segments separated by dots, initializers[2].name: Required value`, - }, - { - name: "APIGroups must not be empty or nil", - config: getInitializerConfiguration( - []admissionregistration.Initializer{ - { - Name: "initializer.k8s.io", - Rules: []admissionregistration.Rule{ - { - APIGroups: []string{}, - APIVersions: []string{"a"}, - Resources: []string{"a"}, - }, - { - APIGroups: nil, - APIVersions: []string{"a"}, - Resources: []string{"a"}, - }, - }, - }, - }), - expectedError: `initializers[0].rules[0].apiGroups: Required value, initializers[0].rules[1].apiGroups: Required value`, - }, - { - name: "APIVersions must not be empty or nil", - config: getInitializerConfiguration( - []admissionregistration.Initializer{ - { - Name: "initializer.k8s.io", - Rules: []admissionregistration.Rule{ - { - APIGroups: []string{"a"}, - APIVersions: []string{}, - Resources: []string{"a"}, - }, - { - APIGroups: []string{"a"}, - APIVersions: nil, - Resources: []string{"a"}, - }, - }, - }, - }), - expectedError: `initializers[0].rules[0].apiVersions: Required value, initializers[0].rules[1].apiVersions: Required value`, - }, - { - name: "Resources must not be empty or nil", - config: getInitializerConfiguration( - []admissionregistration.Initializer{ - { - Name: "initializer.k8s.io", - Rules: []admissionregistration.Rule{ - { - APIGroups: []string{"a"}, - APIVersions: []string{"a"}, - Resources: []string{}, - }, - { - APIGroups: []string{"a"}, - APIVersions: []string{"a"}, - Resources: nil, - }, - }, - }, - }), - expectedError: `initializers[0].rules[0].resources: Required value, initializers[0].rules[1].resources: Required value`, - }, - { - name: "\"\" is a valid APIGroup", - config: getInitializerConfiguration( - []admissionregistration.Initializer{ - { - Name: "initializer.k8s.io", - Rules: []admissionregistration.Rule{ - { - APIGroups: []string{"a", ""}, - APIVersions: []string{"a"}, - Resources: []string{"a"}, - }, - }, - }, - }), - }, - { - name: "\"\" is NOT a valid APIVersion", - config: getInitializerConfiguration( - []admissionregistration.Initializer{ - { - Name: "initializer.k8s.io", - Rules: []admissionregistration.Rule{ - { - APIGroups: []string{"a"}, - APIVersions: []string{"a", ""}, - Resources: []string{"a"}, - }, - }, - }, - }), - expectedError: "apiVersions[1]: Required value", - }, - { - name: "\"\" is NOT a valid Resource", - config: getInitializerConfiguration( - []admissionregistration.Initializer{ - { - Name: "initializer.k8s.io", - Rules: []admissionregistration.Rule{ - { - APIGroups: []string{"a"}, - APIVersions: []string{"a"}, - Resources: []string{"a", ""}, - }, - }, - }, - }), - expectedError: "resources[1]: Required value", - }, - { - name: "wildcard cannot be mixed with other strings for APIGroups or APIVersions or Resources", - config: getInitializerConfiguration( - []admissionregistration.Initializer{ - { - Name: "initializer.k8s.io", - Rules: []admissionregistration.Rule{ - { - APIGroups: []string{"a", "*"}, - APIVersions: []string{"a", "*"}, - Resources: []string{"a", "*"}, - }, - }, - }, - }), - expectedError: `[initializers[0].rules[0].apiGroups: Invalid value: []string{"a", "*"}: if '*' is present, must not specify other API groups, initializers[0].rules[0].apiVersions: Invalid value: []string{"a", "*"}: if '*' is present, must not specify other API versions, initializers[0].rules[0].resources: Invalid value: []string{"a", "*"}: if '*' is present, must not specify other resources]`, - }, - { - name: "Subresource not allowed", - config: getInitializerConfiguration( - []admissionregistration.Initializer{ - { - Name: "initializer.k8s.io", - Rules: []admissionregistration.Rule{ - { - APIGroups: []string{"a"}, - APIVersions: []string{"a"}, - Resources: []string{"a/b"}, - }, - }, - }, - }), - expectedError: ` "a/b": must not specify subresources`, - }, - } - - for _, test := range tests { - errs := ValidateInitializerConfiguration(test.config) - err := errs.ToAggregate() - if err != nil { - if e, a := test.expectedError, err.Error(); !strings.Contains(a, e) || e == "" { - t.Errorf("test case %s, expected to contain %s, got %s", test.name, e, a) - } - } else { - if test.expectedError != "" { - t.Errorf("test case %s, unexpected no error, expected to contain %s", test.name, test.expectedError) - } - } - } -} - func strPtr(s string) *string { return &s } func newValidatingWebhookConfiguration(hooks []admissionregistration.Webhook) *admissionregistration.ValidatingWebhookConfiguration { diff --git a/pkg/apis/admissionregistration/zz_generated.deepcopy.go b/pkg/apis/admissionregistration/zz_generated.deepcopy.go index 4d86d15899..e5d2a43667 100644 --- a/pkg/apis/admissionregistration/zz_generated.deepcopy.go +++ b/pkg/apis/admissionregistration/zz_generated.deepcopy.go @@ -25,95 +25,6 @@ import ( 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 *Initializer) DeepCopyInto(out *Initializer) { - *out = *in - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]Rule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Initializer. -func (in *Initializer) DeepCopy() *Initializer { - if in == nil { - return nil - } - out := new(Initializer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InitializerConfiguration) DeepCopyInto(out *InitializerConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Initializers != nil { - in, out := &in.Initializers, &out.Initializers - *out = make([]Initializer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitializerConfiguration. -func (in *InitializerConfiguration) DeepCopy() *InitializerConfiguration { - if in == nil { - return nil - } - out := new(InitializerConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *InitializerConfiguration) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InitializerConfigurationList) DeepCopyInto(out *InitializerConfigurationList) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]InitializerConfiguration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitializerConfigurationList. -func (in *InitializerConfigurationList) DeepCopy() *InitializerConfigurationList { - if in == nil { - return nil - } - out := new(InitializerConfigurationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *InitializerConfigurationList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // 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 diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/BUILD index f52baa4f64..3943a53c91 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/BUILD @@ -11,7 +11,6 @@ go_library( "admissionregistration_client.go", "doc.go", "generated_expansion.go", - "initializerconfiguration.go", "mutatingwebhookconfiguration.go", "validatingwebhookconfiguration.go", ], diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/admissionregistration_client.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/admissionregistration_client.go index 9ecefad4c9..db4bc4f46c 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/admissionregistration_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/admissionregistration_client.go @@ -25,7 +25,6 @@ import ( type AdmissionregistrationInterface interface { RESTClient() rest.Interface - InitializerConfigurationsGetter MutatingWebhookConfigurationsGetter ValidatingWebhookConfigurationsGetter } @@ -35,10 +34,6 @@ type AdmissionregistrationClient struct { restClient rest.Interface } -func (c *AdmissionregistrationClient) InitializerConfigurations() InitializerConfigurationInterface { - return newInitializerConfigurations(c) -} - func (c *AdmissionregistrationClient) MutatingWebhookConfigurations() MutatingWebhookConfigurationInterface { return newMutatingWebhookConfigurations(c) } diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/BUILD index 05e51c51f9..398ae535df 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/BUILD @@ -10,7 +10,6 @@ go_library( srcs = [ "doc.go", "fake_admissionregistration_client.go", - "fake_initializerconfiguration.go", "fake_mutatingwebhookconfiguration.go", "fake_validatingwebhookconfiguration.go", ], diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_admissionregistration_client.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_admissionregistration_client.go index e4ae5c20af..620e25d932 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_admissionregistration_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_admissionregistration_client.go @@ -28,10 +28,6 @@ type FakeAdmissionregistration struct { *testing.Fake } -func (c *FakeAdmissionregistration) InitializerConfigurations() internalversion.InitializerConfigurationInterface { - return &FakeInitializerConfigurations{c} -} - func (c *FakeAdmissionregistration) MutatingWebhookConfigurations() internalversion.MutatingWebhookConfigurationInterface { return &FakeMutatingWebhookConfigurations{c} } diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_initializerconfiguration.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_initializerconfiguration.go deleted file mode 100644 index 0199ec0d90..0000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_initializerconfiguration.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" -) - -// FakeInitializerConfigurations implements InitializerConfigurationInterface -type FakeInitializerConfigurations struct { - Fake *FakeAdmissionregistration -} - -var initializerconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "", Resource: "initializerconfigurations"} - -var initializerconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "", Kind: "InitializerConfiguration"} - -// Get takes name of the initializerConfiguration, and returns the corresponding initializerConfiguration object, and an error if there is any. -func (c *FakeInitializerConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistration.InitializerConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(initializerconfigurationsResource, name), &admissionregistration.InitializerConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.InitializerConfiguration), err -} - -// List takes label and field selectors, and returns the list of InitializerConfigurations that match those selectors. -func (c *FakeInitializerConfigurations) List(opts v1.ListOptions) (result *admissionregistration.InitializerConfigurationList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(initializerconfigurationsResource, initializerconfigurationsKind, opts), &admissionregistration.InitializerConfigurationList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &admissionregistration.InitializerConfigurationList{ListMeta: obj.(*admissionregistration.InitializerConfigurationList).ListMeta} - for _, item := range obj.(*admissionregistration.InitializerConfigurationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested initializerConfigurations. -func (c *FakeInitializerConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(initializerconfigurationsResource, opts)) -} - -// Create takes the representation of a initializerConfiguration and creates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any. -func (c *FakeInitializerConfigurations) Create(initializerConfiguration *admissionregistration.InitializerConfiguration) (result *admissionregistration.InitializerConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(initializerconfigurationsResource, initializerConfiguration), &admissionregistration.InitializerConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.InitializerConfiguration), err -} - -// Update takes the representation of a initializerConfiguration and updates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any. -func (c *FakeInitializerConfigurations) Update(initializerConfiguration *admissionregistration.InitializerConfiguration) (result *admissionregistration.InitializerConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(initializerconfigurationsResource, initializerConfiguration), &admissionregistration.InitializerConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.InitializerConfiguration), err -} - -// Delete takes name of the initializerConfiguration and deletes it. Returns an error if one occurs. -func (c *FakeInitializerConfigurations) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(initializerconfigurationsResource, name), &admissionregistration.InitializerConfiguration{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeInitializerConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(initializerconfigurationsResource, listOptions) - - _, err := c.Fake.Invokes(action, &admissionregistration.InitializerConfigurationList{}) - return err -} - -// Patch applies the patch and returns the patched initializerConfiguration. -func (c *FakeInitializerConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.InitializerConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(initializerconfigurationsResource, name, pt, data, subresources...), &admissionregistration.InitializerConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.InitializerConfiguration), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/generated_expansion.go index 4cc8f66b77..f27ec5c64c 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/generated_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/generated_expansion.go @@ -18,8 +18,6 @@ limitations under the License. package internalversion -type InitializerConfigurationExpansion interface{} - type MutatingWebhookConfigurationExpansion interface{} type ValidatingWebhookConfigurationExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/initializerconfiguration.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/initializerconfiguration.go deleted file mode 100644 index 3cae439c4a..0000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/initializerconfiguration.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// InitializerConfigurationsGetter has a method to return a InitializerConfigurationInterface. -// A group's client should implement this interface. -type InitializerConfigurationsGetter interface { - InitializerConfigurations() InitializerConfigurationInterface -} - -// InitializerConfigurationInterface has methods to work with InitializerConfiguration resources. -type InitializerConfigurationInterface interface { - Create(*admissionregistration.InitializerConfiguration) (*admissionregistration.InitializerConfiguration, error) - Update(*admissionregistration.InitializerConfiguration) (*admissionregistration.InitializerConfiguration, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*admissionregistration.InitializerConfiguration, error) - List(opts v1.ListOptions) (*admissionregistration.InitializerConfigurationList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.InitializerConfiguration, err error) - InitializerConfigurationExpansion -} - -// initializerConfigurations implements InitializerConfigurationInterface -type initializerConfigurations struct { - client rest.Interface -} - -// newInitializerConfigurations returns a InitializerConfigurations -func newInitializerConfigurations(c *AdmissionregistrationClient) *initializerConfigurations { - return &initializerConfigurations{ - client: c.RESTClient(), - } -} - -// Get takes name of the initializerConfiguration, and returns the corresponding initializerConfiguration object, and an error if there is any. -func (c *initializerConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistration.InitializerConfiguration, err error) { - result = &admissionregistration.InitializerConfiguration{} - err = c.client.Get(). - Resource("initializerconfigurations"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of InitializerConfigurations that match those selectors. -func (c *initializerConfigurations) List(opts v1.ListOptions) (result *admissionregistration.InitializerConfigurationList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &admissionregistration.InitializerConfigurationList{} - err = c.client.Get(). - Resource("initializerconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested initializerConfigurations. -func (c *initializerConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("initializerconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a initializerConfiguration and creates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any. -func (c *initializerConfigurations) Create(initializerConfiguration *admissionregistration.InitializerConfiguration) (result *admissionregistration.InitializerConfiguration, err error) { - result = &admissionregistration.InitializerConfiguration{} - err = c.client.Post(). - Resource("initializerconfigurations"). - Body(initializerConfiguration). - Do(). - Into(result) - return -} - -// Update takes the representation of a initializerConfiguration and updates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any. -func (c *initializerConfigurations) Update(initializerConfiguration *admissionregistration.InitializerConfiguration) (result *admissionregistration.InitializerConfiguration, err error) { - result = &admissionregistration.InitializerConfiguration{} - err = c.client.Put(). - Resource("initializerconfigurations"). - Name(initializerConfiguration.Name). - Body(initializerConfiguration). - Do(). - Into(result) - return -} - -// Delete takes name of the initializerConfiguration and deletes it. Returns an error if one occurs. -func (c *initializerConfigurations) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("initializerconfigurations"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *initializerConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("initializerconfigurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched initializerConfiguration. -func (c *initializerConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.InitializerConfiguration, err error) { - result = &admissionregistration.InitializerConfiguration{} - err = c.client.Patch(pt). - Resource("initializerconfigurations"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/controller/.import-restrictions b/pkg/controller/.import-restrictions index db246c010a..96eeb2aeef 100644 --- a/pkg/controller/.import-restrictions +++ b/pkg/controller/.import-restrictions @@ -80,14 +80,12 @@ "k8s.io/apiserver/pkg/storage", "k8s.io/api/batch/v2alpha1", "k8s.io/apiserver/pkg/registry/rest", - "k8s.io/apimachinery/pkg/util/initialization", "k8s.io/api/scheduling/v1alpha1", "k8s.io/api/admissionregistration/v1beta1", "k8s.io/api/authorization/v1", "k8s.io/api/settings/v1alpha1", "k8s.io/api/admission/v1beta1", "k8s.io/api/networking/v1", - "k8s.io/api/admissionregistration/v1alpha1", "k8s.io/component-base/config", "k8s.io/component-base/config/v1alpha1" ] @@ -314,7 +312,6 @@ "k8s.io/kubernetes/pkg/util/net/sets", "k8s.io/kubernetes/pkg/util/parsers", "k8s.io/kubernetes/pkg/fieldpath", - "k8s.io/kubernetes/pkg/kubeapiserver/admission/util", "k8s.io/kubernetes/pkg/scheduler/volumebinder", "k8s.io/kubernetes/pkg/scheduler/internal/cache", "k8s.io/kubernetes/pkg/util/nsenter", diff --git a/pkg/controller/cloud/pvlcontroller.go b/pkg/controller/cloud/pvlcontroller.go index d33d98f3a7..4f05a7a81f 100644 --- a/pkg/controller/cloud/pvlcontroller.go +++ b/pkg/controller/cloud/pvlcontroller.go @@ -44,8 +44,6 @@ import ( volumeutil "k8s.io/kubernetes/pkg/volume/util" ) -const initializerName = "pvlabel.kubernetes.io" - // PersistentVolumeLabelController handles adding labels to persistent volumes when they are created type PersistentVolumeLabelController struct { cloud cloudprovider.Interface @@ -74,11 +72,9 @@ func NewPersistentVolumeLabelController( pvlc.pvlIndexer, pvlc.pvlController = cache.NewIndexerInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - options.IncludeUninitialized = true return kubeClient.CoreV1().PersistentVolumes().List(options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - options.IncludeUninitialized = true return kubeClient.CoreV1().PersistentVolumes().Watch(options) }, }, @@ -184,7 +180,7 @@ func (pvlc *PersistentVolumeLabelController) addLabelsAndAffinity(key string) er func (pvlc *PersistentVolumeLabelController) addLabelsAndAffinityToVolume(vol *v1.PersistentVolume) error { var volumeLabels map[string]string // Only add labels if the next pending initializer. - if needsInitialization(vol.Initializers, initializerName) { + if needsInitialization(vol) { if labeler, ok := (pvlc.cloud).(cloudprovider.PVLabeler); ok { labels, err := labeler.GetLabelsForVolume(context.TODO(), vol) if err != nil { @@ -249,8 +245,8 @@ func (pvlc *PersistentVolumeLabelController) createPatch(vol *v1.PersistentVolum } } } - newVolume.Initializers = removeInitializer(newVolume.Initializers, initializerName) - klog.V(4).Infof("removed initializer on PersistentVolume %s", newVolume.Name) + markInitialized(newVolume) + klog.V(4).Infof("marked PersistentVolume %s initialized", newVolume.Name) oldData, err := json.Marshal(vol) if err != nil { @@ -286,38 +282,13 @@ func (pvlc *PersistentVolumeLabelController) updateVolume(vol *v1.PersistentVolu return nil } -func removeInitializer(initializers *metav1.Initializers, name string) *metav1.Initializers { - if initializers == nil { - return nil - } - - var updated []metav1.Initializer - for _, pending := range initializers.Pending { - if pending.Name != name { - updated = append(updated, pending) - } - } - if len(updated) == len(initializers.Pending) { - return initializers - } - if len(updated) == 0 { - return nil - } - - return &metav1.Initializers{Pending: updated} +func markInitialized(vol *v1.PersistentVolume) { + // TODO: mark initialized using a different field, since initializers are not being promoted past alpha, or convert to an admission plugin } // needsInitialization checks whether or not the PVL is the next pending initializer. -func needsInitialization(initializers *metav1.Initializers, name string) bool { - if initializers == nil { - return false - } - - if len(initializers.Pending) == 0 { - return false - } - - // There is at least one initializer still pending so check to - // see if the PVL is the next in line. - return initializers.Pending[0].Name == name +func needsInitialization(vol *v1.PersistentVolume) bool { + // TODO: determine whether initialization is required based on a different attribute, + // since initializers are not being promoted past alpha, or convert to an admission plugin + return false } diff --git a/pkg/controller/cloud/pvlcontroller_test.go b/pkg/controller/cloud/pvlcontroller_test.go index 96d12421c4..83fd0a7de2 100644 --- a/pkg/controller/cloud/pvlcontroller_test.go +++ b/pkg/controller/cloud/pvlcontroller_test.go @@ -129,13 +129,6 @@ func TestCreatePatch(t *testing.T) { ignoredPV := v1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name: "noncloud", - Initializers: &metav1.Initializers{ - Pending: []metav1.Initializer{ - { - Name: initializerName, - }, - }, - }, }, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ @@ -148,13 +141,6 @@ func TestCreatePatch(t *testing.T) { awsPV := v1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name: "awsPV", - Initializers: &metav1.Initializers{ - Pending: []metav1.Initializer{ - { - Name: initializerName, - }, - }, - }, }, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ @@ -217,13 +203,6 @@ func TestCreatePatch(t *testing.T) { awsPVWithAffinity := v1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name: "awsPV", - Initializers: &metav1.Initializers{ - Pending: []metav1.Initializer{ - { - Name: initializerName, - }, - }, - }, }, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ @@ -458,9 +437,12 @@ func TestCreatePatch(t *testing.T) { } obj := &v1.PersistentVolume{} json.Unmarshal(patch, obj) - if obj.ObjectMeta.Initializers != nil { - t.Errorf("%s: initializer wasn't removed: %v", d, obj.ObjectMeta.Initializers) - } + + // TODO: check if object was marked as initialized + // if ... object was not marked as initialized ... { + // t.Errorf("%s: wasn't marked as initialized: %#v", d, obj) + // } + if tc.labels == nil { continue } @@ -491,29 +473,24 @@ func TestAddLabelsToVolume(t *testing.T) { testCases := map[string]struct { vol v1.PersistentVolume - initializers *metav1.Initializers shouldLabelAndSetAffinity bool }{ "PV without initializer": { vol: pv, - initializers: nil, - shouldLabelAndSetAffinity: false, - }, - "PV with initializer to remove": { - vol: pv, - initializers: &metav1.Initializers{Pending: []metav1.Initializer{{Name: initializerName}}}, - shouldLabelAndSetAffinity: true, - }, - "PV with other initializers only": { - vol: pv, - initializers: &metav1.Initializers{Pending: []metav1.Initializer{{Name: "OtherInit"}}}, - shouldLabelAndSetAffinity: false, - }, - "PV with other initializers first": { - vol: pv, - initializers: &metav1.Initializers{Pending: []metav1.Initializer{{Name: "OtherInit"}, {Name: initializerName}}}, shouldLabelAndSetAffinity: false, }, + // "PV with initializer to remove": { + // vol: pv, + // shouldLabelAndSetAffinity: true, + // }, + // "PV with other initializers only": { + // vol: pv, + // shouldLabelAndSetAffinity: false, + // }, + // "PV with other initializers first": { + // vol: pv, + // shouldLabelAndSetAffinity: false, + // }, } for d, tc := range testCases { @@ -550,7 +527,6 @@ func TestAddLabelsToVolume(t *testing.T) { VolumeLabelMap: map[string]map[string]string{"awsPV": {"a": "1"}}, } pvlController := &PersistentVolumeLabelController{kubeClient: client, cloud: fakeCloud} - tc.vol.ObjectMeta.Initializers = tc.initializers pvlController.addLabelsAndAffinityToVolume(&tc.vol) select { diff --git a/pkg/controller/namespace/deletion/namespaced_resources_deleter.go b/pkg/controller/namespace/deletion/namespaced_resources_deleter.go index 7564fb2b5e..379a8219cb 100644 --- a/pkg/controller/namespace/deletion/namespaced_resources_deleter.go +++ b/pkg/controller/namespace/deletion/namespaced_resources_deleter.go @@ -378,7 +378,7 @@ func (d *namespacedResourcesDeleter) listCollection(gvr schema.GroupVersionResou return nil, false, nil } - unstructuredList, err := d.dynamicClient.Resource(gvr).Namespace(namespace).List(metav1.ListOptions{IncludeUninitialized: true}) + unstructuredList, err := d.dynamicClient.Resource(gvr).Namespace(namespace).List(metav1.ListOptions{}) if err == nil { return unstructuredList, true, nil } @@ -543,7 +543,7 @@ func (d *namespacedResourcesDeleter) estimateGracefulTerminationForPods(ns strin if podsGetter == nil || reflect.ValueOf(podsGetter).IsNil() { return estimate, fmt.Errorf("unexpected: podsGetter is nil. Cannot estimate grace period seconds for pods") } - items, err := podsGetter.Pods(ns).List(metav1.ListOptions{IncludeUninitialized: true}) + items, err := podsGetter.Pods(ns).List(metav1.ListOptions{}) if err != nil { return estimate, err } diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index f898b2217e..3cdd33aa62 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -485,7 +485,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS genericfeatures.AdvancedAuditing: {Default: true, PreRelease: utilfeature.GA}, genericfeatures.DynamicAuditing: {Default: false, PreRelease: utilfeature.Alpha}, genericfeatures.APIResponseCompression: {Default: false, PreRelease: utilfeature.Alpha}, - genericfeatures.Initializers: {Default: false, PreRelease: utilfeature.Alpha}, genericfeatures.APIListChunking: {Default: true, PreRelease: utilfeature.Beta}, genericfeatures.DryRun: {Default: true, PreRelease: utilfeature.Beta}, diff --git a/pkg/kubeapiserver/BUILD b/pkg/kubeapiserver/BUILD index ef4c4b1e22..6c557cd9b4 100644 --- a/pkg/kubeapiserver/BUILD +++ b/pkg/kubeapiserver/BUILD @@ -14,7 +14,6 @@ go_library( importpath = "k8s.io/kubernetes/pkg/kubeapiserver", deps = [ "//pkg/api/legacyscheme:go_default_library", - "//pkg/apis/admissionregistration:go_default_library", "//pkg/apis/apps:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/apis/core:go_default_library", diff --git a/pkg/kubeapiserver/admission/BUILD b/pkg/kubeapiserver/admission/BUILD index abe660e717..a0688a4e84 100644 --- a/pkg/kubeapiserver/admission/BUILD +++ b/pkg/kubeapiserver/admission/BUILD @@ -43,10 +43,7 @@ filegroup( filegroup( name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/kubeapiserver/admission/util:all-srcs", - ], + srcs = [":package-srcs"], tags = ["automanaged"], visibility = ["//visibility:public"], ) diff --git a/pkg/kubeapiserver/admission/util/BUILD b/pkg/kubeapiserver/admission/util/BUILD deleted file mode 100644 index 3d24fc3e0d..0000000000 --- a/pkg/kubeapiserver/admission/util/BUILD +++ /dev/null @@ -1,30 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["initializer.go"], - importpath = "k8s.io/kubernetes/pkg/kubeapiserver/admission/util", - deps = [ - "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/initialization:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/kubeapiserver/admission/util/initializer.go b/pkg/kubeapiserver/admission/util/initializer.go deleted file mode 100644 index d20ba439c5..0000000000 --- a/pkg/kubeapiserver/admission/util/initializer.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -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 util - -import ( - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/util/initialization" - "k8s.io/apiserver/pkg/admission" -) - -// IsUpdatingInitializedObject returns true if the operation is trying to update -// an already initialized object. -func IsUpdatingInitializedObject(a admission.Attributes) (bool, error) { - if a.GetOperation() != admission.Update { - return false, nil - } - oldObj := a.GetOldObject() - accessor, err := meta.Accessor(oldObj) - if err != nil { - return false, err - } - if initialization.IsInitialized(accessor.GetInitializers()) { - return true, nil - } - return false, nil -} - -// IsUpdatingUninitializedObject returns true if the operation is trying to -// update an object that is not initialized yet. -func IsUpdatingUninitializedObject(a admission.Attributes) (bool, error) { - if a.GetOperation() != admission.Update { - return false, nil - } - oldObj := a.GetOldObject() - accessor, err := meta.Accessor(oldObj) - if err != nil { - return false, err - } - if initialization.IsInitialized(accessor.GetInitializers()) { - return false, nil - } - return true, nil -} - -// IsInitializationCompletion returns true if the operation removes all pending -// initializers. -func IsInitializationCompletion(a admission.Attributes) (bool, error) { - if a.GetOperation() != admission.Update { - return false, nil - } - oldObj := a.GetOldObject() - oldInitialized, err := initialization.IsObjectInitialized(oldObj) - if err != nil { - return false, err - } - if oldInitialized { - return false, nil - } - newObj := a.GetObject() - newInitialized, err := initialization.IsObjectInitialized(newObj) - if err != nil { - return false, err - } - return newInitialized, nil -} diff --git a/pkg/kubeapiserver/default_storage_factory_builder.go b/pkg/kubeapiserver/default_storage_factory_builder.go index f1fbf03d35..3029924b75 100644 --- a/pkg/kubeapiserver/default_storage_factory_builder.go +++ b/pkg/kubeapiserver/default_storage_factory_builder.go @@ -20,6 +20,7 @@ import ( "strings" "fmt" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" serveroptions "k8s.io/apiserver/pkg/server/options" @@ -28,7 +29,6 @@ import ( serverstorage "k8s.io/apiserver/pkg/server/storage" "k8s.io/apiserver/pkg/storage/storagebackend" "k8s.io/kubernetes/pkg/api/legacyscheme" - "k8s.io/kubernetes/pkg/apis/admissionregistration" "k8s.io/kubernetes/pkg/apis/apps" "k8s.io/kubernetes/pkg/apis/batch" api "k8s.io/kubernetes/pkg/apis/core" @@ -58,7 +58,6 @@ func NewStorageFactoryConfig() *StorageFactoryConfig { ResourceEncodingOverrides: []schema.GroupVersionResource{ batch.Resource("cronjobs").WithVersion("v1beta1"), apisstorage.Resource("volumeattachments").WithVersion("v1beta1"), - admissionregistration.Resource("initializerconfigurations").WithVersion("v1alpha1"), }, } } diff --git a/pkg/kubeapiserver/options/BUILD b/pkg/kubeapiserver/options/BUILD index 9ee6eb989f..4b23dacf48 100644 --- a/pkg/kubeapiserver/options/BUILD +++ b/pkg/kubeapiserver/options/BUILD @@ -57,7 +57,6 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating:go_default_library", diff --git a/pkg/kubeapiserver/options/plugins.go b/pkg/kubeapiserver/options/plugins.go index abcb5b4673..92c48b4dc8 100644 --- a/pkg/kubeapiserver/options/plugins.go +++ b/pkg/kubeapiserver/options/plugins.go @@ -53,7 +53,6 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" - "k8s.io/apiserver/pkg/admission/plugin/initialization" "k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle" mutatingwebhook "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating" validatingwebhook "k8s.io/apiserver/pkg/admission/plugin/webhook/validating" @@ -90,7 +89,6 @@ var AllOrderedPlugins = []string{ gc.PluginName, // OwnerReferencesPermissionEnforcement resize.PluginName, // PersistentVolumeClaimResize mutatingwebhook.PluginName, // MutatingAdmissionWebhook - initialization.PluginName, // Initializers validatingwebhook.PluginName, // ValidatingAdmissionWebhook resourcequota.PluginName, // ResourceQuota deny.PluginName, // AlwaysDeny diff --git a/pkg/kubectl/.import-restrictions b/pkg/kubectl/.import-restrictions index 72be55c189..ab4626ce69 100644 --- a/pkg/kubectl/.import-restrictions +++ b/pkg/kubectl/.import-restrictions @@ -13,7 +13,6 @@ "k8s.io/kubernetes/pkg/api/v1/service", "k8s.io/kubernetes/pkg/apis/admissionregistration", "k8s.io/kubernetes/pkg/apis/admissionregistration/install", - "k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1", "k8s.io/kubernetes/pkg/apis/apps", "k8s.io/kubernetes/pkg/apis/apps/install", "k8s.io/kubernetes/pkg/apis/apps/v1", diff --git a/pkg/kubectl/cmd/annotate/annotate.go b/pkg/kubectl/cmd/annotate/annotate.go index dedc9e77ec..860cc10050 100644 --- a/pkg/kubectl/cmd/annotate/annotate.go +++ b/pkg/kubectl/cmd/annotate/annotate.go @@ -69,7 +69,6 @@ type AnnotateOptions struct { enforceNamespace bool builder *resource.Builder unstructuredClientForMapping func(mapping *meta.RESTMapping) (resource.RESTClient, error) - includeUninitialized bool genericclioptions.IOStreams } @@ -183,7 +182,6 @@ func (o *AnnotateOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args [ if err != nil { return err } - o.includeUninitialized = cmdutil.ShouldIncludeUninitialized(cmd, false) o.builder = f.NewBuilder() o.unstructuredClientForMapping = f.UnstructuredClientForMapping @@ -227,7 +225,6 @@ func (o AnnotateOptions) RunAnnotate() error { ContinueOnError(). NamespaceParam(o.namespace).DefaultNamespace(). FilenameParam(o.enforceNamespace, &o.FilenameOptions). - IncludeUninitialized(o.includeUninitialized). Flatten() if !o.local { diff --git a/pkg/kubectl/cmd/apply/apply.go b/pkg/kubectl/cmd/apply/apply.go index e01a668ab8..d6fce3354b 100644 --- a/pkg/kubectl/cmd/apply/apply.go +++ b/pkg/kubectl/cmd/apply/apply.go @@ -65,17 +65,16 @@ type ApplyOptions struct { DeleteFlags *delete.DeleteFlags DeleteOptions *delete.DeleteOptions - Selector string - DryRun bool - ServerDryRun bool - Prune bool - PruneResources []pruneResource - cmdBaseName string - All bool - Overwrite bool - OpenAPIPatch bool - PruneWhitelist []string - ShouldIncludeUninitialized bool + Selector string + DryRun bool + ServerDryRun bool + Prune bool + PruneResources []pruneResource + cmdBaseName string + All bool + Overwrite bool + OpenAPIPatch bool + PruneWhitelist []string Validator validation.Schema Builder *resource.Builder @@ -224,7 +223,6 @@ func (o *ApplyOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error { return err } o.DeleteOptions = o.DeleteFlags.ToOptions(dynamicClient, o.IOStreams) - o.ShouldIncludeUninitialized = cmdutil.ShouldIncludeUninitialized(cmd, o.Prune) o.OpenAPISchema, _ = f.OpenAPISchema() o.Validator, err = f.Validator(cmdutil.GetFlagBool(cmd, "validate")) @@ -315,7 +313,6 @@ func (o *ApplyOptions) Run() error { NamespaceParam(o.Namespace).DefaultNamespace(). FilenameParam(o.EnforceNamespace, &o.DeleteOptions.FilenameOptions). LabelSelectorParam(o.Selector). - IncludeUninitialized(o.ShouldIncludeUninitialized). Flatten(). Do() if err := r.Err(); err != nil { @@ -535,13 +532,13 @@ func (o *ApplyOptions) Run() error { for n := range visitedNamespaces { for _, m := range namespacedRESTMappings { - if err := p.prune(n, m, o.ShouldIncludeUninitialized); err != nil { + if err := p.prune(n, m); err != nil { return fmt.Errorf("error pruning namespaced object %v: %v", m.GroupVersionKind, err) } } } for _, m := range nonNamespacedRESTMappings { - if err := p.prune(metav1.NamespaceNone, m, o.ShouldIncludeUninitialized); err != nil { + if err := p.prune(metav1.NamespaceNone, m); err != nil { return fmt.Errorf("error pruning nonNamespaced object %v: %v", m.GroupVersionKind, err) } } @@ -617,13 +614,12 @@ type pruner struct { out io.Writer } -func (p *pruner) prune(namespace string, mapping *meta.RESTMapping, includeUninitialized bool) error { +func (p *pruner) prune(namespace string, mapping *meta.RESTMapping) error { objList, err := p.dynamicClient.Resource(mapping.Resource). Namespace(namespace). List(metav1.ListOptions{ - LabelSelector: p.labelSelector, - FieldSelector: p.fieldSelector, - IncludeUninitialized: includeUninitialized, + LabelSelector: p.labelSelector, + FieldSelector: p.fieldSelector, }) if err != nil { return err diff --git a/pkg/kubectl/cmd/delete/delete.go b/pkg/kubectl/cmd/delete/delete.go index dcb858f810..bd3aa79349 100644 --- a/pkg/kubectl/cmd/delete/delete.go +++ b/pkg/kubectl/cmd/delete/delete.go @@ -162,7 +162,6 @@ func (o *DeleteOptions) Complete(f cmdutil.Factory, args []string, cmd *cobra.Co o.GracePeriod = 1 } - includeUninitialized := cmdutil.ShouldIncludeUninitialized(cmd, false) r := f.NewBuilder(). Unstructured(). ContinueOnError(). @@ -170,7 +169,6 @@ func (o *DeleteOptions) Complete(f cmdutil.Factory, args []string, cmd *cobra.Co FilenameParam(enforceNamespace, &o.FilenameOptions). LabelSelectorParam(o.LabelSelector). FieldSelectorParam(o.FieldSelector). - IncludeUninitialized(includeUninitialized). SelectAllParam(o.DeleteAll). ResourceTypeOrNameArgs(false, args...).RequireObject(false). Flatten(). diff --git a/pkg/kubectl/cmd/describe/describe.go b/pkg/kubectl/cmd/describe/describe.go index 85616898af..b0f9cb1d48 100644 --- a/pkg/kubectl/cmd/describe/describe.go +++ b/pkg/kubectl/cmd/describe/describe.go @@ -79,9 +79,8 @@ type DescribeOptions struct { BuilderArgs []string - EnforceNamespace bool - AllNamespaces bool - IncludeUninitialized bool + EnforceNamespace bool + AllNamespaces bool DescriberSettings *describe.DescriberSettings FilenameOptions *resource.FilenameOptions @@ -144,9 +143,6 @@ func (o *DescribeOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args [ o.NewBuilder = f.NewBuilder - // include the uninitialized objects by default - // unless user explicitly set --include-uninitialized=false - o.IncludeUninitialized = cmdutil.ShouldIncludeUninitialized(cmd, true) return nil } @@ -161,7 +157,6 @@ func (o *DescribeOptions) Run() error { NamespaceParam(o.Namespace).DefaultNamespace().AllNamespaces(o.AllNamespaces). FilenameParam(o.EnforceNamespace, o.FilenameOptions). LabelSelectorParam(o.Selector). - IncludeUninitialized(o.IncludeUninitialized). ResourceTypeOrNameArgs(true, o.BuilderArgs...). Flatten(). Do() diff --git a/pkg/kubectl/cmd/get/get.go b/pkg/kubectl/cmd/get/get.go index 751b591a0f..bc15a3a472 100644 --- a/pkg/kubectl/cmd/get/get.go +++ b/pkg/kubectl/cmd/get/get.go @@ -79,8 +79,6 @@ type GetOptions struct { IgnoreNotFound bool Export bool - IncludeUninitialized bool - genericclioptions.IOStreams } @@ -224,8 +222,6 @@ func (o *GetOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []stri o.IsHumanReadablePrinter = true } - o.IncludeUninitialized = cmdutil.ShouldIncludeUninitialized(cmd, false) - o.ToPrinter = func(mapping *meta.RESTMapping, withNamespace bool, withKind bool) (printers.ResourcePrinterFunc, error) { // make a new copy of current flags / opts before mutating printFlags := o.PrintFlags.Copy() @@ -256,9 +252,6 @@ func (o *GetOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []stri switch { case o.Watch || o.WatchOnly: - // include uninitialized objects when watching on a single object - // unless explicitly set --include-uninitialized=false - o.IncludeUninitialized = cmdutil.ShouldIncludeUninitialized(cmd, len(args) == 2) default: if len(args) == 0 && cmdutil.IsFilenameSliceEmpty(o.Filenames) { fmt.Fprintf(o.ErrOut, "You must specify the type of resource to get. %s\n\n", cmdutil.SuggestAPIResources(o.CmdParent)) @@ -428,7 +421,6 @@ func (o *GetOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []string) e FieldSelectorParam(o.FieldSelector). ExportParam(o.Export). RequestChunksOf(chunkSize). - IncludeUninitialized(o.IncludeUninitialized). ResourceTypeOrNameArgs(true, args...). ContinueOnError(). Latest(). @@ -613,7 +605,6 @@ func (o *GetOptions) watch(f cmdutil.Factory, cmd *cobra.Command, args []string) FieldSelectorParam(o.FieldSelector). ExportParam(o.Export). RequestChunksOf(o.ChunkSize). - IncludeUninitialized(o.IncludeUninitialized). ResourceTypeOrNameArgs(true, args...). SingleResourceType(). Latest(). diff --git a/pkg/kubectl/cmd/label/label.go b/pkg/kubectl/cmd/label/label.go index a342b90c92..63781453f5 100644 --- a/pkg/kubectl/cmd/label/label.go +++ b/pkg/kubectl/cmd/label/label.go @@ -72,7 +72,6 @@ type LabelOptions struct { namespace string enforceNamespace bool - includeUninitialized bool builder *resource.Builder unstructuredClientForMapping func(mapping *meta.RESTMapping) (resource.RESTClient, error) @@ -192,7 +191,6 @@ func (o *LabelOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []st if err != nil { return err } - o.includeUninitialized = cmdutil.ShouldIncludeUninitialized(cmd, false) o.builder = f.NewBuilder() o.unstructuredClientForMapping = f.UnstructuredClientForMapping @@ -224,7 +222,6 @@ func (o *LabelOptions) RunLabel() error { ContinueOnError(). NamespaceParam(o.namespace).DefaultNamespace(). FilenameParam(o.enforceNamespace, &o.FilenameOptions). - IncludeUninitialized(o.includeUninitialized). Flatten() if !o.local { diff --git a/pkg/kubectl/cmd/set/set_image.go b/pkg/kubectl/cmd/set/set_image.go index 225d784735..6e92d5fae4 100644 --- a/pkg/kubectl/cmd/set/set_image.go +++ b/pkg/kubectl/cmd/set/set_image.go @@ -163,14 +163,12 @@ func (o *SetImageOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args [ return err } - includeUninitialized := cmdutil.ShouldIncludeUninitialized(cmd, false) builder := f.NewBuilder(). WithScheme(scheme.Scheme, scheme.Scheme.PrioritizedVersionsAllGroups()...). LocalParam(o.Local). ContinueOnError(). NamespaceParam(cmdNamespace).DefaultNamespace(). FilenameParam(enforceNamespace, &o.FilenameOptions). - IncludeUninitialized(includeUninitialized). Flatten() if !o.Local { diff --git a/pkg/kubectl/cmd/set/set_resources.go b/pkg/kubectl/cmd/set/set_resources.go index e4e2dd14bb..c7872ba2af 100644 --- a/pkg/kubectl/cmd/set/set_resources.go +++ b/pkg/kubectl/cmd/set/set_resources.go @@ -167,14 +167,12 @@ func (o *SetResourcesOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, ar return err } - includeUninitialized := cmdutil.ShouldIncludeUninitialized(cmd, false) builder := f.NewBuilder(). WithScheme(scheme.Scheme, scheme.Scheme.PrioritizedVersionsAllGroups()...). LocalParam(o.Local). ContinueOnError(). NamespaceParam(cmdNamespace).DefaultNamespace(). FilenameParam(enforceNamespace, &o.FilenameOptions). - IncludeUninitialized(includeUninitialized). Flatten() if !o.Local { diff --git a/pkg/kubectl/cmd/set/set_selector.go b/pkg/kubectl/cmd/set/set_selector.go index ddc4ba489b..a38da4f88d 100644 --- a/pkg/kubectl/cmd/set/set_selector.go +++ b/pkg/kubectl/cmd/set/set_selector.go @@ -80,7 +80,6 @@ func NewSelectorOptions(streams genericclioptions.IOStreams) *SetSelectorOptions WithScheme(scheme.Scheme). WithAll(false). WithLocal(false). - WithUninitialized(false). WithLatest(), PrintFlags: genericclioptions.NewPrintFlags("selector updated").WithTypeSetter(scheme.Scheme), RecordFlags: genericclioptions.NewRecordFlags(), diff --git a/pkg/kubectl/cmd/set/set_serviceaccount.go b/pkg/kubectl/cmd/set/set_serviceaccount.go index b0d5852709..e3e56346a8 100644 --- a/pkg/kubectl/cmd/set/set_serviceaccount.go +++ b/pkg/kubectl/cmd/set/set_serviceaccount.go @@ -151,14 +151,12 @@ func (o *SetServiceAccountOptions) Complete(f cmdutil.Factory, cmd *cobra.Comman } o.serviceAccountName = args[len(args)-1] resources := args[:len(args)-1] - includeUninitialized := cmdutil.ShouldIncludeUninitialized(cmd, false) builder := f.NewBuilder(). WithScheme(scheme.Scheme, scheme.Scheme.PrioritizedVersionsAllGroups()...). LocalParam(o.local). ContinueOnError(). NamespaceParam(cmdNamespace).DefaultNamespace(). FilenameParam(enforceNamespace, &o.fileNameOptions). - IncludeUninitialized(includeUninitialized). Flatten() if !o.local { builder.ResourceTypeOrNameArgs(o.all, resources...). diff --git a/pkg/kubectl/cmd/set/set_subject.go b/pkg/kubectl/cmd/set/set_subject.go index a18032d903..c88414590d 100644 --- a/pkg/kubectl/cmd/set/set_subject.go +++ b/pkg/kubectl/cmd/set/set_subject.go @@ -138,14 +138,12 @@ func (o *SubjectOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args [] return err } - includeUninitialized := cmdutil.ShouldIncludeUninitialized(cmd, false) builder := f.NewBuilder(). WithScheme(scheme.Scheme, scheme.Scheme.PrioritizedVersionsAllGroups()...). LocalParam(o.Local). ContinueOnError(). NamespaceParam(o.namespace).DefaultNamespace(). FilenameParam(enforceNamespace, &o.FilenameOptions). - IncludeUninitialized(includeUninitialized). Flatten() if o.Local { diff --git a/pkg/kubectl/cmd/util/editor/editoptions.go b/pkg/kubectl/cmd/util/editor/editoptions.go index 0293df4272..9cf7b89670 100644 --- a/pkg/kubectl/cmd/util/editor/editoptions.go +++ b/pkg/kubectl/cmd/util/editor/editoptions.go @@ -177,10 +177,8 @@ func (o *EditOptions) Complete(f cmdutil.Factory, args []string, cmd *cobra.Comm // when do normal edit or apply edit we need to always retrieve the latest resource from server b = b.ResourceTypeOrNameArgs(true, args...).Latest() } - includeUninitialized := cmdutil.ShouldIncludeUninitialized(cmd, false) r := b.NamespaceParam(cmdNamespace).DefaultNamespace(). FilenameParam(enforceNamespace, &o.FilenameOptions). - IncludeUninitialized(includeUninitialized). ContinueOnError(). Flatten(). Do() @@ -195,7 +193,6 @@ func (o *EditOptions) Complete(f cmdutil.Factory, args []string, cmd *cobra.Comm return f.NewBuilder(). Unstructured(). Stream(bytes.NewReader(data), "edited-file"). - IncludeUninitialized(includeUninitialized). ContinueOnError(). Flatten(). Do() diff --git a/pkg/kubectl/cmd/util/helpers.go b/pkg/kubectl/cmd/util/helpers.go index 9d661cb3ab..750738cc42 100644 --- a/pkg/kubectl/cmd/util/helpers.go +++ b/pkg/kubectl/cmd/util/helpers.go @@ -48,9 +48,8 @@ import ( ) const ( - ApplyAnnotationsFlag = "save-config" - DefaultErrorExitCode = 1 - IncludeUninitializedFlag = "include-uninitialized" + ApplyAnnotationsFlag = "save-config" + DefaultErrorExitCode = 1 ) type debugError interface { @@ -402,7 +401,8 @@ func AddDryRunFlag(cmd *cobra.Command) { } func AddIncludeUninitializedFlag(cmd *cobra.Command) { - cmd.Flags().Bool(IncludeUninitializedFlag, false, `If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.`) + cmd.Flags().Bool("include-uninitialized", false, `If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.`) + cmd.Flags().MarkDeprecated("include-uninitialized", "The Initializers feature has been removed. This flag is now a no-op, and will be removed in v1.15") } func AddPodRunningTimeoutFlag(cmd *cobra.Command, defaultTimeout time.Duration) { @@ -594,28 +594,6 @@ func ManualStrip(file []byte) []byte { return stripped } -// ShouldIncludeUninitialized identifies whether to include uninitialized objects. -// includeUninitialized is the default value. -// Assume we can parse `all` and `selector` from cmd. -func ShouldIncludeUninitialized(cmd *cobra.Command, includeUninitialized bool) bool { - shouldIncludeUninitialized := includeUninitialized - if cmd.Flags().Lookup("all") != nil && GetFlagBool(cmd, "all") { - // include the uninitialized objects by default - // unless explicitly set --include-uninitialized=false - shouldIncludeUninitialized = true - } - if cmd.Flags().Lookup("selector") != nil && GetFlagString(cmd, "selector") != "" { - // does not include the uninitialized objects by default - // unless explicitly set --include-uninitialized=true - shouldIncludeUninitialized = false - } - if cmd.Flags().Changed(IncludeUninitializedFlag) { - // get explicit value - shouldIncludeUninitialized = GetFlagBool(cmd, IncludeUninitializedFlag) - } - return shouldIncludeUninitialized -} - // ScaleClientFunc provides a ScalesGetter type ScaleClientFunc func(genericclioptions.RESTClientGetter) (scale.ScalesGetter, error) diff --git a/pkg/kubectl/scheme/BUILD b/pkg/kubectl/scheme/BUILD index 67b59354c5..0f84a7bd7b 100644 --- a/pkg/kubectl/scheme/BUILD +++ b/pkg/kubectl/scheme/BUILD @@ -10,7 +10,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//staging/src/k8s.io/api/admission/v1beta1:go_default_library", - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta1:go_default_library", diff --git a/pkg/kubectl/scheme/install.go b/pkg/kubectl/scheme/install.go index d339b49c5a..cb6e5ca041 100644 --- a/pkg/kubectl/scheme/install.go +++ b/pkg/kubectl/scheme/install.go @@ -18,7 +18,6 @@ package scheme import ( admissionv1alpha1 "k8s.io/api/admission/v1beta1" - admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" @@ -61,7 +60,7 @@ func init() { utilruntime.Must(Scheme.SetVersionPriority(corev1.SchemeGroupVersion)) utilruntime.Must(Scheme.SetVersionPriority(admissionv1alpha1.SchemeGroupVersion)) - utilruntime.Must(Scheme.SetVersionPriority(admissionregistrationv1beta1.SchemeGroupVersion, admissionregistrationv1alpha1.SchemeGroupVersion)) + utilruntime.Must(Scheme.SetVersionPriority(admissionregistrationv1beta1.SchemeGroupVersion)) utilruntime.Must(Scheme.SetVersionPriority(appsv1beta1.SchemeGroupVersion, appsv1beta2.SchemeGroupVersion, appsv1.SchemeGroupVersion)) utilruntime.Must(Scheme.SetVersionPriority(authenticationv1.SchemeGroupVersion, authenticationv1beta1.SchemeGroupVersion)) utilruntime.Must(Scheme.SetVersionPriority(authorizationv1.SchemeGroupVersion, authorizationv1beta1.SchemeGroupVersion)) diff --git a/pkg/master/BUILD b/pkg/master/BUILD index fed6ca1c03..413f120aed 100644 --- a/pkg/master/BUILD +++ b/pkg/master/BUILD @@ -66,7 +66,6 @@ go_library( "//pkg/serviceaccount:go_default_library", "//pkg/util/async:go_default_library", "//pkg/util/node:go_default_library", - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta1:go_default_library", diff --git a/pkg/master/master.go b/pkg/master/master.go index fcffb2d944..be544b44f0 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -24,7 +24,6 @@ import ( "strconv" "time" - admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" @@ -518,7 +517,6 @@ func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig { // disable alpha versions explicitly so we have a full list of what's possible to serve ret.DisableVersions( auditregistrationv1alpha1.SchemeGroupVersion, - admissionregistrationv1alpha1.SchemeGroupVersion, batchapiv2alpha1.SchemeGroupVersion, rbacv1alpha1.SchemeGroupVersion, schedulingv1alpha1.SchemeGroupVersion, diff --git a/pkg/quota/v1/evaluator/core/BUILD b/pkg/quota/v1/evaluator/core/BUILD index 800a34d752..58cc57bfea 100644 --- a/pkg/quota/v1/evaluator/core/BUILD +++ b/pkg/quota/v1/evaluator/core/BUILD @@ -22,7 +22,6 @@ go_library( "//pkg/apis/core/v1/helper:go_default_library", "//pkg/apis/core/v1/helper/qos:go_default_library", "//pkg/features:go_default_library", - "//pkg/kubeapiserver/admission/util:go_default_library", "//pkg/quota/v1:go_default_library", "//pkg/quota/v1/generic:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", @@ -31,11 +30,8 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/initialization:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", ], ) diff --git a/pkg/quota/v1/evaluator/core/persistent_volume_claims.go b/pkg/quota/v1/evaluator/core/persistent_volume_claims.go index ea8ecad52d..3cf3a2b0fa 100644 --- a/pkg/quota/v1/evaluator/core/persistent_volume_claims.go +++ b/pkg/quota/v1/evaluator/core/persistent_volume_claims.go @@ -24,16 +24,12 @@ import ( "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/initialization" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/admission" - "k8s.io/apiserver/pkg/features" utilfeature "k8s.io/apiserver/pkg/util/feature" api "k8s.io/kubernetes/pkg/apis/core" k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" "k8s.io/kubernetes/pkg/apis/core/v1/helper" k8sfeatures "k8s.io/kubernetes/pkg/features" - "k8s.io/kubernetes/pkg/kubeapiserver/admission/util" quota "k8s.io/kubernetes/pkg/quota/v1" "k8s.io/kubernetes/pkg/quota/v1/generic" ) @@ -99,25 +95,9 @@ func (p *pvcEvaluator) Handles(a admission.Attributes) bool { return true } if op == admission.Update && utilfeature.DefaultFeatureGate.Enabled(k8sfeatures.ExpandPersistentVolumes) { - initialized, err := initialization.IsObjectInitialized(a.GetObject()) - if err != nil { - // fail closed, will try to give an evaluation. - utilruntime.HandleError(err) - return true - } - // only handle the update if the object is initialized after the update. - return initialized - } - // TODO: when the ExpandPersistentVolumes feature gate is removed, remove - // the initializationCompletion check as well, because it will become a - // subset of the "initialized" condition. - initializationCompletion, err := util.IsInitializationCompletion(a) - if err != nil { - // fail closed, will try to give an evaluation. - utilruntime.HandleError(err) return true } - return initializationCompletion + return false } // Matches returns true if the evaluator matches the specified quota with the provided input item @@ -173,12 +153,6 @@ func (p *pvcEvaluator) Usage(item runtime.Object) (corev1.ResourceList, error) { // charge for claim result[corev1.ResourcePersistentVolumeClaims] = *(resource.NewQuantity(1, resource.DecimalSI)) result[pvcObjectCountName] = *(resource.NewQuantity(1, resource.DecimalSI)) - if utilfeature.DefaultFeatureGate.Enabled(features.Initializers) { - if !initialization.IsInitialized(pvc.Initializers) { - // Only charge pvc count for uninitialized pvc. - return result, nil - } - } storageClassRef := helper.GetPersistentVolumeClaimClass(pvc) if len(storageClassRef) > 0 { storageClassClaim := corev1.ResourceName(storageClassRef + storageClassSuffix + string(corev1.ResourcePersistentVolumeClaims)) diff --git a/pkg/quota/v1/evaluator/core/pods.go b/pkg/quota/v1/evaluator/core/pods.go index dbf20e5661..955a59596f 100644 --- a/pkg/quota/v1/evaluator/core/pods.go +++ b/pkg/quota/v1/evaluator/core/pods.go @@ -28,14 +28,12 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/clock" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" api "k8s.io/kubernetes/pkg/apis/core" k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" "k8s.io/kubernetes/pkg/apis/core/v1/helper" "k8s.io/kubernetes/pkg/apis/core/v1/helper/qos" - "k8s.io/kubernetes/pkg/kubeapiserver/admission/util" quota "k8s.io/kubernetes/pkg/quota/v1" "k8s.io/kubernetes/pkg/quota/v1/generic" ) @@ -150,14 +148,7 @@ func (p *podEvaluator) Handles(a admission.Attributes) bool { if op == admission.Create { return true } - initializationCompletion, err := util.IsInitializationCompletion(a) - if err != nil { - // fail closed, will try to give an evaluation. - utilruntime.HandleError(err) - return true - } - // only uninitialized pods might be updated. - return initializationCompletion + return false } // Matches returns true if the evaluator matches the specified quota with the provided input item diff --git a/pkg/registry/BUILD b/pkg/registry/BUILD index 6c5128b103..ad23225f57 100644 --- a/pkg/registry/BUILD +++ b/pkg/registry/BUILD @@ -22,7 +22,6 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/registry/admissionregistration/initializerconfiguration:all-srcs", "//pkg/registry/admissionregistration/mutatingwebhookconfiguration:all-srcs", "//pkg/registry/admissionregistration/rest:all-srcs", "//pkg/registry/admissionregistration/validatingwebhookconfiguration:all-srcs", diff --git a/pkg/registry/admissionregistration/initializerconfiguration/BUILD b/pkg/registry/admissionregistration/initializerconfiguration/BUILD deleted file mode 100644 index 7f2519101b..0000000000 --- a/pkg/registry/admissionregistration/initializerconfiguration/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "strategy.go", - ], - importpath = "k8s.io/kubernetes/pkg/registry/admissionregistration/initializerconfiguration", - deps = [ - "//pkg/api/legacyscheme:go_default_library", - "//pkg/apis/admissionregistration:go_default_library", - "//pkg/apis/admissionregistration/validation:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/storage/names:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/registry/admissionregistration/initializerconfiguration/storage:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/registry/admissionregistration/initializerconfiguration/doc.go b/pkg/registry/admissionregistration/initializerconfiguration/doc.go deleted file mode 100644 index 7f4cd229b8..0000000000 --- a/pkg/registry/admissionregistration/initializerconfiguration/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2015 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 initializerconfiguration // import "k8s.io/kubernetes/pkg/registry/admissionregistration/initializerconfiguration" diff --git a/pkg/registry/admissionregistration/initializerconfiguration/storage/BUILD b/pkg/registry/admissionregistration/initializerconfiguration/storage/BUILD deleted file mode 100644 index 9dba2e9b3a..0000000000 --- a/pkg/registry/admissionregistration/initializerconfiguration/storage/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["storage.go"], - importpath = "k8s.io/kubernetes/pkg/registry/admissionregistration/initializerconfiguration/storage", - deps = [ - "//pkg/apis/admissionregistration:go_default_library", - "//pkg/registry/admissionregistration/initializerconfiguration:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/registry/admissionregistration/initializerconfiguration/storage/storage.go b/pkg/registry/admissionregistration/initializerconfiguration/storage/storage.go deleted file mode 100644 index a8846f36ed..0000000000 --- a/pkg/registry/admissionregistration/initializerconfiguration/storage/storage.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2015 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 storage - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apiserver/pkg/registry/generic" - genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" - "k8s.io/kubernetes/pkg/apis/admissionregistration" - "k8s.io/kubernetes/pkg/registry/admissionregistration/initializerconfiguration" -) - -// rest implements a RESTStorage for pod disruption budgets against etcd -type REST struct { - *genericregistry.Store -} - -// NewREST returns a RESTStorage object that will work against pod disruption budgets. -func NewREST(optsGetter generic.RESTOptionsGetter) *REST { - store := &genericregistry.Store{ - NewFunc: func() runtime.Object { return &admissionregistration.InitializerConfiguration{} }, - NewListFunc: func() runtime.Object { return &admissionregistration.InitializerConfigurationList{} }, - ObjectNameFunc: func(obj runtime.Object) (string, error) { - return obj.(*admissionregistration.InitializerConfiguration).Name, nil - }, - DefaultQualifiedResource: admissionregistration.Resource("initializerconfigurations"), - - CreateStrategy: initializerconfiguration.Strategy, - UpdateStrategy: initializerconfiguration.Strategy, - DeleteStrategy: initializerconfiguration.Strategy, - } - options := &generic.StoreOptions{RESTOptions: optsGetter} - if err := store.CompleteWithOptions(options); err != nil { - panic(err) // TODO: Propagate error up - } - return &REST{store} -} diff --git a/pkg/registry/admissionregistration/initializerconfiguration/strategy.go b/pkg/registry/admissionregistration/initializerconfiguration/strategy.go deleted file mode 100644 index 70b2be0cc7..0000000000 --- a/pkg/registry/admissionregistration/initializerconfiguration/strategy.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2014 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 initializerconfiguration - -import ( - "context" - "reflect" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/apiserver/pkg/storage/names" - "k8s.io/kubernetes/pkg/api/legacyscheme" - "k8s.io/kubernetes/pkg/apis/admissionregistration" - "k8s.io/kubernetes/pkg/apis/admissionregistration/validation" -) - -// initializerConfigurationStrategy implements verification logic for InitializerConfigurations. -type initializerConfigurationStrategy struct { - runtime.ObjectTyper - names.NameGenerator -} - -// Strategy is the default logic that applies when creating and updating InitializerConfiguration objects. -var Strategy = initializerConfigurationStrategy{legacyscheme.Scheme, names.SimpleNameGenerator} - -// NamespaceScoped returns true because all InitializerConfiguration' need to be within a namespace. -func (initializerConfigurationStrategy) NamespaceScoped() bool { - return false -} - -// PrepareForCreate clears the status of an InitializerConfiguration before creation. -func (initializerConfigurationStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { - ic := obj.(*admissionregistration.InitializerConfiguration) - ic.Generation = 1 -} - -// PrepareForUpdate clears fields that are not allowed to be set by end users on update. -func (initializerConfigurationStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { - newIC := obj.(*admissionregistration.InitializerConfiguration) - oldIC := old.(*admissionregistration.InitializerConfiguration) - - // Any changes to the spec increment the generation number, any changes to the - // status should reflect the generation number of the corresponding object. - // See metav1.ObjectMeta description for more information on Generation. - if !reflect.DeepEqual(oldIC.Initializers, newIC.Initializers) { - newIC.Generation = oldIC.Generation + 1 - } -} - -// Validate validates a new InitializerConfiguration. -func (initializerConfigurationStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { - ic := obj.(*admissionregistration.InitializerConfiguration) - return validation.ValidateInitializerConfiguration(ic) -} - -// Canonicalize normalizes the object after validation. -func (initializerConfigurationStrategy) Canonicalize(obj runtime.Object) { -} - -// AllowCreateOnUpdate is true for InitializerConfiguration; this means you may create one with a PUT request. -func (initializerConfigurationStrategy) AllowCreateOnUpdate() bool { - return false -} - -// ValidateUpdate is the default update validation for an end user. -func (initializerConfigurationStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - validationErrorList := validation.ValidateInitializerConfiguration(obj.(*admissionregistration.InitializerConfiguration)) - updateErrorList := validation.ValidateInitializerConfigurationUpdate(obj.(*admissionregistration.InitializerConfiguration), old.(*admissionregistration.InitializerConfiguration)) - return append(validationErrorList, updateErrorList...) -} - -// AllowUnconditionalUpdate is the default update policy for InitializerConfiguration objects. Status update should -// only be allowed if version match. -func (initializerConfigurationStrategy) AllowUnconditionalUpdate() bool { - return false -} diff --git a/pkg/registry/admissionregistration/rest/BUILD b/pkg/registry/admissionregistration/rest/BUILD index b58b088bf6..0c3edc3800 100644 --- a/pkg/registry/admissionregistration/rest/BUILD +++ b/pkg/registry/admissionregistration/rest/BUILD @@ -12,10 +12,8 @@ go_library( deps = [ "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/admissionregistration:go_default_library", - "//pkg/registry/admissionregistration/initializerconfiguration/storage:go_default_library", "//pkg/registry/admissionregistration/mutatingwebhookconfiguration/storage:go_default_library", "//pkg/registry/admissionregistration/validatingwebhookconfiguration/storage:go_default_library", - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", diff --git a/pkg/registry/admissionregistration/rest/storage_apiserver.go b/pkg/registry/admissionregistration/rest/storage_apiserver.go index 8bfcb35eb7..535c2317d0 100644 --- a/pkg/registry/admissionregistration/rest/storage_apiserver.go +++ b/pkg/registry/admissionregistration/rest/storage_apiserver.go @@ -17,7 +17,6 @@ limitations under the License. package rest import ( - admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/rest" @@ -25,7 +24,6 @@ import ( serverstorage "k8s.io/apiserver/pkg/server/storage" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/admissionregistration" - initializerconfigurationstorage "k8s.io/kubernetes/pkg/registry/admissionregistration/initializerconfiguration/storage" mutatingwebhookconfigurationstorage "k8s.io/kubernetes/pkg/registry/admissionregistration/mutatingwebhookconfiguration/storage" validatingwebhookconfigurationstorage "k8s.io/kubernetes/pkg/registry/admissionregistration/validatingwebhookconfiguration/storage" ) @@ -37,24 +35,12 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag // If you add a version here, be sure to add an entry in `k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go with specific priorities. // TODO refactor the plumbing to provide the information in the APIGroupInfo - if apiResourceConfigSource.VersionEnabled(admissionregistrationv1alpha1.SchemeGroupVersion) { - apiGroupInfo.VersionedResourcesStorageMap[admissionregistrationv1alpha1.SchemeGroupVersion.Version] = p.v1alpha1Storage(apiResourceConfigSource, restOptionsGetter) - } if apiResourceConfigSource.VersionEnabled(admissionregistrationv1beta1.SchemeGroupVersion) { apiGroupInfo.VersionedResourcesStorageMap[admissionregistrationv1beta1.SchemeGroupVersion.Version] = p.v1beta1Storage(apiResourceConfigSource, restOptionsGetter) } return apiGroupInfo, true } -func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage { - storage := map[string]rest.Storage{} - // initializerconfigurations - s := initializerconfigurationstorage.NewREST(restOptionsGetter) - storage["initializerconfigurations"] = s - - return storage -} - func (p RESTStorageProvider) v1beta1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage { storage := map[string]rest.Storage{} // validatingwebhookconfigurations diff --git a/pkg/registry/apps/replicaset/strategy.go b/pkg/registry/apps/replicaset/strategy.go index 72d7007498..57aa5ab81c 100644 --- a/pkg/registry/apps/replicaset/strategy.go +++ b/pkg/registry/apps/replicaset/strategy.go @@ -160,12 +160,12 @@ func ReplicaSetToSelectableFields(rs *apps.ReplicaSet) fields.Set { } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { rs, ok := obj.(*apps.ReplicaSet) if !ok { - return nil, nil, false, fmt.Errorf("given object is not a ReplicaSet.") + return nil, nil, fmt.Errorf("given object is not a ReplicaSet.") } - return labels.Set(rs.ObjectMeta.Labels), ReplicaSetToSelectableFields(rs), rs.Initializers != nil, nil + return labels.Set(rs.ObjectMeta.Labels), ReplicaSetToSelectableFields(rs), nil } // MatchReplicaSet is the filter used by the generic etcd backend to route diff --git a/pkg/registry/batch/job/strategy.go b/pkg/registry/batch/job/strategy.go index b0a5e8a347..4f4acaa5cf 100644 --- a/pkg/registry/batch/job/strategy.go +++ b/pkg/registry/batch/job/strategy.go @@ -202,12 +202,12 @@ func JobToSelectableFields(job *batch.Job) fields.Set { } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { job, ok := obj.(*batch.Job) if !ok { - return nil, nil, false, fmt.Errorf("given object is not a job.") + return nil, nil, fmt.Errorf("given object is not a job.") } - return labels.Set(job.ObjectMeta.Labels), JobToSelectableFields(job), job.Initializers != nil, nil + return labels.Set(job.ObjectMeta.Labels), JobToSelectableFields(job), nil } // MatchJob is the filter used by the generic etcd backend to route diff --git a/pkg/registry/core/event/strategy.go b/pkg/registry/core/event/strategy.go index bfe3c9d597..566c33c024 100644 --- a/pkg/registry/core/event/strategy.go +++ b/pkg/registry/core/event/strategy.go @@ -79,12 +79,12 @@ func (eventStrategy) AllowUnconditionalUpdate() bool { } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { event, ok := obj.(*api.Event) if !ok { - return nil, nil, false, fmt.Errorf("not an event") + return nil, nil, fmt.Errorf("not an event") } - return labels.Set(event.Labels), EventToSelectableFields(event), event.Initializers != nil, nil + return labels.Set(event.Labels), EventToSelectableFields(event), nil } func MatchEvent(label labels.Selector, field fields.Selector) storage.SelectionPredicate { diff --git a/pkg/registry/core/namespace/strategy.go b/pkg/registry/core/namespace/strategy.go index be15c1b963..bb27621f2e 100644 --- a/pkg/registry/core/namespace/strategy.go +++ b/pkg/registry/core/namespace/strategy.go @@ -139,12 +139,12 @@ func (namespaceFinalizeStrategy) PrepareForUpdate(ctx context.Context, obj, old } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { namespaceObj, ok := obj.(*api.Namespace) if !ok { - return nil, nil, false, fmt.Errorf("not a namespace") + return nil, nil, fmt.Errorf("not a namespace") } - return labels.Set(namespaceObj.Labels), NamespaceToSelectableFields(namespaceObj), namespaceObj.Initializers != nil, nil + return labels.Set(namespaceObj.Labels), NamespaceToSelectableFields(namespaceObj), nil } // MatchNamespace returns a generic matcher for a given label and field selector. diff --git a/pkg/registry/core/node/strategy.go b/pkg/registry/core/node/strategy.go index 5922b7754a..3f853a5139 100644 --- a/pkg/registry/core/node/strategy.go +++ b/pkg/registry/core/node/strategy.go @@ -181,12 +181,12 @@ func NodeToSelectableFields(node *api.Node) fields.Set { } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { nodeObj, ok := obj.(*api.Node) if !ok { - return nil, nil, false, fmt.Errorf("not a node") + return nil, nil, fmt.Errorf("not a node") } - return labels.Set(nodeObj.ObjectMeta.Labels), NodeToSelectableFields(nodeObj), nodeObj.Initializers != nil, nil + return labels.Set(nodeObj.ObjectMeta.Labels), NodeToSelectableFields(nodeObj), nil } // MatchNode returns a generic matcher for a given label and field selector. diff --git a/pkg/registry/core/persistentvolume/strategy.go b/pkg/registry/core/persistentvolume/strategy.go index 312fa8cfb4..5ab7d1edd4 100644 --- a/pkg/registry/core/persistentvolume/strategy.go +++ b/pkg/registry/core/persistentvolume/strategy.go @@ -108,12 +108,12 @@ func (persistentvolumeStatusStrategy) ValidateUpdate(ctx context.Context, obj, o } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { persistentvolumeObj, ok := obj.(*api.PersistentVolume) if !ok { - return nil, nil, false, fmt.Errorf("not a persistentvolume") + return nil, nil, fmt.Errorf("not a persistentvolume") } - return labels.Set(persistentvolumeObj.Labels), PersistentVolumeToSelectableFields(persistentvolumeObj), persistentvolumeObj.Initializers != nil, nil + return labels.Set(persistentvolumeObj.Labels), PersistentVolumeToSelectableFields(persistentvolumeObj), nil } // MatchPersistentVolume returns a generic matcher for a given label and field selector. diff --git a/pkg/registry/core/persistentvolumeclaim/strategy.go b/pkg/registry/core/persistentvolumeclaim/strategy.go index 8f32c162a8..14e0d26a16 100644 --- a/pkg/registry/core/persistentvolumeclaim/strategy.go +++ b/pkg/registry/core/persistentvolumeclaim/strategy.go @@ -109,12 +109,12 @@ func (persistentvolumeclaimStatusStrategy) ValidateUpdate(ctx context.Context, o } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { persistentvolumeclaimObj, ok := obj.(*api.PersistentVolumeClaim) if !ok { - return nil, nil, false, fmt.Errorf("not a persistentvolumeclaim") + return nil, nil, fmt.Errorf("not a persistentvolumeclaim") } - return labels.Set(persistentvolumeclaimObj.Labels), PersistentVolumeClaimToSelectableFields(persistentvolumeclaimObj), persistentvolumeclaimObj.Initializers != nil, nil + return labels.Set(persistentvolumeclaimObj.Labels), PersistentVolumeClaimToSelectableFields(persistentvolumeclaimObj), nil } // MatchPersistentVolumeClaim returns a generic matcher for a given label and field selector. diff --git a/pkg/registry/core/pod/BUILD b/pkg/registry/core/pod/BUILD index ddf8fcb5d1..45b6151727 100644 --- a/pkg/registry/core/pod/BUILD +++ b/pkg/registry/core/pod/BUILD @@ -22,20 +22,16 @@ go_library( "//pkg/kubelet/client:go_default_library", "//pkg/proxy/util:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/names:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", ], ) diff --git a/pkg/registry/core/pod/storage/BUILD b/pkg/registry/core/pod/storage/BUILD index 8e06b27530..0b6aa46035 100644 --- a/pkg/registry/core/pod/storage/BUILD +++ b/pkg/registry/core/pod/storage/BUILD @@ -24,7 +24,6 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic/testing:go_default_library", @@ -32,8 +31,6 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/storage:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/errors:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/etcd/testing:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature/testing:go_default_library", ], ) diff --git a/pkg/registry/core/pod/storage/storage_test.go b/pkg/registry/core/pod/storage/storage_test.go index 5a084bc131..20b2b9443d 100644 --- a/pkg/registry/core/pod/storage/storage_test.go +++ b/pkg/registry/core/pod/storage/storage_test.go @@ -32,7 +32,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/diff" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/registry/generic" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" genericregistrytest "k8s.io/apiserver/pkg/registry/generic/testing" @@ -40,8 +39,6 @@ import ( "k8s.io/apiserver/pkg/storage" storeerr "k8s.io/apiserver/pkg/storage/errors" etcdtesting "k8s.io/apiserver/pkg/storage/etcd/testing" - utilfeature "k8s.io/apiserver/pkg/util/feature" - utilfeaturetesting "k8s.io/apiserver/pkg/util/feature/testing" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/registry/registrytest" "k8s.io/kubernetes/pkg/securitycontext" @@ -729,76 +726,6 @@ func TestEtcdCreateBinding(t *testing.T) { } } -func TestEtcdUpdateUninitialized(t *testing.T) { - defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.Initializers, true)() - storage, _, _, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - ctx := genericapirequest.NewDefaultContext() - - pod := validNewPod() - // add pending initializers to the pod - pod.ObjectMeta.Initializers = &metav1.Initializers{Pending: []metav1.Initializer{{Name: "init.k8s.io"}}} - if _, err := storage.Create(ctx, pod, rest.ValidateAllObjectFunc, &metav1.CreateOptions{IncludeUninitialized: true}); err != nil { - t.Fatalf("unexpected error: %v", err) - } - podIn := *pod - // only uninitialized pod is allowed to add containers via update - podIn.Spec.Containers = append(podIn.Spec.Containers, api.Container{ - Name: "foo2", - Image: "test", - ImagePullPolicy: api.PullAlways, - TerminationMessagePath: api.TerminationMessagePathDefault, - TerminationMessagePolicy: api.TerminationMessageReadFile, - SecurityContext: securitycontext.ValidInternalSecurityContextWithContainerDefaults(), - }) - podIn.ObjectMeta.Initializers = nil - - _, _, err := storage.Update(ctx, podIn.Name, rest.DefaultUpdatedObjectInfo(&podIn), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - obj, err := storage.Get(ctx, podIn.ObjectMeta.Name, &metav1.GetOptions{}) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - podOut := obj.(*api.Pod) - if podOut.GetInitializers() != nil { - t.Errorf("expect nil initializers, got %v", podOut.ObjectMeta.Initializers) - } - if !apiequality.Semantic.DeepEqual(podIn.Spec.Containers, podOut.Spec.Containers) { - t.Errorf("objects differ: %v", diff.ObjectDiff(podOut, &podIn)) - } -} - -func TestEtcdStatusUpdateUninitialized(t *testing.T) { - defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.Initializers, true)() - storage, _, statusStorage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - ctx := genericapirequest.NewDefaultContext() - - pod := validNewPod() - // add pending initializers to the pod - pod.ObjectMeta.Initializers = &metav1.Initializers{Pending: []metav1.Initializer{{Name: "init.k8s.io"}}} - if _, err := storage.Create(ctx, pod, rest.ValidateAllObjectFunc, &metav1.CreateOptions{IncludeUninitialized: true}); err != nil { - t.Fatalf("unexpected error: %v", err) - } - podIn := *pod - // only uninitialized pod is allowed to add containers via update - podIn.Status.Phase = api.PodRunning - podIn.ObjectMeta.Initializers = nil - - _, _, err := statusStorage.Update(ctx, podIn.Name, rest.DefaultUpdatedObjectInfo(&podIn), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) - expected := "Forbidden: must not update status when the object is uninitialized" - if err == nil { - t.Fatalf("Unexpected no err, expected %q", expected) - } - if !strings.Contains(err.Error(), expected) { - t.Errorf("unexpected error: %v, expected %q", err, expected) - } -} - func TestEtcdUpdateNotScheduled(t *testing.T) { storage, _, _, server := newStorage(t) defer server.Terminate(t) diff --git a/pkg/registry/core/pod/strategy.go b/pkg/registry/core/pod/strategy.go index 307870e1fb..eed0d70b86 100644 --- a/pkg/registry/core/pod/strategy.go +++ b/pkg/registry/core/pod/strategy.go @@ -27,20 +27,16 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - apimachineryvalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage/names" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/kubernetes/pkg/api/legacyscheme" podutil "k8s.io/kubernetes/pkg/api/pod" api "k8s.io/kubernetes/pkg/apis/core" @@ -100,31 +96,9 @@ func (podStrategy) AllowCreateOnUpdate() bool { return false } -func isUpdatingUninitializedPod(old runtime.Object) (bool, error) { - if !utilfeature.DefaultFeatureGate.Enabled(features.Initializers) { - return false, nil - } - oldMeta, err := meta.Accessor(old) - if err != nil { - return false, err - } - oldInitializers := oldMeta.GetInitializers() - if oldInitializers != nil && len(oldInitializers.Pending) != 0 { - return true, nil - } - return false, nil -} - // ValidateUpdate is the default update validation for an end user. func (podStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { errorList := validation.ValidatePod(obj.(*api.Pod)) - uninitializedUpdate, err := isUpdatingUninitializedPod(old) - if err != nil { - return append(errorList, field.InternalError(field.NewPath("metadata"), err)) - } - if uninitializedUpdate { - return errorList - } return append(errorList, validation.ValidatePodUpdate(obj.(*api.Pod), old.(*api.Pod))...) } @@ -193,25 +167,16 @@ func (podStatusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime. } func (podStatusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - var errorList field.ErrorList - uninitializedUpdate, err := isUpdatingUninitializedPod(old) - if err != nil { - return append(errorList, field.InternalError(field.NewPath("metadata"), err)) - } - if uninitializedUpdate { - return append(errorList, field.Forbidden(field.NewPath("status"), apimachineryvalidation.UninitializedStatusUpdateErrorMsg)) - } - // TODO: merge valid fields after update return validation.ValidatePodStatusUpdate(obj.(*api.Pod), old.(*api.Pod)) } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { pod, ok := obj.(*api.Pod) if !ok { - return nil, nil, false, fmt.Errorf("not a pod") + return nil, nil, fmt.Errorf("not a pod") } - return labels.Set(pod.ObjectMeta.Labels), PodToSelectableFields(pod), pod.Initializers != nil, nil + return labels.Set(pod.ObjectMeta.Labels), PodToSelectableFields(pod), nil } // MatchPod returns a generic matcher for a given label and field selector. diff --git a/pkg/registry/core/replicationcontroller/strategy.go b/pkg/registry/core/replicationcontroller/strategy.go index 7c05fee212..9a718f2a26 100644 --- a/pkg/registry/core/replicationcontroller/strategy.go +++ b/pkg/registry/core/replicationcontroller/strategy.go @@ -164,12 +164,12 @@ func ControllerToSelectableFields(controller *api.ReplicationController) fields. } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { rc, ok := obj.(*api.ReplicationController) if !ok { - return nil, nil, false, fmt.Errorf("given object is not a replication controller.") + return nil, nil, fmt.Errorf("given object is not a replication controller.") } - return labels.Set(rc.ObjectMeta.Labels), ControllerToSelectableFields(rc), rc.Initializers != nil, nil + return labels.Set(rc.ObjectMeta.Labels), ControllerToSelectableFields(rc), nil } // MatchController is the filter used by the generic etcd backend to route diff --git a/pkg/registry/core/secret/strategy.go b/pkg/registry/core/secret/strategy.go index d52fd42abc..52d39cbe97 100644 --- a/pkg/registry/core/secret/strategy.go +++ b/pkg/registry/core/secret/strategy.go @@ -98,12 +98,12 @@ func (s strategy) Export(ctx context.Context, obj runtime.Object, exact bool) er } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { secret, ok := obj.(*api.Secret) if !ok { - return nil, nil, false, fmt.Errorf("not a secret") + return nil, nil, fmt.Errorf("not a secret") } - return labels.Set(secret.Labels), SelectableFields(secret), secret.Initializers != nil, nil + return labels.Set(secret.Labels), SelectableFields(secret), nil } // Matcher returns a generic matcher for a given label and field selector. diff --git a/pkg/registry/events/event/strategy.go b/pkg/registry/events/event/strategy.go index a043384ad9..4f556b3fef 100644 --- a/pkg/registry/events/event/strategy.go +++ b/pkg/registry/events/event/strategy.go @@ -85,12 +85,12 @@ func SelectableFields(pip *api.Event) fields.Set { } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { pip, ok := obj.(*api.Event) if !ok { - return nil, nil, false, fmt.Errorf("given object is not a Event") + return nil, nil, fmt.Errorf("given object is not a Event") } - return labels.Set(pip.ObjectMeta.Labels), SelectableFields(pip), pip.Initializers != nil, nil + return labels.Set(pip.ObjectMeta.Labels), SelectableFields(pip), nil } // Matcher is the filter used by the generic etcd backend to watch events diff --git a/plugin/pkg/admission/podnodeselector/BUILD b/plugin/pkg/admission/podnodeselector/BUILD index 0144ccd207..5a59f437f9 100644 --- a/plugin/pkg/admission/podnodeselector/BUILD +++ b/plugin/pkg/admission/podnodeselector/BUILD @@ -12,7 +12,6 @@ go_library( importpath = "k8s.io/kubernetes/plugin/pkg/admission/podnodeselector", deps = [ "//pkg/apis/core:go_default_library", - "//pkg/kubeapiserver/admission/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/plugin/pkg/admission/podnodeselector/admission.go b/plugin/pkg/admission/podnodeselector/admission.go index 1d502a0de1..e3e81ea716 100644 --- a/plugin/pkg/admission/podnodeselector/admission.go +++ b/plugin/pkg/admission/podnodeselector/admission.go @@ -34,7 +34,6 @@ import ( "k8s.io/client-go/kubernetes" corev1listers "k8s.io/client-go/listers/core/v1" api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/kubeapiserver/admission/util" ) // The annotation key scheduler.alpha.kubernetes.io/node-selector is for assigning @@ -99,14 +98,6 @@ func (p *podNodeSelector) Admit(a admission.Attributes) error { if shouldIgnore(a) { return nil } - updateInitialized, err := util.IsUpdatingInitializedObject(a) - if err != nil { - return err - } - if updateInitialized { - // node selector of an initialized pod is immutable - return nil - } if !p.WaitForReady() { return admission.NewForbidden(a, fmt.Errorf("not yet ready to handle request")) } @@ -199,7 +190,7 @@ func shouldIgnore(a admission.Attributes) bool { func NewPodNodeSelector(clusterNodeSelectors map[string]string) *podNodeSelector { return &podNodeSelector{ - Handler: admission.NewHandler(admission.Create, admission.Update), + Handler: admission.NewHandler(admission.Create), clusterNodeSelectors: clusterNodeSelectors, } } diff --git a/plugin/pkg/admission/podnodeselector/admission_test.go b/plugin/pkg/admission/podnodeselector/admission_test.go index ba1d3f16a5..398ef18fb1 100644 --- a/plugin/pkg/admission/podnodeselector/admission_test.go +++ b/plugin/pkg/admission/podnodeselector/admission_test.go @@ -53,12 +53,6 @@ func TestPodAdmission(t *testing.T) { ObjectMeta: metav1.ObjectMeta{Name: "testPod", Namespace: "testNamespace"}, } - oldPod := *pod - oldPod.Initializers = &metav1.Initializers{Pending: []metav1.Initializer{{Name: "init"}}} - oldPod.Spec.NodeSelector = map[string]string{ - "old": "true", - } - tests := []struct { defaultNodeSelector string namespaceNodeSelector string @@ -182,30 +176,13 @@ func TestPodAdmission(t *testing.T) { } else if !test.admit && err == nil { t.Errorf("Test: %s, expected an error", test.testName) } - - // handles update of uninitialized pod like it's newly created. - err = handler.Admit(admission.NewAttributesRecord(pod, &oldPod, api.Kind("Pod").WithVersion("version"), "testNamespace", namespace.ObjectMeta.Name, api.Resource("pods").WithVersion("version"), "", admission.Update, false, nil)) - if test.admit && err != nil { - t.Errorf("Test: %s, expected no error but got: %s", test.testName, err) - } else if !test.admit && err == nil { - t.Errorf("Test: %s, expected an error", test.testName) - } - if test.admit && !labels.Equals(test.mergedNodeSelector, labels.Set(pod.Spec.NodeSelector)) { - t.Errorf("Test: %s, expected: %s but got: %s", test.testName, test.mergedNodeSelector, pod.Spec.NodeSelector) - } - err = handler.Validate(admission.NewAttributesRecord(pod, &oldPod, api.Kind("Pod").WithVersion("version"), "testNamespace", namespace.ObjectMeta.Name, api.Resource("pods").WithVersion("version"), "", admission.Update, false, nil)) - if test.admit && err != nil { - t.Errorf("Test: %s, expected no error but got: %s", test.testName, err) - } else if !test.admit && err == nil { - t.Errorf("Test: %s, expected an error", test.testName) - } } } func TestHandles(t *testing.T) { for op, shouldHandle := range map[admission.Operation]bool{ admission.Create: true, - admission.Update: true, + admission.Update: false, admission.Connect: false, admission.Delete: false, } { @@ -216,40 +193,6 @@ func TestHandles(t *testing.T) { } } -func TestIgnoreUpdatingInitializedPod(t *testing.T) { - namespaceNodeSelector := "infra=true" - namespace := &corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testNamespace", - Namespace: "", - Annotations: map[string]string{"scheduler.alpha.kubernetes.io/node-selector": namespaceNodeSelector}, - }, - } - mockClient := fake.NewSimpleClientset(namespace) - handler, informerFactory, err := newHandlerForTest(mockClient) - if err != nil { - t.Errorf("unexpected error initializing handler: %v", err) - } - handler.SetReadyFunc(func() bool { return true }) - - podNodeSelector := map[string]string{"infra": "false"} - pod := &api.Pod{ - ObjectMeta: metav1.ObjectMeta{Name: "testPod", Namespace: "testNamespace"}, - Spec: api.PodSpec{NodeSelector: podNodeSelector}, - } - // this conflicts with podNodeSelector - err = informerFactory.Core().V1().Namespaces().Informer().GetStore().Update(namespace) - if err != nil { - t.Fatal(err) - } - - // if the update of initialized pod is not ignored, an error will be returned because the pod's nodeSelector conflicts with namespace's nodeSelector. - err = handler.Admit(admission.NewAttributesRecord(pod, pod, api.Kind("Pod").WithVersion("version"), "testNamespace", namespace.ObjectMeta.Name, api.Resource("pods").WithVersion("version"), "", admission.Update, false, nil)) - if err != nil { - t.Errorf("expected no error, got: %v", err) - } -} - // newHandlerForTest returns the admission controller configured for testing. func newHandlerForTest(c kubernetes.Interface) (*podNodeSelector, informers.SharedInformerFactory, error) { f := informers.NewSharedInformerFactory(c, 5*time.Minute) diff --git a/plugin/pkg/admission/podtolerationrestriction/BUILD b/plugin/pkg/admission/podtolerationrestriction/BUILD index 20b854020c..336336f295 100644 --- a/plugin/pkg/admission/podtolerationrestriction/BUILD +++ b/plugin/pkg/admission/podtolerationrestriction/BUILD @@ -40,7 +40,6 @@ go_library( "//pkg/apis/core:go_default_library", "//pkg/apis/core/helper/qos:go_default_library", "//pkg/apis/core/v1:go_default_library", - "//pkg/kubeapiserver/admission/util:go_default_library", "//pkg/scheduler/api:go_default_library", "//pkg/util/tolerations:go_default_library", "//plugin/pkg/admission/podtolerationrestriction/apis/podtolerationrestriction:go_default_library", diff --git a/plugin/pkg/admission/podtolerationrestriction/admission.go b/plugin/pkg/admission/podtolerationrestriction/admission.go index 35823f5a05..92ae3726cb 100644 --- a/plugin/pkg/admission/podtolerationrestriction/admission.go +++ b/plugin/pkg/admission/podtolerationrestriction/admission.go @@ -35,7 +35,6 @@ import ( api "k8s.io/kubernetes/pkg/apis/core" qoshelper "k8s.io/kubernetes/pkg/apis/core/helper/qos" k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" - "k8s.io/kubernetes/pkg/kubeapiserver/admission/util" schedulerapi "k8s.io/kubernetes/pkg/scheduler/api" "k8s.io/kubernetes/pkg/util/tolerations" pluginapi "k8s.io/kubernetes/plugin/pkg/admission/podtolerationrestriction/apis/podtolerationrestriction" @@ -93,11 +92,7 @@ func (p *podTolerationsPlugin) Admit(a admission.Attributes) error { pod := a.GetObject().(*api.Pod) var finalTolerations []api.Toleration - updateUninitialized, err := util.IsUpdatingUninitializedObject(a) - if err != nil { - return err - } - if a.GetOperation() == admission.Create || updateUninitialized { + if a.GetOperation() == admission.Create { ts, err := p.getNamespaceDefaultTolerations(a.GetNamespace()) if err != nil { return err diff --git a/plugin/pkg/admission/podtolerationrestriction/admission_test.go b/plugin/pkg/admission/podtolerationrestriction/admission_test.go index 10bfa2e6a6..8736d2de03 100644 --- a/plugin/pkg/admission/podtolerationrestriction/admission_test.go +++ b/plugin/pkg/admission/podtolerationrestriction/admission_test.go @@ -254,11 +254,6 @@ func TestPodAdmission(t *testing.T) { pod := test.pod pod.Spec.Tolerations = test.podTolerations - // copy the original pod for tests of uninitialized pod updates. - oldPod := *pod - oldPod.Initializers = &metav1.Initializers{Pending: []metav1.Initializer{{Name: "init"}}} - oldPod.Spec.Tolerations = []api.Toleration{{Key: "testKey", Operator: "Equal", Value: "testValue1", Effect: "NoSchedule", TolerationSeconds: nil}} - err = handler.Admit(admission.NewAttributesRecord(pod, nil, api.Kind("Pod").WithVersion("version"), "testNamespace", namespace.ObjectMeta.Name, api.Resource("pods").WithVersion("version"), "", admission.Create, false, nil)) if test.admit && err != nil { t.Errorf("Test: %s, expected no error but got: %s", test.testName, err) @@ -270,19 +265,6 @@ func TestPodAdmission(t *testing.T) { if test.admit && !tolerations.EqualTolerations(updatedPodTolerations, test.mergedTolerations) { t.Errorf("Test: %s, expected: %#v but got: %#v", test.testName, test.mergedTolerations, updatedPodTolerations) } - - // handles update of uninitialized pod like it's newly created. - err = handler.Admit(admission.NewAttributesRecord(pod, &oldPod, api.Kind("Pod").WithVersion("version"), "testNamespace", namespace.ObjectMeta.Name, api.Resource("pods").WithVersion("version"), "", admission.Update, false, nil)) - if test.admit && err != nil { - t.Errorf("Test: %s, expected no error but got: %s", test.testName, err) - } else if !test.admit && err == nil { - t.Errorf("Test: %s, expected an error", test.testName) - } - - updatedPodTolerations = pod.Spec.Tolerations - if test.admit && !tolerations.EqualTolerations(updatedPodTolerations, test.mergedTolerations) { - t.Errorf("Test: %s, expected: %#v but got: %#v", test.testName, test.mergedTolerations, updatedPodTolerations) - } }) } } diff --git a/plugin/pkg/admission/serviceaccount/BUILD b/plugin/pkg/admission/serviceaccount/BUILD index b7e1566d0c..9d98ef4421 100644 --- a/plugin/pkg/admission/serviceaccount/BUILD +++ b/plugin/pkg/admission/serviceaccount/BUILD @@ -17,7 +17,6 @@ go_library( "//pkg/api/pod:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/features:go_default_library", - "//pkg/kubeapiserver/admission/util:go_default_library", "//pkg/serviceaccount:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", diff --git a/plugin/pkg/admission/serviceaccount/admission.go b/plugin/pkg/admission/serviceaccount/admission.go index a1c9d43db4..007e20bf40 100644 --- a/plugin/pkg/admission/serviceaccount/admission.go +++ b/plugin/pkg/admission/serviceaccount/admission.go @@ -40,7 +40,6 @@ import ( podutil "k8s.io/kubernetes/pkg/api/pod" api "k8s.io/kubernetes/pkg/apis/core" kubefeatures "k8s.io/kubernetes/pkg/features" - "k8s.io/kubernetes/pkg/kubeapiserver/admission/util" "k8s.io/kubernetes/pkg/serviceaccount" ) @@ -105,7 +104,7 @@ var _ = genericadmissioninitializer.WantsExternalKubeInformerFactory(&serviceAcc // 5. If MountServiceAccountToken is true, it adds a VolumeMount with the pod's ServiceAccount's api token secret to containers func NewServiceAccount() *serviceAccount { return &serviceAccount{ - Handler: admission.NewHandler(admission.Create, admission.Update), + Handler: admission.NewHandler(admission.Create), // TODO: enable this once we've swept secret usage to account for adding secret references to service accounts LimitSecretReferences: false, // Auto mount service account API token secrets @@ -153,14 +152,6 @@ func (s *serviceAccount) Admit(a admission.Attributes) (err error) { if shouldIgnore(a) { return nil } - updateInitialized, err := util.IsUpdatingInitializedObject(a) - if err != nil { - return err - } - if updateInitialized { - // related pod spec fields are immutable after the pod is initialized - return nil - } pod := a.GetObject().(*api.Pod) @@ -202,14 +193,6 @@ func (s *serviceAccount) Validate(a admission.Attributes) (err error) { if shouldIgnore(a) { return nil } - updateInitialized, err := util.IsUpdatingInitializedObject(a) - if err != nil { - return err - } - if updateInitialized { - // related pod spec fields are immutable after the pod is initialized - return nil - } pod := a.GetObject().(*api.Pod) @@ -257,6 +240,9 @@ func shouldIgnore(a admission.Attributes) bool { if a.GetResource().GroupResource() != api.Resource("pods") { return true } + if a.GetSubresource() != "" { + return true + } obj := a.GetObject() if obj == nil { return true diff --git a/plugin/pkg/admission/serviceaccount/admission_test.go b/plugin/pkg/admission/serviceaccount/admission_test.go index be5ca5237f..79ae943d7e 100644 --- a/plugin/pkg/admission/serviceaccount/admission_test.go +++ b/plugin/pkg/admission/serviceaccount/admission_test.go @@ -62,17 +62,6 @@ func TestIgnoresNonCreate(t *testing.T) { } } -func TestIgnoresUpdateOfInitializedPod(t *testing.T) { - pod := &api.Pod{} - oldPod := &api.Pod{} - attrs := admission.NewAttributesRecord(pod, oldPod, api.Kind("Pod").WithVersion("version"), "myns", "myname", api.Resource("pods").WithVersion("version"), "", admission.Update, false, nil) - handler := NewServiceAccount() - err := handler.Admit(attrs) - if err != nil { - t.Errorf("Expected update of initialized pod allowed, got err: %v", err) - } -} - func TestIgnoresNonPodResource(t *testing.T) { pod := &api.Pod{} attrs := admission.NewAttributesRecord(pod, nil, api.Kind("Pod").WithVersion("version"), "myns", "myname", api.Resource("CustomResource").WithVersion("version"), "", admission.Create, false, nil) @@ -362,54 +351,6 @@ func TestAutomountsAPIToken(t *testing.T) { t.Fatalf("Expected\n\t%#v\ngot\n\t%#v", expectedVolumeMount, pod.Spec.Containers[0].VolumeMounts[0]) } - // Test ServiceAccount admission plugin applies the same changes if the - // operation is an update to an uninitialized pod. - oldPod := &api.Pod{ - Spec: api.PodSpec{ - Containers: []api.Container{ - { - // the volumeMount in the oldPod shouldn't affect the result. - VolumeMounts: []api.VolumeMount{ - { - Name: "wrong-" + tokenName, - ReadOnly: true, - MountPath: DefaultAPITokenMountPath, - }, - }, - }, - }, - }, - } - // oldPod is not intialized. - oldPod.Initializers = &metav1.Initializers{Pending: []metav1.Initializer{{Name: "init"}}} - pod = &api.Pod{ - Spec: api.PodSpec{ - Containers: []api.Container{ - {}, - }, - }, - } - attrs = admission.NewAttributesRecord(pod, oldPod, api.Kind("Pod").WithVersion("version"), ns, "myname", api.Resource("pods").WithVersion("version"), "", admission.Update, false, nil) - err = admit.Admit(attrs) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - if pod.Spec.ServiceAccountName != DefaultServiceAccountName { - t.Errorf("Expected service account %s assigned, got %s", DefaultServiceAccountName, pod.Spec.ServiceAccountName) - } - if len(pod.Spec.Volumes) != 1 { - t.Fatalf("Expected 1 volume, got %d", len(pod.Spec.Volumes)) - } - if !reflect.DeepEqual(expectedVolume, pod.Spec.Volumes[0]) { - t.Fatalf("Expected\n\t%#v\ngot\n\t%#v", expectedVolume, pod.Spec.Volumes[0]) - } - if len(pod.Spec.Containers[0].VolumeMounts) != 1 { - t.Fatalf("Expected 1 volume mount, got %d", len(pod.Spec.Containers[0].VolumeMounts)) - } - if !reflect.DeepEqual(expectedVolumeMount, pod.Spec.Containers[0].VolumeMounts[0]) { - t.Fatalf("Expected\n\t%#v\ngot\n\t%#v", expectedVolumeMount, pod.Spec.Containers[0].VolumeMounts[0]) - } - // testing InitContainers pod = &api.Pod{ Spec: api.PodSpec{ diff --git a/staging/src/BUILD b/staging/src/BUILD index 36142dfc7e..4f19558e67 100644 --- a/staging/src/BUILD +++ b/staging/src/BUILD @@ -42,7 +42,6 @@ filegroup( "//staging/src/k8s.io/apimachinery/pkg/util/errors:all-srcs", "//staging/src/k8s.io/apimachinery/pkg/util/framer:all-srcs", "//staging/src/k8s.io/apimachinery/pkg/util/httpstream:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/util/initialization:all-srcs", "//staging/src/k8s.io/apimachinery/pkg/util/intstr:all-srcs", "//staging/src/k8s.io/apimachinery/pkg/util/json:all-srcs", "//staging/src/k8s.io/apimachinery/pkg/util/jsonmergepatch:all-srcs", @@ -123,7 +122,6 @@ filegroup( "//staging/src/k8s.io/client-go/informers:all-srcs", "//staging/src/k8s.io/client-go/kubernetes:all-srcs", "//staging/src/k8s.io/client-go/kubernetes_test:all-srcs", - "//staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1:all-srcs", "//staging/src/k8s.io/client-go/listers/admissionregistration/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/listers/apps/v1:all-srcs", "//staging/src/k8s.io/client-go/listers/apps/v1beta1:all-srcs", diff --git a/staging/src/k8s.io/api/BUILD b/staging/src/k8s.io/api/BUILD index 1a651e7d7f..557356468e 100644 --- a/staging/src/k8s.io/api/BUILD +++ b/staging/src/k8s.io/api/BUILD @@ -5,7 +5,6 @@ go_test( srcs = ["roundtrip_test.go"], deps = [ "//staging/src/k8s.io/api/admission/v1beta1:go_default_library", - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta1:go_default_library", @@ -58,7 +57,6 @@ filegroup( srcs = [ ":package-srcs", "//staging/src/k8s.io/api/admission/v1beta1:all-srcs", - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:all-srcs", "//staging/src/k8s.io/api/admissionregistration/v1beta1:all-srcs", "//staging/src/k8s.io/api/apps/v1:all-srcs", "//staging/src/k8s.io/api/apps/v1beta1:all-srcs", diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/BUILD b/staging/src/k8s.io/api/admissionregistration/v1alpha1/BUILD deleted file mode 100644 index a16633e1f3..0000000000 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -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", - ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1alpha1", - importpath = "k8s.io/api/admissionregistration/v1alpha1", - deps = [ - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/doc.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/doc.go deleted file mode 100644 index d29913cf52..0000000000 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/doc.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -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 -// +groupName=admissionregistration.k8s.io - -// Package v1alpha1 is the v1alpha1 version of the API. -// AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration -// InitializerConfiguration and validatingWebhookConfiguration is for the -// new dynamic admission controller configuration. -package v1alpha1 // import "k8s.io/api/admissionregistration/v1alpha1" diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go deleted file mode 100644 index 74c467a222..0000000000 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go +++ /dev/null @@ -1,1008 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto - -/* - Package v1alpha1 is a generated protocol buffer package. - - It is generated from these files: - k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto - - It has these top-level messages: - Initializer - InitializerConfiguration - InitializerConfigurationList - Rule -*/ -package v1alpha1 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import strings "strings" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -func (m *Initializer) Reset() { *m = Initializer{} } -func (*Initializer) ProtoMessage() {} -func (*Initializer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } - -func (m *InitializerConfiguration) Reset() { *m = InitializerConfiguration{} } -func (*InitializerConfiguration) ProtoMessage() {} -func (*InitializerConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{1} -} - -func (m *InitializerConfigurationList) Reset() { *m = InitializerConfigurationList{} } -func (*InitializerConfigurationList) ProtoMessage() {} -func (*InitializerConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{2} -} - -func (m *Rule) Reset() { *m = Rule{} } -func (*Rule) ProtoMessage() {} -func (*Rule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } - -func init() { - proto.RegisterType((*Initializer)(nil), "k8s.io.api.admissionregistration.v1alpha1.Initializer") - proto.RegisterType((*InitializerConfiguration)(nil), "k8s.io.api.admissionregistration.v1alpha1.InitializerConfiguration") - proto.RegisterType((*InitializerConfigurationList)(nil), "k8s.io.api.admissionregistration.v1alpha1.InitializerConfigurationList") - proto.RegisterType((*Rule)(nil), "k8s.io.api.admissionregistration.v1alpha1.Rule") -} -func (m *Initializer) 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 *Initializer) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - if len(m.Rules) > 0 { - for _, msg := range m.Rules { - dAtA[i] = 0x12 - 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 -} - -func (m *InitializerConfiguration) 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 *InitializerConfiguration) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n1, err := m.ObjectMeta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - if len(m.Initializers) > 0 { - for _, msg := range m.Initializers { - dAtA[i] = 0x12 - 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 -} - -func (m *InitializerConfigurationList) 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 *InitializerConfigurationList) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n2, err := m.ListMeta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - if len(m.Items) > 0 { - for _, msg := range m.Items { - dAtA[i] = 0x12 - 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 -} - -func (m *Rule) 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 *Rule) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.APIGroups) > 0 { - for _, s := range m.APIGroups { - dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.APIVersions) > 0 { - for _, s := range m.APIVersions { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.Resources) > 0 { - for _, s := range m.Resources { - dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - return i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Initializer) Size() (n int) { - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Rules) > 0 { - for _, e := range m.Rules { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *InitializerConfiguration) Size() (n int) { - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Initializers) > 0 { - for _, e := range m.Initializers { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *InitializerConfigurationList) Size() (n int) { - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *Rule) Size() (n int) { - var l int - _ = l - if len(m.APIGroups) > 0 { - for _, s := range m.APIGroups { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.APIVersions) > 0 { - for _, s := range m.APIVersions { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Resources) > 0 { - for _, s := range m.Resources { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func sovGenerated(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Initializer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Initializer{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "Rule", "Rule", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *InitializerConfiguration) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&InitializerConfiguration{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Initializers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Initializers), "Initializer", "Initializer", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *InitializerConfigurationList) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&InitializerConfigurationList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "InitializerConfiguration", "InitializerConfiguration", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *Rule) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Rule{`, - `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`, - `APIVersions:` + fmt.Sprintf("%v", this.APIVersions) + `,`, - `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Initializer) 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: Initializer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Initializer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rules", 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.Rules = append(m.Rules, Rule{}) - if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *InitializerConfiguration) 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: InitializerConfiguration: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InitializerConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", 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.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Initializers", 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.Initializers = append(m.Initializers, Initializer{}) - if err := m.Initializers[len(m.Initializers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *InitializerConfigurationList) 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: InitializerConfigurationList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InitializerConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", 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.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", 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.Items = append(m.Items, InitializerConfiguration{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *Rule) 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: Rule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Rule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", 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.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIVersions", 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.APIVersions = append(m.APIVersions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", 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.Resources = append(m.Resources, 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 skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") -) - -func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto", fileDescriptorGenerated) -} - -var fileDescriptorGenerated = []byte{ - // 531 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0x4d, 0x8b, 0x13, 0x31, - 0x18, 0x6e, 0x6c, 0x0b, 0x6d, 0xda, 0x45, 0x19, 0x3c, 0x94, 0x22, 0xd3, 0xd2, 0x53, 0x45, 0x4c, - 0xec, 0x22, 0x8b, 0xd7, 0x9d, 0x3d, 0x48, 0xc1, 0x8f, 0x25, 0x88, 0x07, 0xf1, 0x60, 0xda, 0xbe, - 0x3b, 0x8d, 0xed, 0x4c, 0x86, 0x24, 0x53, 0xd0, 0x93, 0x17, 0xef, 0x82, 0x7f, 0xaa, 0xc7, 0x3d, - 0xee, 0xa9, 0xd8, 0x11, 0x3c, 0xfa, 0x1b, 0x24, 0x33, 0x9d, 0x9d, 0x59, 0xeb, 0xe2, 0xea, 0x2d, - 0xef, 0xf3, 0xe6, 0xf9, 0x4a, 0x30, 0x5b, 0x3c, 0xd1, 0x44, 0x48, 0xba, 0x88, 0x27, 0xa0, 0x42, - 0x30, 0xa0, 0xe9, 0x0a, 0xc2, 0x99, 0x54, 0x74, 0xb7, 0xe0, 0x91, 0xa0, 0x7c, 0x16, 0x08, 0xad, - 0x85, 0x0c, 0x15, 0xf8, 0x42, 0x1b, 0xc5, 0x8d, 0x90, 0x21, 0x5d, 0x8d, 0xf8, 0x32, 0x9a, 0xf3, - 0x11, 0xf5, 0x21, 0x04, 0xc5, 0x0d, 0xcc, 0x48, 0xa4, 0xa4, 0x91, 0xce, 0xfd, 0x8c, 0x4a, 0x78, - 0x24, 0xc8, 0x1f, 0xa9, 0x24, 0xa7, 0x76, 0x1f, 0xfa, 0xc2, 0xcc, 0xe3, 0x09, 0x99, 0xca, 0x80, - 0xfa, 0xd2, 0x97, 0x34, 0x55, 0x98, 0xc4, 0x67, 0xe9, 0x94, 0x0e, 0xe9, 0x29, 0x53, 0xee, 0x3e, - 0x2e, 0x42, 0x05, 0x7c, 0x3a, 0x17, 0x21, 0xa8, 0x0f, 0x34, 0x5a, 0xf8, 0x16, 0xd0, 0x34, 0x00, - 0xc3, 0xe9, 0x6a, 0x2f, 0x4f, 0x97, 0x5e, 0xc7, 0x52, 0x71, 0x68, 0x44, 0x00, 0x7b, 0x84, 0xa3, - 0xbf, 0x11, 0xf4, 0x74, 0x0e, 0x01, 0xff, 0x9d, 0x37, 0xf8, 0x8c, 0x70, 0x6b, 0x1c, 0x0a, 0x23, - 0xf8, 0x52, 0x7c, 0x04, 0xe5, 0xf4, 0x71, 0x2d, 0xe4, 0x01, 0x74, 0x50, 0x1f, 0x0d, 0x9b, 0x5e, - 0x7b, 0xbd, 0xe9, 0x55, 0x92, 0x4d, 0xaf, 0xf6, 0x82, 0x07, 0xc0, 0xd2, 0x8d, 0xf3, 0x0a, 0xd7, - 0x55, 0xbc, 0x04, 0xdd, 0xb9, 0xd5, 0xaf, 0x0e, 0x5b, 0x87, 0x94, 0xdc, 0xf8, 0xe9, 0x08, 0x8b, - 0x97, 0xe0, 0x1d, 0xec, 0x34, 0xeb, 0x76, 0xd2, 0x2c, 0x13, 0x1b, 0xfc, 0x44, 0xb8, 0x53, 0xca, - 0x71, 0x22, 0xc3, 0x33, 0xe1, 0xc7, 0x99, 0x80, 0xf3, 0x0e, 0x37, 0xec, 0x43, 0xcd, 0xb8, 0xe1, - 0x69, 0xb0, 0xd6, 0xe1, 0xa3, 0x92, 0xeb, 0x65, 0x5f, 0x12, 0x2d, 0x7c, 0x0b, 0x68, 0x62, 0x6f, - 0x93, 0xd5, 0x88, 0xbc, 0x9c, 0xbc, 0x87, 0xa9, 0x79, 0x0e, 0x86, 0x7b, 0xce, 0xce, 0x16, 0x17, - 0x18, 0xbb, 0x54, 0x75, 0x22, 0xdc, 0x16, 0x85, 0x7b, 0xde, 0xed, 0xe8, 0x1f, 0xba, 0x95, 0xc2, - 0x7b, 0x77, 0x77, 0x5e, 0xed, 0x12, 0xa8, 0xd9, 0x15, 0x87, 0xc1, 0x0f, 0x84, 0xef, 0x5d, 0x57, - 0xf8, 0x99, 0xd0, 0xc6, 0x79, 0xbb, 0x57, 0x9a, 0xdc, 0xac, 0xb4, 0x65, 0xa7, 0x95, 0xef, 0xec, - 0x62, 0x34, 0x72, 0xa4, 0x54, 0x78, 0x8e, 0xeb, 0xc2, 0x40, 0x90, 0x37, 0x3d, 0xf9, 0xbf, 0xa6, - 0x57, 0x52, 0x17, 0x3f, 0x3b, 0xb6, 0xca, 0x2c, 0x33, 0x18, 0x7c, 0x45, 0xb8, 0x66, 0xbf, 0xda, - 0x79, 0x80, 0x9b, 0x3c, 0x12, 0x4f, 0x95, 0x8c, 0x23, 0xdd, 0x41, 0xfd, 0xea, 0xb0, 0xe9, 0x1d, - 0x24, 0x9b, 0x5e, 0xf3, 0xf8, 0x74, 0x9c, 0x81, 0xac, 0xd8, 0x3b, 0x23, 0xdc, 0xe2, 0x91, 0x78, - 0x0d, 0xca, 0xe6, 0xc8, 0x52, 0x36, 0xbd, 0xdb, 0xc9, 0xa6, 0xd7, 0x3a, 0x3e, 0x1d, 0xe7, 0x30, - 0x2b, 0xdf, 0xb1, 0xfa, 0x0a, 0xb4, 0x8c, 0xd5, 0x14, 0x74, 0xa7, 0x5a, 0xe8, 0xb3, 0x1c, 0x64, - 0xc5, 0xde, 0x23, 0xeb, 0xad, 0x5b, 0x39, 0xdf, 0xba, 0x95, 0x8b, 0xad, 0x5b, 0xf9, 0x94, 0xb8, - 0x68, 0x9d, 0xb8, 0xe8, 0x3c, 0x71, 0xd1, 0x45, 0xe2, 0xa2, 0x6f, 0x89, 0x8b, 0xbe, 0x7c, 0x77, - 0x2b, 0x6f, 0x1a, 0x79, 0xe9, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x06, 0xa3, 0xcb, 0x75, - 0x04, 0x00, 0x00, -} diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.proto b/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.proto deleted file mode 100644 index 98e9a571a2..0000000000 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/generated.proto +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright 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.v1alpha1; - -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"; - -// Package-wide variables from generator "generated". -option go_package = "v1alpha1"; - -// Initializer describes the name and the failure policy of an initializer, and -// what resources it applies to. -message Initializer { - // 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 - optional string name = 1; - - // Rules describes what resources/subresources the initializer cares about. - // The initializer cares about an operation if it matches _any_ Rule. - // Rule.Resources must not include subresources. - repeated Rule rules = 2; -} - -// InitializerConfiguration describes the configuration of initializers. -message InitializerConfiguration { - // 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; - - // Initializers is a list of resources and their default initializers - // Order-sensitive. - // When merging multiple InitializerConfigurations, we sort the initializers - // from different InitializerConfigurations by the name of the - // InitializerConfigurations; the order of the initializers from the same - // InitializerConfiguration is preserved. - // +patchMergeKey=name - // +patchStrategy=merge - // +optional - repeated Initializer initializers = 2; -} - -// InitializerConfigurationList is a list of InitializerConfiguration. -message InitializerConfigurationList { - // 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 InitializerConfiguration. - repeated InitializerConfiguration 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; -} - diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/register.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/register.go deleted file mode 100644 index e9a4164c37..0000000000 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/register.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -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 v1alpha1 - -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: "v1alpha1"} - -// 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, - &InitializerConfiguration{}, - &InitializerConfigurationList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/types.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/types.go deleted file mode 100644 index a245f1e858..0000000000 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/types.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -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 v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// InitializerConfiguration describes the configuration of initializers. -type InitializerConfiguration 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"` - - // Initializers is a list of resources and their default initializers - // Order-sensitive. - // When merging multiple InitializerConfigurations, we sort the initializers - // from different InitializerConfigurations by the name of the - // InitializerConfigurations; the order of the initializers from the same - // InitializerConfiguration is preserved. - // +patchMergeKey=name - // +patchStrategy=merge - // +optional - Initializers []Initializer `json:"initializers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=initializers"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// InitializerConfigurationList is a list of InitializerConfiguration. -type InitializerConfigurationList 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 InitializerConfiguration. - Items []InitializerConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// Initializer describes the name and the failure policy of an initializer, and -// what resources it applies to. -type Initializer struct { - // 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 - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - - // Rules describes what resources/subresources the initializer cares about. - // The initializer cares about an operation if it matches _any_ Rule. - // Rule.Resources must not include subresources. - Rules []Rule `json:"rules,omitempty" protobuf:"bytes,2,rep,name=rules"` -} - -// 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"` -} diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go deleted file mode 100644 index 69e4b7c64a..0000000000 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright 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 v1alpha1 - -// 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. DO NOT EDIT. -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", - "rules": "Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources.", -} - -func (Initializer) SwaggerDoc() map[string]string { - return map_Initializer -} - -var map_InitializerConfiguration = map[string]string{ - "": "InitializerConfiguration describes the configuration of initializers.", - "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - "initializers": "Initializers is a list of resources and their default initializers Order-sensitive. When merging multiple InitializerConfigurations, we sort the initializers from different InitializerConfigurations by the name of the InitializerConfigurations; the order of the initializers from the same InitializerConfiguration is preserved.", -} - -func (InitializerConfiguration) SwaggerDoc() map[string]string { - return map_InitializerConfiguration -} - -var map_InitializerConfigurationList = map[string]string{ - "": "InitializerConfigurationList is a list of InitializerConfiguration.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "items": "List of InitializerConfiguration.", -} - -func (InitializerConfigurationList) SwaggerDoc() map[string]string { - return map_InitializerConfigurationList -} - -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 -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go b/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 9f636b4840..0000000000 --- a/staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,145 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - 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 *Initializer) DeepCopyInto(out *Initializer) { - *out = *in - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]Rule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Initializer. -func (in *Initializer) DeepCopy() *Initializer { - if in == nil { - return nil - } - out := new(Initializer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InitializerConfiguration) DeepCopyInto(out *InitializerConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Initializers != nil { - in, out := &in.Initializers, &out.Initializers - *out = make([]Initializer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitializerConfiguration. -func (in *InitializerConfiguration) DeepCopy() *InitializerConfiguration { - if in == nil { - return nil - } - out := new(InitializerConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *InitializerConfiguration) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InitializerConfigurationList) DeepCopyInto(out *InitializerConfigurationList) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]InitializerConfiguration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitializerConfigurationList. -func (in *InitializerConfigurationList) DeepCopy() *InitializerConfigurationList { - if in == nil { - return nil - } - out := new(InitializerConfigurationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *InitializerConfigurationList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - 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 -} diff --git a/staging/src/k8s.io/api/admissionregistration/v1beta1/doc.go b/staging/src/k8s.io/api/admissionregistration/v1beta1/doc.go index 2b29efaca4..5fea52a13f 100644 --- a/staging/src/k8s.io/api/admissionregistration/v1beta1/doc.go +++ b/staging/src/k8s.io/api/admissionregistration/v1beta1/doc.go @@ -20,6 +20,6 @@ limitations under the License. // Package v1beta1 is the v1beta1 version of the API. // AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration -// InitializerConfiguration and validatingWebhookConfiguration is for the +// MutatingWebhookConfiguration and ValidatingWebhookConfiguration are for the // new dynamic admission controller configuration. package v1beta1 // import "k8s.io/api/admissionregistration/v1beta1" diff --git a/staging/src/k8s.io/api/roundtrip_test.go b/staging/src/k8s.io/api/roundtrip_test.go index 0c79c3eb4b..8b708d971c 100644 --- a/staging/src/k8s.io/api/roundtrip_test.go +++ b/staging/src/k8s.io/api/roundtrip_test.go @@ -21,7 +21,6 @@ import ( "testing" admissionv1beta1 "k8s.io/api/admission/v1beta1" - admissionregv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" admissionregv1beta1 "k8s.io/api/admissionregistration/v1beta1" appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" @@ -64,7 +63,6 @@ import ( var groups = []runtime.SchemeBuilder{ admissionv1beta1.SchemeBuilder, - admissionregv1alpha1.SchemeBuilder, admissionregv1beta1.SchemeBuilder, appsv1beta1.SchemeBuilder, appsv1beta2.SchemeBuilder, diff --git a/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json b/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json index 1fc50f2bed..400833ef34 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json @@ -938,10 +938,6 @@ "ImportPath": "k8s.io/api/admission/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -1298,10 +1294,6 @@ "ImportPath": "k8s.io/apiserver/pkg/admission/metrics", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/initialization", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -1690,10 +1682,6 @@ "ImportPath": "k8s.io/client-go/informers/admissionregistration", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -1878,10 +1866,6 @@ "ImportPath": "k8s.io/client-go/kubernetes/scheme", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -2010,10 +1994,6 @@ "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go index 988fdc1fef..1da0555bff 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go @@ -153,12 +153,12 @@ func (a customResourceStrategy) ValidateUpdate(ctx context.Context, obj, old run } // GetAttrs returns labels and fields of a given object for filtering purposes. -func (a customResourceStrategy) GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func (a customResourceStrategy) GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { accessor, err := meta.Accessor(obj) if err != nil { - return nil, nil, false, err + return nil, nil, err } - return labels.Set(accessor.GetLabels()), objectMetaFieldsSet(accessor, a.namespaceScoped), accessor.GetInitializers() != nil, nil + return labels.Set(accessor.GetLabels()), objectMetaFieldsSet(accessor, a.namespaceScoped), nil } // objectMetaFieldsSet returns a fields that represent the ObjectMeta. diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go index 0fbad28175..123bcc6cde 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go @@ -164,12 +164,12 @@ func (statusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Objec } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { apiserver, ok := obj.(*apiextensions.CustomResourceDefinition) if !ok { - return nil, nil, false, fmt.Errorf("given object is not a CustomResourceDefinition") + return nil, nil, fmt.Errorf("given object is not a CustomResourceDefinition") } - return labels.Set(apiserver.ObjectMeta.Labels), CustomResourceDefinitionToSelectableFields(apiserver), apiserver.Initializers != nil, nil + return labels.Set(apiserver.ObjectMeta.Labels), CustomResourceDefinitionToSelectableFields(apiserver), nil } // MatchCustomResourceDefinition is the filter used by the generic etcd backend to watch events diff --git a/staging/src/k8s.io/apimachinery/pkg/api/meta/testrestmapper/test_restmapper.go b/staging/src/k8s.io/apimachinery/pkg/api/meta/testrestmapper/test_restmapper.go index ede58c254b..01e6f0477e 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/meta/testrestmapper/test_restmapper.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/meta/testrestmapper/test_restmapper.go @@ -111,7 +111,6 @@ func newRESTMapper(group string, scheme *runtime.Scheme) meta.RESTMapper { var rootScopedKinds = map[schema.GroupKind]bool{ {Group: "admission.k8s.io", Kind: "AdmissionReview"}: true, - {Group: "admissionregistration.k8s.io", Kind: "InitializerConfiguration"}: true, {Group: "admissionregistration.k8s.io", Kind: "ValidatingWebhookConfiguration"}: true, {Group: "admissionregistration.k8s.io", Kind: "MutatingWebhookConfiguration"}: true, diff --git a/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go b/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go index 44b9b16006..43e2cebe74 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go @@ -180,36 +180,10 @@ func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, name allErrs = append(allErrs, v1validation.ValidateLabels(meta.GetLabels(), fldPath.Child("labels"))...) allErrs = append(allErrs, ValidateAnnotations(meta.GetAnnotations(), fldPath.Child("annotations"))...) allErrs = append(allErrs, ValidateOwnerReferences(meta.GetOwnerReferences(), fldPath.Child("ownerReferences"))...) - allErrs = append(allErrs, ValidateInitializers(meta.GetInitializers(), fldPath.Child("initializers"))...) allErrs = append(allErrs, ValidateFinalizers(meta.GetFinalizers(), fldPath.Child("finalizers"))...) return allErrs } -func ValidateInitializers(initializers *metav1.Initializers, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - if initializers == nil { - return allErrs - } - for i, initializer := range initializers.Pending { - allErrs = append(allErrs, validation.IsFullyQualifiedName(fldPath.Child("pending").Index(i).Child("name"), initializer.Name)...) - } - allErrs = append(allErrs, validateInitializersResult(initializers.Result, fldPath.Child("result"))...) - return allErrs -} - -func validateInitializersResult(result *metav1.Status, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - if result == nil { - return allErrs - } - switch result.Status { - case metav1.StatusFailure: - default: - allErrs = append(allErrs, field.Invalid(fldPath.Child("status"), result.Status, "must be 'Failure'")) - } - return allErrs -} - // ValidateFinalizers tests if the finalizers name are valid, and if there are conflicting finalizers. func ValidateFinalizers(finalizers []string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} @@ -265,8 +239,6 @@ func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *f allErrs = append(allErrs, field.Invalid(fldPath.Child("generation"), newMeta.GetGeneration(), "must not be decremented")) } - allErrs = append(allErrs, ValidateInitializersUpdate(newMeta.GetInitializers(), oldMeta.GetInitializers(), fldPath.Child("initializers"))...) - allErrs = append(allErrs, ValidateImmutableField(newMeta.GetName(), oldMeta.GetName(), fldPath.Child("name"))...) allErrs = append(allErrs, ValidateImmutableField(newMeta.GetNamespace(), oldMeta.GetNamespace(), fldPath.Child("namespace"))...) allErrs = append(allErrs, ValidateImmutableField(newMeta.GetUID(), oldMeta.GetUID(), fldPath.Child("uid"))...) @@ -281,28 +253,3 @@ func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *f return allErrs } - -// ValidateInitializersUpdate checks the update of the metadata initializers field -func ValidateInitializersUpdate(newInit, oldInit *metav1.Initializers, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - switch { - case oldInit == nil && newInit != nil: - // Initializers may not be set on new objects - allErrs = append(allErrs, field.Invalid(fldPath, nil, "field is immutable once initialization has completed")) - case oldInit != nil && newInit == nil: - // this is a valid transition and means initialization was successful - case oldInit != nil && newInit != nil: - // validate changes to initializers - switch { - case oldInit.Result == nil && newInit.Result != nil: - // setting a result is allowed - allErrs = append(allErrs, validateInitializersResult(newInit.Result, fldPath.Child("result"))...) - case oldInit.Result != nil: - // setting Result implies permanent failure, and all future updates will be prevented - allErrs = append(allErrs, ValidateImmutableField(newInit.Result, oldInit.Result, fldPath.Child("result"))...) - default: - // leaving the result nil is allowed - } - } - return allErrs -} diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go index c067aa5581..3374caf2e4 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go @@ -216,10 +216,7 @@ func v1FuzzerFuncs(codecs runtimeserializer.CodecFactory) []interface{} { } }, func(j *metav1.Initializers, c fuzz.Continue) { - c.FuzzNoCustom(j) - if len(j.Pending) == 0 { - j.Pending = nil - } + j = nil }, func(j *metav1.ListMeta, c fuzz.Continue) { j.ResourceVersion = strconv.FormatUint(c.RandUint64(), 10) diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go index 673e56212a..bdb71340ab 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go @@ -28,7 +28,6 @@ func Convert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions, out if err := metav1.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil { return err } - out.IncludeUninitialized = in.IncludeUninitialized out.ResourceVersion = in.ResourceVersion out.TimeoutSeconds = in.TimeoutSeconds out.Watch = in.Watch @@ -44,7 +43,6 @@ func Convert_v1_ListOptions_To_internalversion_ListOptions(in *metav1.ListOption if err := metav1.Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, s); err != nil { return err } - out.IncludeUninitialized = in.IncludeUninitialized out.ResourceVersion = in.ResourceVersion out.TimeoutSeconds = in.TimeoutSeconds out.Watch = in.Watch diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go index 2f6740d368..e434e5055a 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go @@ -33,9 +33,6 @@ type ListOptions struct { LabelSelector labels.Selector // A selector based on fields FieldSelector fields.Selector - // If true, partially initialized resources are included in the response. - // +optional - IncludeUninitialized bool // If true, watch for changes to this list Watch bool // When specified with a watch call, shows changes that occur after that particular version of a resource. diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go index 18d190b244..79b7567360 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go @@ -117,7 +117,6 @@ func autoConvert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions, if err := v1.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil { return err } - out.IncludeUninitialized = in.IncludeUninitialized out.Watch = in.Watch out.ResourceVersion = in.ResourceVersion out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds)) @@ -133,7 +132,6 @@ func autoConvert_v1_ListOptions_To_internalversion_ListOptions(in *v1.ListOption if err := v1.Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil { return err } - out.IncludeUninitialized = in.IncludeUninitialized out.Watch = in.Watch out.ResourceVersion = in.ResourceVersion out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds)) diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index 81320c9c88..f0535d073a 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -576,14 +576,6 @@ func (m *CreateOptions) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], s) } } - dAtA[i] = 0x10 - i++ - if m.IncludeUninitialized { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ return i, nil } @@ -725,14 +717,6 @@ func (m *GetOptions) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) i += copy(dAtA[i:], m.ResourceVersion) - dAtA[i] = 0x10 - i++ - if m.IncludeUninitialized { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ return i, nil } @@ -1163,14 +1147,6 @@ func (m *ListOptions) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds)) } - dAtA[i] = 0x30 - i++ - if m.IncludeUninitialized { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ dAtA[i] = 0x38 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Limit)) @@ -1884,7 +1860,6 @@ func (m *CreateOptions) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - n += 2 return n } @@ -1934,7 +1909,6 @@ func (m *GetOptions) Size() (n int) { _ = l l = len(m.ResourceVersion) n += 1 + l + sovGenerated(uint64(l)) - n += 2 return n } @@ -2101,7 +2075,6 @@ func (m *ListOptions) Size() (n int) { if m.TimeoutSeconds != nil { n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) } - n += 2 n += 1 + sovGenerated(uint64(m.Limit)) l = len(m.Continue) n += 1 + l + sovGenerated(uint64(l)) @@ -2403,7 +2376,6 @@ func (this *CreateOptions) String() string { } s := strings.Join([]string{`&CreateOptions{`, `DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`, - `IncludeUninitialized:` + fmt.Sprintf("%v", this.IncludeUninitialized) + `,`, `}`, }, "") return s @@ -2449,7 +2421,6 @@ func (this *GetOptions) String() string { } s := strings.Join([]string{`&GetOptions{`, `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, - `IncludeUninitialized:` + fmt.Sprintf("%v", this.IncludeUninitialized) + `,`, `}`, }, "") return s @@ -2552,7 +2523,6 @@ func (this *ListOptions) String() string { `Watch:` + fmt.Sprintf("%v", this.Watch) + `,`, `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, - `IncludeUninitialized:` + fmt.Sprintf("%v", this.IncludeUninitialized) + `,`, `Limit:` + fmt.Sprintf("%v", this.Limit) + `,`, `Continue:` + fmt.Sprintf("%v", this.Continue) + `,`, `}`, @@ -3588,26 +3558,6 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error { } m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeUninitialized", 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.IncludeUninitialized = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -4029,26 +3979,6 @@ func (m *GetOptions) Unmarshal(dAtA []byte) error { } m.ResourceVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeUninitialized", 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.IncludeUninitialized = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -5709,26 +5639,6 @@ func (m *ListOptions) Unmarshal(dAtA []byte) error { } } m.TimeoutSeconds = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeUninitialized", 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.IncludeUninitialized = bool(v != 0) case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) @@ -8152,160 +8062,157 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 2465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0x23, 0x49, - 0xf5, 0x4f, 0xdb, 0xb1, 0x63, 0x3f, 0xc7, 0xf9, 0xa8, 0xcd, 0xfe, 0xff, 0xde, 0x08, 0xec, 0x6c, - 0x2f, 0x5a, 0x65, 0x61, 0xd6, 0x26, 0x59, 0x58, 0x0d, 0x03, 0x2c, 0xc4, 0x71, 0x66, 0x14, 0xed, - 0x64, 0xc6, 0xaa, 0xec, 0x0c, 0x62, 0x18, 0x21, 0x3a, 0xdd, 0x15, 0xa7, 0x49, 0xbb, 0xdb, 0x5b, - 0xd5, 0xce, 0x8c, 0xe1, 0xc0, 0x1e, 0x40, 0x70, 0x40, 0x68, 0x8e, 0x9c, 0xd0, 0x8e, 0xe0, 0xc2, - 0x95, 0x13, 0x17, 0x38, 0x21, 0x31, 0xc7, 0x91, 0xb8, 0xec, 0x01, 0x59, 0x3b, 0xe6, 0xc0, 0x09, - 0x71, 0xcf, 0x09, 0x55, 0x75, 0x75, 0x75, 0xb7, 0x1d, 0x4f, 0xda, 0x3b, 0xbb, 0x88, 0x53, 0xd2, - 0xef, 0xe3, 0xf7, 0x5e, 0x55, 0xbd, 0x7a, 0xef, 0xd5, 0x33, 0x1c, 0x9c, 0x5e, 0x65, 0x75, 0xdb, - 0x6b, 0x9c, 0xf6, 0x8f, 0x08, 0x75, 0x89, 0x4f, 0x58, 0xe3, 0x8c, 0xb8, 0x96, 0x47, 0x1b, 0x92, - 0x61, 0xf4, 0xec, 0xae, 0x61, 0x9e, 0xd8, 0x2e, 0xa1, 0x83, 0x46, 0xef, 0xb4, 0xc3, 0x09, 0xac, - 0xd1, 0x25, 0xbe, 0xd1, 0x38, 0xdb, 0x6a, 0x74, 0x88, 0x4b, 0xa8, 0xe1, 0x13, 0xab, 0xde, 0xa3, - 0x9e, 0xef, 0xa1, 0x2f, 0x04, 0x5a, 0xf5, 0xb8, 0x56, 0xbd, 0x77, 0xda, 0xe1, 0x04, 0x56, 0xe7, - 0x5a, 0xf5, 0xb3, 0xad, 0xf5, 0x37, 0x3b, 0xb6, 0x7f, 0xd2, 0x3f, 0xaa, 0x9b, 0x5e, 0xb7, 0xd1, - 0xf1, 0x3a, 0x5e, 0x43, 0x28, 0x1f, 0xf5, 0x8f, 0xc5, 0x97, 0xf8, 0x10, 0xff, 0x05, 0xa0, 0xeb, - 0x53, 0x5d, 0xa1, 0x7d, 0xd7, 0xb7, 0xbb, 0x64, 0xdc, 0x8b, 0xf5, 0xb7, 0x2f, 0x53, 0x60, 0xe6, - 0x09, 0xe9, 0x1a, 0xe3, 0x7a, 0xfa, 0x5f, 0xb3, 0x50, 0xd8, 0x69, 0xef, 0xdf, 0xa0, 0x5e, 0xbf, - 0x87, 0x36, 0x60, 0xde, 0x35, 0xba, 0xa4, 0xa2, 0x6d, 0x68, 0x9b, 0xc5, 0xe6, 0xe2, 0x93, 0x61, - 0x6d, 0x6e, 0x34, 0xac, 0xcd, 0xdf, 0x32, 0xba, 0x04, 0x0b, 0x0e, 0x72, 0xa0, 0x70, 0x46, 0x28, - 0xb3, 0x3d, 0x97, 0x55, 0x32, 0x1b, 0xd9, 0xcd, 0xd2, 0xf6, 0x3b, 0xf5, 0x34, 0xeb, 0xaf, 0x0b, - 0x03, 0x77, 0x03, 0xd5, 0xeb, 0x1e, 0x6d, 0xd9, 0xcc, 0xf4, 0xce, 0x08, 0x1d, 0x34, 0x57, 0xa4, - 0x95, 0x82, 0x64, 0x32, 0xac, 0x2c, 0xa0, 0x9f, 0x6a, 0xb0, 0xd2, 0xa3, 0xe4, 0x98, 0x50, 0x4a, - 0x2c, 0xc9, 0xaf, 0x64, 0x37, 0xb4, 0x4f, 0xc1, 0x6c, 0x45, 0x9a, 0x5d, 0x69, 0x8f, 0xe1, 0xe3, - 0x09, 0x8b, 0xe8, 0xb7, 0x1a, 0xac, 0x33, 0x42, 0xcf, 0x08, 0xdd, 0xb1, 0x2c, 0x4a, 0x18, 0x6b, - 0x0e, 0x76, 0x1d, 0x9b, 0xb8, 0xfe, 0xee, 0x7e, 0x0b, 0xb3, 0xca, 0xbc, 0xd8, 0x87, 0x6f, 0xa5, - 0x73, 0xe8, 0x70, 0x1a, 0x4e, 0x53, 0x97, 0x1e, 0xad, 0x4f, 0x15, 0x61, 0xf8, 0x39, 0x6e, 0xe8, - 0xc7, 0xb0, 0x18, 0x1e, 0xe4, 0x4d, 0x9b, 0xf9, 0xe8, 0x2e, 0xe4, 0x3b, 0xfc, 0x83, 0x55, 0x34, - 0xe1, 0x60, 0x3d, 0x9d, 0x83, 0x21, 0x46, 0x73, 0x49, 0xfa, 0x93, 0x17, 0x9f, 0x0c, 0x4b, 0x34, - 0xfd, 0x4f, 0x59, 0x28, 0xed, 0xb4, 0xf7, 0x31, 0x61, 0x5e, 0x9f, 0x9a, 0x24, 0x45, 0xd0, 0x6c, - 0x03, 0xf0, 0xbf, 0xac, 0x67, 0x98, 0xc4, 0xaa, 0x64, 0x36, 0xb4, 0xcd, 0x42, 0x13, 0x49, 0x39, - 0xb8, 0xa5, 0x38, 0x38, 0x26, 0xc5, 0x51, 0x4f, 0x6d, 0xd7, 0x12, 0xa7, 0x1d, 0x43, 0x7d, 0xd7, - 0x76, 0x2d, 0x2c, 0x38, 0xe8, 0x26, 0xe4, 0xce, 0x08, 0x3d, 0xe2, 0xfb, 0xcf, 0x03, 0xe2, 0x4b, - 0xe9, 0x96, 0x77, 0x97, 0xab, 0x34, 0x8b, 0xa3, 0x61, 0x2d, 0x27, 0xfe, 0xc5, 0x01, 0x08, 0xaa, - 0x03, 0xb0, 0x13, 0x8f, 0xfa, 0xc2, 0x9d, 0x4a, 0x6e, 0x23, 0xbb, 0x59, 0x6c, 0x2e, 0x71, 0xff, - 0x0e, 0x15, 0x15, 0xc7, 0x24, 0xd0, 0x55, 0x58, 0x64, 0xb6, 0xdb, 0xe9, 0x3b, 0x06, 0xe5, 0x84, - 0x4a, 0x5e, 0xf8, 0xb9, 0x26, 0xfd, 0x5c, 0x3c, 0x8c, 0xf1, 0x70, 0x42, 0x92, 0x5b, 0x32, 0x0d, - 0x9f, 0x74, 0x3c, 0x6a, 0x13, 0x56, 0x59, 0x88, 0x2c, 0xed, 0x2a, 0x2a, 0x8e, 0x49, 0xa0, 0xd7, - 0x20, 0x27, 0x76, 0xbe, 0x52, 0x10, 0x26, 0xca, 0xd2, 0x44, 0x4e, 0x1c, 0x0b, 0x0e, 0x78, 0xe8, - 0x0d, 0x58, 0x90, 0xb7, 0xa6, 0x52, 0x14, 0x62, 0xcb, 0x52, 0x6c, 0x21, 0x0c, 0xeb, 0x90, 0xaf, - 0xff, 0x41, 0x83, 0xe5, 0xd8, 0xf9, 0x89, 0x58, 0xb9, 0x0a, 0x8b, 0x9d, 0xd8, 0x4d, 0x91, 0x67, - 0xa9, 0x56, 0x13, 0xbf, 0x45, 0x38, 0x21, 0x89, 0x08, 0x14, 0xa9, 0x44, 0x0a, 0x33, 0xc2, 0x56, - 0xea, 0x40, 0x0b, 0x7d, 0x88, 0x2c, 0xc5, 0x88, 0x0c, 0x47, 0xc8, 0xfa, 0x3f, 0x35, 0x11, 0x74, - 0x61, 0x8e, 0x40, 0x9b, 0xb1, 0x3c, 0xa4, 0x89, 0x2d, 0x5c, 0x9c, 0x92, 0x43, 0x2e, 0xb9, 0xbc, - 0x99, 0xff, 0x89, 0xcb, 0x7b, 0xad, 0xf0, 0xeb, 0x0f, 0x6b, 0x73, 0x1f, 0xfc, 0x7d, 0x63, 0x4e, - 0xff, 0x99, 0x06, 0xe5, 0x5d, 0x4a, 0x0c, 0x9f, 0xdc, 0xee, 0xf9, 0x62, 0x05, 0x3a, 0xe4, 0x2d, - 0x3a, 0xc0, 0x7d, 0x57, 0xae, 0x14, 0xf8, 0xa5, 0x6c, 0x09, 0x0a, 0x96, 0x1c, 0xd4, 0x86, 0x35, - 0xdb, 0x35, 0x9d, 0xbe, 0x45, 0xee, 0xb8, 0xb6, 0x6b, 0xfb, 0xb6, 0xe1, 0xd8, 0x3f, 0x52, 0x97, - 0xed, 0x73, 0xd2, 0xbb, 0xb5, 0xfd, 0x0b, 0x64, 0xf0, 0x85, 0x9a, 0xfa, 0xcf, 0xb3, 0x50, 0x6e, - 0x11, 0x87, 0x44, 0x7e, 0x5c, 0x07, 0xd4, 0xa1, 0x86, 0x49, 0xda, 0x84, 0xda, 0x9e, 0x75, 0x48, - 0x4c, 0xcf, 0xb5, 0x98, 0x08, 0x95, 0x6c, 0xf3, 0xff, 0x46, 0xc3, 0x1a, 0xba, 0x31, 0xc1, 0xc5, - 0x17, 0x68, 0x20, 0x07, 0xca, 0x3d, 0x2a, 0xfe, 0xb7, 0x7d, 0x59, 0x48, 0xf8, 0x05, 0x7e, 0x2b, - 0xdd, 0x19, 0xb4, 0xe3, 0xaa, 0xcd, 0xd5, 0xd1, 0xb0, 0x56, 0x4e, 0x90, 0x70, 0x12, 0x1c, 0x7d, - 0x1b, 0x56, 0x3c, 0xda, 0x3b, 0x31, 0xdc, 0x16, 0xe9, 0x11, 0xd7, 0x22, 0xae, 0xcf, 0x44, 0x52, - 0x29, 0x34, 0xd7, 0x78, 0xfa, 0xbf, 0x3d, 0xc6, 0xc3, 0x13, 0xd2, 0xe8, 0x1e, 0xac, 0xf6, 0xa8, - 0xd7, 0x33, 0x3a, 0x06, 0x47, 0x6c, 0x7b, 0x8e, 0x6d, 0x0e, 0x44, 0xd2, 0x29, 0x36, 0xaf, 0x8c, - 0x86, 0xb5, 0xd5, 0xf6, 0x38, 0xf3, 0x7c, 0x58, 0x7b, 0x49, 0x6c, 0x1d, 0xa7, 0x44, 0x4c, 0x3c, - 0x09, 0x13, 0x3b, 0xdb, 0xdc, 0xb4, 0xb3, 0xd5, 0xf7, 0xa1, 0xd0, 0xea, 0x53, 0xa1, 0x85, 0xbe, - 0x09, 0x05, 0x4b, 0xfe, 0x2f, 0x77, 0xfe, 0xd5, 0xb0, 0x7e, 0x86, 0x32, 0xe7, 0xc3, 0x5a, 0x99, - 0x57, 0xfc, 0x7a, 0x48, 0xc0, 0x4a, 0x45, 0xbf, 0x0f, 0xe5, 0xbd, 0x87, 0x3d, 0x8f, 0xfa, 0xe1, - 0x99, 0xbe, 0x0e, 0x79, 0x22, 0x08, 0x02, 0xad, 0x10, 0x25, 0xfd, 0x40, 0x0c, 0x4b, 0x2e, 0x4f, - 0x42, 0xe4, 0xa1, 0x61, 0xfa, 0x32, 0xa0, 0x54, 0x12, 0xda, 0xe3, 0x44, 0x1c, 0xf0, 0xf4, 0xc7, - 0x1a, 0xc0, 0x0d, 0xa2, 0xb0, 0x77, 0x60, 0x39, 0xbc, 0xc0, 0xc9, 0xbc, 0xf2, 0xff, 0x52, 0x7b, - 0x19, 0x27, 0xd9, 0x78, 0x5c, 0xfe, 0x33, 0x08, 0xeb, 0xfb, 0x50, 0x14, 0xd9, 0x8c, 0x17, 0x92, - 0x28, 0xb5, 0x6a, 0xcf, 0x49, 0xad, 0x61, 0x25, 0xca, 0x4c, 0xab, 0x44, 0xb1, 0xcb, 0xeb, 0x40, - 0x39, 0xd0, 0x0d, 0x8b, 0x63, 0x2a, 0x0b, 0x57, 0xa0, 0x10, 0x2e, 0x5c, 0x5a, 0x51, 0x4d, 0x51, - 0x08, 0x84, 0x95, 0x44, 0xcc, 0xda, 0x09, 0x24, 0x32, 0x73, 0x3a, 0x63, 0xb1, 0x4a, 0x91, 0x79, - 0x7e, 0xa5, 0x88, 0x59, 0xfa, 0x09, 0x54, 0xa6, 0x75, 0x52, 0x2f, 0x50, 0x3b, 0xd2, 0xbb, 0xa2, - 0xff, 0x4a, 0x83, 0x95, 0x38, 0x52, 0xfa, 0xe3, 0x4b, 0x6f, 0xe4, 0xf2, 0x9e, 0x23, 0xb6, 0x23, - 0xbf, 0xd1, 0x60, 0x2d, 0xb1, 0xb4, 0x99, 0x4e, 0x7c, 0x06, 0xa7, 0xe2, 0xc1, 0x91, 0x9d, 0x21, - 0x38, 0x1a, 0x50, 0xda, 0x57, 0x71, 0x4f, 0x2f, 0xef, 0xd2, 0xf4, 0x3f, 0x6b, 0xb0, 0x18, 0xd3, - 0x60, 0xe8, 0x3e, 0x2c, 0xf0, 0x1c, 0x68, 0xbb, 0x1d, 0xd9, 0x41, 0xa6, 0x2c, 0xec, 0x31, 0x90, - 0x68, 0x5d, 0xed, 0x00, 0x09, 0x87, 0x90, 0xa8, 0x0d, 0x79, 0x4a, 0x58, 0xdf, 0xf1, 0x65, 0xfa, - 0xbf, 0x92, 0xb2, 0x04, 0xfb, 0x86, 0xdf, 0x67, 0x41, 0x9e, 0xc4, 0x42, 0x1f, 0x4b, 0x1c, 0xfd, - 0x6f, 0x19, 0x28, 0xdf, 0x34, 0x8e, 0x88, 0x73, 0x48, 0x1c, 0x62, 0xfa, 0x1e, 0x45, 0x3f, 0x86, - 0x52, 0xd7, 0xf0, 0xcd, 0x13, 0x41, 0x0d, 0xfb, 0xe0, 0x56, 0x3a, 0x43, 0x09, 0xa4, 0xfa, 0x41, - 0x04, 0xb3, 0xe7, 0xfa, 0x74, 0xd0, 0x7c, 0x49, 0x2e, 0xac, 0x14, 0xe3, 0xe0, 0xb8, 0x35, 0xf1, - 0x78, 0x11, 0xdf, 0x7b, 0x0f, 0x7b, 0xbc, 0xe0, 0xcf, 0xfe, 0x66, 0x4a, 0xb8, 0x80, 0xc9, 0xfb, - 0x7d, 0x9b, 0x92, 0x2e, 0x71, 0xfd, 0xe8, 0xf1, 0x72, 0x30, 0x86, 0x8f, 0x27, 0x2c, 0xae, 0xbf, - 0x03, 0x2b, 0xe3, 0xce, 0xa3, 0x15, 0xc8, 0x9e, 0x92, 0x41, 0x10, 0x0b, 0x98, 0xff, 0x8b, 0xd6, - 0x20, 0x77, 0x66, 0x38, 0x7d, 0x99, 0x7f, 0x70, 0xf0, 0x71, 0x2d, 0x73, 0x55, 0xd3, 0x7f, 0xa7, - 0x41, 0x65, 0x9a, 0x23, 0xe8, 0xf3, 0x31, 0xa0, 0x66, 0x49, 0x7a, 0x95, 0x7d, 0x97, 0x0c, 0x02, - 0xd4, 0x3d, 0x28, 0x78, 0x3d, 0xfe, 0xdc, 0xf4, 0xa8, 0x8c, 0xf3, 0x37, 0xc2, 0xd8, 0xbd, 0x2d, - 0xe9, 0xe7, 0xc3, 0xda, 0xcb, 0x09, 0xf8, 0x90, 0x81, 0x95, 0x2a, 0x2f, 0x92, 0xc2, 0x1f, 0x5e, - 0xb8, 0x55, 0x91, 0xbc, 0x2b, 0x28, 0x58, 0x72, 0xf4, 0x3f, 0x6a, 0x30, 0x2f, 0x5a, 0xd9, 0xfb, - 0x50, 0xe0, 0xfb, 0x67, 0x19, 0xbe, 0x21, 0xfc, 0x4a, 0xfd, 0xf0, 0xe1, 0xda, 0x07, 0xc4, 0x37, - 0xa2, 0xfb, 0x15, 0x52, 0xb0, 0x42, 0x44, 0x18, 0x72, 0xb6, 0x4f, 0xba, 0xe1, 0x41, 0xbe, 0x39, - 0x15, 0x5a, 0x3e, 0xbb, 0xeb, 0xd8, 0x78, 0xb0, 0xf7, 0xd0, 0x27, 0x2e, 0x3f, 0x8c, 0x28, 0x19, - 0xec, 0x73, 0x0c, 0x1c, 0x40, 0xe9, 0xbf, 0xd7, 0x40, 0x99, 0xe2, 0xd7, 0x9d, 0x11, 0xe7, 0xf8, - 0xa6, 0xed, 0x9e, 0xca, 0x6d, 0x55, 0xee, 0x1c, 0x4a, 0x3a, 0x56, 0x12, 0x17, 0x95, 0xd8, 0xcc, - 0x8c, 0x25, 0xf6, 0x0a, 0x14, 0x4c, 0xcf, 0xf5, 0x6d, 0xb7, 0x3f, 0x91, 0x5f, 0x76, 0x25, 0x1d, - 0x2b, 0x09, 0xfd, 0x69, 0x16, 0x4a, 0xdc, 0xd7, 0xb0, 0xc6, 0x7f, 0x1d, 0xca, 0x4e, 0xfc, 0xf4, - 0xa4, 0xcf, 0x2f, 0x4b, 0x88, 0xe4, 0x7d, 0xc4, 0x49, 0x59, 0xae, 0x7c, 0x6c, 0x13, 0xc7, 0x52, - 0xca, 0x99, 0xa4, 0xf2, 0xf5, 0x38, 0x13, 0x27, 0x65, 0x79, 0x9e, 0x7d, 0xc0, 0xe3, 0x5a, 0x36, - 0x73, 0x6a, 0x6b, 0xbf, 0xc3, 0x89, 0x38, 0xe0, 0x5d, 0xb4, 0x3f, 0xf3, 0x33, 0xee, 0xcf, 0x35, - 0x58, 0xe2, 0x07, 0xe9, 0xf5, 0xfd, 0xb0, 0xe3, 0xcd, 0x89, 0xbe, 0x0b, 0x8d, 0x86, 0xb5, 0xa5, - 0xf7, 0x12, 0x1c, 0x3c, 0x26, 0x39, 0xb5, 0x7d, 0xc9, 0x7f, 0xd2, 0xf6, 0x85, 0xaf, 0xda, 0xb1, - 0xbb, 0xb6, 0x5f, 0x59, 0x10, 0x4e, 0xa8, 0x55, 0xdf, 0xe4, 0x44, 0x1c, 0xf0, 0x12, 0x47, 0x5a, - 0xb8, 0xf4, 0x48, 0xdf, 0x87, 0xe2, 0x81, 0x6d, 0x52, 0x8f, 0xaf, 0x85, 0x17, 0x26, 0x96, 0x68, - 0xec, 0x55, 0x02, 0x0f, 0xd7, 0x18, 0xf2, 0xb9, 0x2b, 0xae, 0xe1, 0x7a, 0x41, 0xfb, 0x9e, 0x8b, - 0x5c, 0xb9, 0xc5, 0x89, 0x38, 0xe0, 0x5d, 0x5b, 0xe3, 0xf5, 0xe8, 0x17, 0x8f, 0x6b, 0x73, 0x8f, - 0x1e, 0xd7, 0xe6, 0x3e, 0x7c, 0x2c, 0x6b, 0xd3, 0xbf, 0x00, 0xe0, 0xf6, 0xd1, 0x0f, 0x89, 0x19, - 0xc4, 0xfc, 0xe5, 0x13, 0x04, 0xde, 0x63, 0xc8, 0xc1, 0x95, 0x78, 0x6d, 0x67, 0xc6, 0x7a, 0x8c, - 0x18, 0x0f, 0x27, 0x24, 0x51, 0x03, 0x8a, 0x6a, 0xaa, 0x20, 0xe3, 0x7b, 0x55, 0xaa, 0x15, 0xd5, - 0xe8, 0x01, 0x47, 0x32, 0x89, 0x0b, 0x38, 0x7f, 0xe9, 0x05, 0x6c, 0x42, 0xb6, 0x6f, 0x5b, 0x22, - 0x24, 0x8a, 0xcd, 0x2f, 0x87, 0x09, 0xf0, 0xce, 0x7e, 0xeb, 0x7c, 0x58, 0x7b, 0x75, 0xda, 0x48, - 0xce, 0x1f, 0xf4, 0x08, 0xab, 0xdf, 0xd9, 0x6f, 0x61, 0xae, 0x7c, 0x51, 0x90, 0xe6, 0x67, 0x0c, - 0xd2, 0x6d, 0x00, 0xb9, 0x6a, 0xae, 0x1d, 0xc4, 0x86, 0x9a, 0xb0, 0xdc, 0x50, 0x1c, 0x1c, 0x93, - 0x42, 0x0c, 0x56, 0x4d, 0xfe, 0xce, 0xb4, 0x3d, 0x97, 0x1f, 0x3d, 0xf3, 0x8d, 0x6e, 0x30, 0x63, - 0x28, 0x6d, 0x7f, 0x31, 0x5d, 0xc6, 0xe4, 0x6a, 0xcd, 0x57, 0xa4, 0x99, 0xd5, 0xdd, 0x71, 0x30, - 0x3c, 0x89, 0x8f, 0x3c, 0x58, 0xb5, 0xe4, 0xcb, 0x28, 0x32, 0x5a, 0x9c, 0xd9, 0xe8, 0xcb, 0xdc, - 0x60, 0x6b, 0x1c, 0x08, 0x4f, 0x62, 0xa3, 0xef, 0xc3, 0x7a, 0x48, 0x9c, 0x7c, 0x9e, 0x56, 0x40, - 0xec, 0x54, 0x95, 0x3f, 0xdc, 0x5b, 0x53, 0xa5, 0xf0, 0x73, 0x10, 0x90, 0x05, 0x79, 0x27, 0xe8, - 0x2e, 0x4a, 0xa2, 0x22, 0x7c, 0x23, 0xdd, 0x2a, 0xa2, 0xe8, 0xaf, 0xc7, 0xbb, 0x0a, 0xf5, 0xfc, - 0x92, 0x0d, 0x85, 0xc4, 0x46, 0x0f, 0xa1, 0x64, 0xb8, 0xae, 0xe7, 0x1b, 0xc1, 0x83, 0x79, 0x51, - 0x98, 0xda, 0x99, 0xd9, 0xd4, 0x4e, 0x84, 0x31, 0xd6, 0xc5, 0xc4, 0x38, 0x38, 0x6e, 0x0a, 0x3d, - 0x80, 0x65, 0xef, 0x81, 0x4b, 0x28, 0x26, 0xc7, 0x84, 0x12, 0xd7, 0x24, 0xac, 0x52, 0x16, 0xd6, - 0xbf, 0x92, 0xd2, 0x7a, 0x42, 0x39, 0x0a, 0xe9, 0x24, 0x9d, 0xe1, 0x71, 0x2b, 0xa8, 0x0e, 0x70, - 0x6c, 0xbb, 0xb2, 0x17, 0xad, 0x2c, 0x45, 0x63, 0xb2, 0xeb, 0x8a, 0x8a, 0x63, 0x12, 0xe8, 0xab, - 0x50, 0x32, 0x9d, 0x3e, 0xf3, 0x49, 0x30, 0x8f, 0x5b, 0x16, 0x37, 0x48, 0xad, 0x6f, 0x37, 0x62, - 0xe1, 0xb8, 0x1c, 0x3a, 0x81, 0x45, 0x3b, 0xd6, 0xf4, 0x56, 0x56, 0x44, 0x2c, 0x6e, 0xcf, 0xdc, - 0xe9, 0xb2, 0xe6, 0x0a, 0xcf, 0x44, 0x71, 0x0a, 0x4e, 0x20, 0xaf, 0x7f, 0x0d, 0x4a, 0x9f, 0xb0, - 0x07, 0xe3, 0x3d, 0xdc, 0xf8, 0xd1, 0xcd, 0xd4, 0xc3, 0xfd, 0x25, 0x03, 0x4b, 0xc9, 0x0d, 0x57, - 0x6f, 0x1d, 0x6d, 0xea, 0x7c, 0x35, 0xcc, 0xca, 0xd9, 0xa9, 0x59, 0x59, 0x26, 0xbf, 0xf9, 0x17, - 0x49, 0x7e, 0xdb, 0x00, 0x46, 0xcf, 0x0e, 0xf3, 0x5e, 0x90, 0x47, 0x55, 0xe6, 0x8a, 0x26, 0x7e, - 0x38, 0x26, 0x25, 0x26, 0xa8, 0x9e, 0xeb, 0x53, 0xcf, 0x71, 0x08, 0x95, 0xc5, 0x34, 0x98, 0xa0, - 0x2a, 0x2a, 0x8e, 0x49, 0xa0, 0xeb, 0x80, 0x8e, 0x1c, 0xcf, 0x3c, 0x15, 0x5b, 0x10, 0xde, 0x73, - 0x91, 0x25, 0x0b, 0xc1, 0xe0, 0xaa, 0x39, 0xc1, 0xc5, 0x17, 0x68, 0xe8, 0x0b, 0x90, 0x6b, 0xf3, - 0xb6, 0x42, 0xbf, 0x0d, 0xc9, 0x99, 0x13, 0x7a, 0x27, 0xd8, 0x09, 0x4d, 0x0d, 0x85, 0x66, 0xdb, - 0x05, 0xfd, 0x0a, 0x14, 0xb1, 0xe7, 0xf9, 0x6d, 0xc3, 0x3f, 0x61, 0xa8, 0x06, 0xb9, 0x1e, 0xff, - 0x47, 0x8e, 0xfb, 0xc4, 0xac, 0x5a, 0x70, 0x70, 0x40, 0xd7, 0x7f, 0xa9, 0xc1, 0x2b, 0x53, 0xe7, - 0x8c, 0x7c, 0x47, 0x4d, 0xf5, 0x25, 0x5d, 0x52, 0x3b, 0x1a, 0xc9, 0xe1, 0x98, 0x14, 0xef, 0xc4, - 0x12, 0xc3, 0xc9, 0xf1, 0x4e, 0x2c, 0x61, 0x0d, 0x27, 0x65, 0xf5, 0x7f, 0x67, 0x20, 0x1f, 0x3c, - 0xcb, 0x3e, 0xe3, 0xe6, 0xfb, 0x75, 0xc8, 0x33, 0x61, 0x47, 0xba, 0xa7, 0xb2, 0x65, 0x60, 0x1d, - 0x4b, 0x2e, 0x6f, 0x62, 0xba, 0x84, 0x31, 0xa3, 0x13, 0x06, 0xaf, 0x6a, 0x62, 0x0e, 0x02, 0x32, - 0x0e, 0xf9, 0xe8, 0x6d, 0xfe, 0x0a, 0x35, 0x98, 0xea, 0x0b, 0xab, 0x21, 0x24, 0x16, 0xd4, 0xf3, - 0x61, 0x6d, 0x51, 0x82, 0x8b, 0x6f, 0x2c, 0xa5, 0xd1, 0x3d, 0x58, 0xb0, 0x88, 0x6f, 0xd8, 0x4e, - 0xd0, 0x0e, 0xa6, 0x9e, 0x5e, 0x06, 0x60, 0xad, 0x40, 0xb5, 0x59, 0xe2, 0x3e, 0xc9, 0x0f, 0x1c, - 0x02, 0xf2, 0x8b, 0x67, 0x7a, 0x56, 0xf0, 0x93, 0x42, 0x2e, 0xba, 0x78, 0xbb, 0x9e, 0x45, 0xb0, - 0xe0, 0xe8, 0x8f, 0x34, 0x28, 0x05, 0x48, 0xbb, 0x46, 0x9f, 0x11, 0xb4, 0xa5, 0x56, 0x11, 0x1c, - 0x77, 0x58, 0x93, 0xe7, 0xdf, 0x1b, 0xf4, 0xc8, 0xf9, 0xb0, 0x56, 0x14, 0x62, 0xfc, 0x43, 0x2d, - 0x20, 0xb6, 0x47, 0x99, 0x4b, 0xf6, 0xe8, 0x35, 0xc8, 0x89, 0xd6, 0x5b, 0x6e, 0xa6, 0x6a, 0xf4, - 0x44, 0x7b, 0x8e, 0x03, 0x9e, 0xfe, 0x71, 0x06, 0xca, 0x89, 0xc5, 0xa5, 0xe8, 0xea, 0xd4, 0xa8, - 0x24, 0x93, 0x62, 0xfc, 0x36, 0xfd, 0x87, 0xa0, 0xef, 0x42, 0xde, 0xe4, 0xeb, 0x0b, 0x7f, 0x89, - 0xdb, 0x9a, 0xe5, 0x28, 0xc4, 0xce, 0x44, 0x91, 0x24, 0x3e, 0x19, 0x96, 0x80, 0xe8, 0x06, 0xac, - 0x52, 0xe2, 0xd3, 0xc1, 0xce, 0xb1, 0x4f, 0x68, 0xbc, 0xff, 0xcf, 0x45, 0x7d, 0x0f, 0x1e, 0x17, - 0xc0, 0x93, 0x3a, 0x61, 0xaa, 0xcc, 0xbf, 0x40, 0xaa, 0xd4, 0x1d, 0x98, 0xff, 0x2f, 0xf6, 0xe8, - 0xdf, 0x83, 0x62, 0xd4, 0x45, 0x7d, 0xca, 0x26, 0xf5, 0x1f, 0x40, 0x81, 0x47, 0x63, 0xd8, 0xfd, - 0x5f, 0x52, 0x89, 0x92, 0x35, 0x22, 0x93, 0xa6, 0x46, 0xe8, 0x6f, 0x41, 0xf9, 0x4e, 0xcf, 0x9a, - 0xed, 0x57, 0x14, 0x7d, 0x1b, 0x82, 0x1f, 0x05, 0x79, 0x0a, 0x0e, 0x9e, 0xf9, 0xb1, 0x14, 0x1c, - 0x7f, 0xb3, 0x27, 0x7f, 0xaf, 0x01, 0xf1, 0xe6, 0xdc, 0x3b, 0x23, 0xae, 0xcf, 0x57, 0xc3, 0x8f, - 0x6d, 0x7c, 0x35, 0xe2, 0xee, 0x09, 0x0e, 0xba, 0x03, 0x79, 0x4f, 0xb4, 0x64, 0x72, 0xf0, 0x35, - 0xe3, 0x0c, 0x41, 0x85, 0x6a, 0xd0, 0xd7, 0x61, 0x09, 0xd6, 0xdc, 0x7c, 0xf2, 0xac, 0x3a, 0xf7, - 0xf4, 0x59, 0x75, 0xee, 0xa3, 0x67, 0xd5, 0xb9, 0x0f, 0x46, 0x55, 0xed, 0xc9, 0xa8, 0xaa, 0x3d, - 0x1d, 0x55, 0xb5, 0x8f, 0x46, 0x55, 0xed, 0xe3, 0x51, 0x55, 0x7b, 0xf4, 0x8f, 0xea, 0xdc, 0xbd, - 0xcc, 0xd9, 0xd6, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xab, 0xec, 0x02, 0x4a, 0x00, 0x21, 0x00, - 0x00, + // 2423 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4f, 0x6c, 0x1b, 0x59, + 0x19, 0xcf, 0xd8, 0xb1, 0x63, 0x7f, 0x8e, 0xf3, 0xe7, 0x6d, 0x0b, 0xde, 0x48, 0xd8, 0xd9, 0x59, + 0xb4, 0xca, 0x42, 0xd7, 0x26, 0x29, 0xac, 0x4a, 0x81, 0x42, 0x1c, 0xa7, 0x55, 0xb4, 0x4d, 0x63, + 0xbd, 0x6c, 0x8b, 0x28, 0x15, 0x62, 0x32, 0xf3, 0xe2, 0x0c, 0x19, 0xcf, 0x78, 0xdf, 0x1b, 0xa7, + 0x35, 0x1c, 0xd8, 0x03, 0x08, 0x0e, 0x08, 0xf5, 0xc8, 0x09, 0x6d, 0x05, 0x17, 0xae, 0x9c, 0xb8, + 0xc0, 0x09, 0x89, 0x1e, 0x57, 0xe2, 0xb2, 0x07, 0x64, 0x6d, 0xcd, 0x81, 0x13, 0xe2, 0x9e, 0x03, + 0x42, 0xef, 0xcd, 0x9b, 0x99, 0x37, 0x76, 0xdd, 0x8c, 0xe9, 0x82, 0xf6, 0x14, 0xcf, 0xf7, 0xff, + 0x7d, 0xef, 0x7b, 0xbf, 0xf7, 0x7d, 0x2f, 0xb0, 0x7f, 0x7a, 0x8d, 0xd5, 0x6d, 0xaf, 0x71, 0xda, + 0x3f, 0x22, 0xd4, 0x25, 0x3e, 0x61, 0x8d, 0x33, 0xe2, 0x5a, 0x1e, 0x6d, 0x48, 0x86, 0xd1, 0xb3, + 0xbb, 0x86, 0x79, 0x62, 0xbb, 0x84, 0x0e, 0x1a, 0xbd, 0xd3, 0x0e, 0x27, 0xb0, 0x46, 0x97, 0xf8, + 0x46, 0xe3, 0x6c, 0xb3, 0xd1, 0x21, 0x2e, 0xa1, 0x86, 0x4f, 0xac, 0x7a, 0x8f, 0x7a, 0xbe, 0x87, + 0x3e, 0x1f, 0x68, 0xd5, 0x55, 0xad, 0x7a, 0xef, 0xb4, 0xc3, 0x09, 0xac, 0xce, 0xb5, 0xea, 0x67, + 0x9b, 0x6b, 0x6f, 0x75, 0x6c, 0xff, 0xa4, 0x7f, 0x54, 0x37, 0xbd, 0x6e, 0xa3, 0xe3, 0x75, 0xbc, + 0x86, 0x50, 0x3e, 0xea, 0x1f, 0x8b, 0x2f, 0xf1, 0x21, 0x7e, 0x05, 0x46, 0xd7, 0xa6, 0x86, 0x42, + 0xfb, 0xae, 0x6f, 0x77, 0xc9, 0x78, 0x14, 0x6b, 0x6f, 0x5f, 0xa4, 0xc0, 0xcc, 0x13, 0xd2, 0x35, + 0xc6, 0xf5, 0xf4, 0xbf, 0x64, 0xa1, 0xb0, 0xdd, 0xde, 0xbb, 0x45, 0xbd, 0x7e, 0x0f, 0xad, 0xc3, + 0xbc, 0x6b, 0x74, 0x49, 0x45, 0x5b, 0xd7, 0x36, 0x8a, 0xcd, 0xc5, 0xa7, 0xc3, 0xda, 0xdc, 0x68, + 0x58, 0x9b, 0xbf, 0x63, 0x74, 0x09, 0x16, 0x1c, 0xe4, 0x40, 0xe1, 0x8c, 0x50, 0x66, 0x7b, 0x2e, + 0xab, 0x64, 0xd6, 0xb3, 0x1b, 0xa5, 0xad, 0x1b, 0xf5, 0x34, 0xeb, 0xaf, 0x0b, 0x07, 0xf7, 0x02, + 0xd5, 0x9b, 0x1e, 0x6d, 0xd9, 0xcc, 0xf4, 0xce, 0x08, 0x1d, 0x34, 0x57, 0xa4, 0x97, 0x82, 0x64, + 0x32, 0x1c, 0x79, 0x40, 0x3f, 0xd1, 0x60, 0xa5, 0x47, 0xc9, 0x31, 0xa1, 0x94, 0x58, 0x92, 0x5f, + 0xc9, 0xae, 0x6b, 0x9f, 0x80, 0xdb, 0x8a, 0x74, 0xbb, 0xd2, 0x1e, 0xb3, 0x8f, 0x27, 0x3c, 0xa2, + 0xdf, 0x68, 0xb0, 0xc6, 0x08, 0x3d, 0x23, 0x74, 0xdb, 0xb2, 0x28, 0x61, 0xac, 0x39, 0xd8, 0x71, + 0x6c, 0xe2, 0xfa, 0x3b, 0x7b, 0x2d, 0xcc, 0x2a, 0xf3, 0x22, 0x0f, 0xdf, 0x4c, 0x17, 0xd0, 0xe1, + 0x34, 0x3b, 0x4d, 0x5d, 0x46, 0xb4, 0x36, 0x55, 0x84, 0xe1, 0x17, 0x84, 0xa1, 0x1f, 0xc3, 0x62, + 0xb8, 0x91, 0xb7, 0x6d, 0xe6, 0xa3, 0x7b, 0x90, 0xef, 0xf0, 0x0f, 0x56, 0xd1, 0x44, 0x80, 0xf5, + 0x74, 0x01, 0x86, 0x36, 0x9a, 0x4b, 0x32, 0x9e, 0xbc, 0xf8, 0x64, 0x58, 0x5a, 0xd3, 0xff, 0x98, + 0x85, 0xd2, 0x76, 0x7b, 0x0f, 0x13, 0xe6, 0xf5, 0xa9, 0x49, 0x52, 0x14, 0xcd, 0x16, 0x00, 0xff, + 0xcb, 0x7a, 0x86, 0x49, 0xac, 0x4a, 0x66, 0x5d, 0xdb, 0x28, 0x34, 0x91, 0x94, 0x83, 0x3b, 0x11, + 0x07, 0x2b, 0x52, 0xdc, 0xea, 0xa9, 0xed, 0x5a, 0x62, 0xb7, 0x15, 0xab, 0xef, 0xd8, 0xae, 0x85, + 0x05, 0x07, 0xdd, 0x86, 0xdc, 0x19, 0xa1, 0x47, 0x3c, 0xff, 0xbc, 0x20, 0xbe, 0x98, 0x6e, 0x79, + 0xf7, 0xb8, 0x4a, 0xb3, 0x38, 0x1a, 0xd6, 0x72, 0xe2, 0x27, 0x0e, 0x8c, 0xa0, 0x3a, 0x00, 0x3b, + 0xf1, 0xa8, 0x2f, 0xc2, 0xa9, 0xe4, 0xd6, 0xb3, 0x1b, 0xc5, 0xe6, 0x12, 0x8f, 0xef, 0x30, 0xa2, + 0x62, 0x45, 0x02, 0x5d, 0x83, 0x45, 0x66, 0xbb, 0x9d, 0xbe, 0x63, 0x50, 0x4e, 0xa8, 0xe4, 0x45, + 0x9c, 0x97, 0x64, 0x9c, 0x8b, 0x87, 0x0a, 0x0f, 0x27, 0x24, 0xb9, 0x27, 0xd3, 0xf0, 0x49, 0xc7, + 0xa3, 0x36, 0x61, 0x95, 0x85, 0xd8, 0xd3, 0x4e, 0x44, 0xc5, 0x8a, 0x04, 0x7a, 0x1d, 0x72, 0x22, + 0xf3, 0x95, 0x82, 0x70, 0x51, 0x96, 0x2e, 0x72, 0x62, 0x5b, 0x70, 0xc0, 0x43, 0x6f, 0xc2, 0x82, + 0x3c, 0x35, 0x95, 0xa2, 0x10, 0x5b, 0x96, 0x62, 0x0b, 0x61, 0x59, 0x87, 0x7c, 0xfd, 0xf7, 0x1a, + 0x2c, 0x2b, 0xfb, 0x27, 0x6a, 0xe5, 0x1a, 0x2c, 0x76, 0x94, 0x93, 0x22, 0xf7, 0x32, 0x5a, 0x8d, + 0x7a, 0x8a, 0x70, 0x42, 0x12, 0x11, 0x28, 0x52, 0x69, 0x29, 0x44, 0x84, 0xcd, 0xd4, 0x85, 0x16, + 0xc6, 0x10, 0x7b, 0x52, 0x88, 0x0c, 0xc7, 0x96, 0xf5, 0x7f, 0x68, 0xa2, 0xe8, 0x42, 0x8c, 0x40, + 0x1b, 0x0a, 0x0e, 0x69, 0x22, 0x85, 0x8b, 0x53, 0x30, 0xe4, 0x82, 0xc3, 0x9b, 0xf9, 0x54, 0x1c, + 0xde, 0xeb, 0x85, 0x5f, 0x7d, 0x50, 0x9b, 0x7b, 0xff, 0x6f, 0xeb, 0x73, 0xfa, 0x55, 0x28, 0xef, + 0x50, 0x62, 0xf8, 0xe4, 0xa0, 0xe7, 0x8b, 0x05, 0xe8, 0x90, 0xb7, 0xe8, 0x00, 0xf7, 0x5d, 0xb9, + 0x50, 0xe0, 0x67, 0xb2, 0x25, 0x28, 0x58, 0x72, 0xf4, 0x9f, 0x65, 0xa1, 0xdc, 0x22, 0x0e, 0x89, + 0xb5, 0x6e, 0x02, 0xea, 0x50, 0xc3, 0x24, 0x6d, 0x42, 0x6d, 0xcf, 0x3a, 0x24, 0xa6, 0xe7, 0x5a, + 0x4c, 0xec, 0x6b, 0xb6, 0xf9, 0x99, 0xd1, 0xb0, 0x86, 0x6e, 0x4d, 0x70, 0xf1, 0x73, 0x34, 0x90, + 0x03, 0xe5, 0x1e, 0x15, 0xbf, 0x6d, 0x5f, 0xa2, 0x3e, 0x3f, 0x6d, 0x57, 0xd3, 0x25, 0xac, 0xad, + 0xaa, 0x36, 0x57, 0x47, 0xc3, 0x5a, 0x39, 0x41, 0xc2, 0x49, 0xe3, 0xe8, 0x5b, 0xb0, 0xe2, 0xd1, + 0xde, 0x89, 0xe1, 0xb6, 0x48, 0x8f, 0xb8, 0x16, 0x71, 0x7d, 0x26, 0x10, 0xa0, 0xd0, 0xbc, 0xc4, + 0xb1, 0xfa, 0x60, 0x8c, 0x87, 0x27, 0xa4, 0xd1, 0x7d, 0x58, 0xed, 0x51, 0xaf, 0x67, 0x74, 0x0c, + 0x6e, 0xb1, 0xed, 0x39, 0xb6, 0x39, 0x10, 0x08, 0x51, 0x6c, 0x5e, 0x19, 0x0d, 0x6b, 0xab, 0xed, + 0x71, 0xe6, 0xf9, 0xb0, 0xf6, 0x8a, 0x48, 0x1d, 0xa7, 0xc4, 0x4c, 0x3c, 0x69, 0x46, 0xd9, 0x89, + 0xdc, 0xd4, 0x9d, 0xd8, 0x83, 0x42, 0xab, 0x4f, 0x85, 0x16, 0xfa, 0x06, 0x14, 0x2c, 0xf9, 0x5b, + 0x66, 0xfe, 0xb5, 0xf0, 0xb2, 0x0b, 0x65, 0xce, 0x87, 0xb5, 0x32, 0xbf, 0x9e, 0xeb, 0x21, 0x01, + 0x47, 0x2a, 0xfa, 0x03, 0x28, 0xef, 0x3e, 0xea, 0x79, 0xd4, 0x0f, 0xf7, 0xf4, 0x0d, 0xc8, 0x13, + 0x41, 0x10, 0xd6, 0x0a, 0x31, 0x42, 0x07, 0x62, 0x58, 0x72, 0x39, 0x62, 0x90, 0x47, 0x86, 0xe9, + 0x4b, 0xa8, 0x8d, 0x10, 0x63, 0x97, 0x13, 0x71, 0xc0, 0xd3, 0x0f, 0x00, 0x6e, 0x91, 0xc8, 0xf4, + 0x36, 0x2c, 0x87, 0x87, 0x2d, 0x89, 0x01, 0x9f, 0x95, 0xca, 0xcb, 0x38, 0xc9, 0xc6, 0xe3, 0xf2, + 0xfa, 0x03, 0x28, 0x0a, 0x9c, 0xe0, 0x10, 0x1d, 0x83, 0x96, 0xf6, 0x02, 0xd0, 0x0a, 0x31, 0x3e, + 0x33, 0x0d, 0xe3, 0x95, 0x63, 0xe1, 0x40, 0x39, 0xd0, 0x0d, 0xaf, 0x9d, 0x54, 0x1e, 0xae, 0x40, + 0x21, 0x0c, 0x53, 0x7a, 0x89, 0xda, 0x8d, 0xd0, 0x10, 0x8e, 0x24, 0x14, 0x6f, 0x27, 0x90, 0xc0, + 0xbc, 0x74, 0xce, 0x14, 0x0c, 0xce, 0xbc, 0x18, 0x83, 0x15, 0x4f, 0x3f, 0x86, 0xca, 0xb4, 0x1e, + 0xe5, 0x25, 0x50, 0x39, 0x7d, 0x28, 0xfa, 0x2f, 0x35, 0x58, 0x51, 0x2d, 0xa5, 0xdf, 0xbe, 0xf4, + 0x4e, 0x2e, 0xbe, 0xcd, 0x95, 0x8c, 0xfc, 0x5a, 0x83, 0x4b, 0x89, 0xa5, 0xcd, 0xb4, 0xe3, 0x33, + 0x04, 0xa5, 0x16, 0x47, 0x76, 0x86, 0xe2, 0x68, 0x40, 0x69, 0xcf, 0xb5, 0x7d, 0xdb, 0x70, 0xec, + 0x1f, 0x12, 0x7a, 0x71, 0xff, 0xa3, 0xff, 0x49, 0x83, 0x45, 0x45, 0x83, 0xa1, 0x07, 0xb0, 0xc0, + 0x01, 0xcb, 0x76, 0x3b, 0xb2, 0x37, 0x4b, 0x79, 0x65, 0x2a, 0x46, 0xe2, 0x75, 0xb5, 0x03, 0x4b, + 0x38, 0x34, 0x89, 0xda, 0x90, 0xa7, 0x84, 0xf5, 0x1d, 0x5f, 0x62, 0xf5, 0x95, 0x94, 0x97, 0x9b, + 0x6f, 0xf8, 0x7d, 0x16, 0x80, 0x1a, 0x16, 0xfa, 0x58, 0xda, 0xd1, 0xff, 0x9a, 0x81, 0xf2, 0x6d, + 0xe3, 0x88, 0x38, 0x87, 0xc4, 0x21, 0xa6, 0xef, 0x51, 0xf4, 0x23, 0x28, 0x75, 0x0d, 0xdf, 0x3c, + 0x11, 0xd4, 0xb0, 0xc3, 0x6c, 0xa5, 0x73, 0x94, 0xb0, 0x54, 0xdf, 0x8f, 0xcd, 0xec, 0xba, 0x3e, + 0x1d, 0x34, 0x5f, 0x91, 0x0b, 0x2b, 0x29, 0x1c, 0xac, 0x7a, 0x13, 0x63, 0x81, 0xf8, 0xde, 0x7d, + 0xd4, 0xe3, 0x57, 0xe9, 0xec, 0xd3, 0x48, 0x22, 0x04, 0x4c, 0xde, 0xeb, 0xdb, 0x94, 0x74, 0x89, + 0xeb, 0xc7, 0x63, 0xc1, 0xfe, 0x98, 0x7d, 0x3c, 0xe1, 0x71, 0xed, 0x06, 0xac, 0x8c, 0x07, 0x8f, + 0x56, 0x20, 0x7b, 0x4a, 0x06, 0x41, 0x2d, 0x60, 0xfe, 0x13, 0x5d, 0x82, 0xdc, 0x99, 0xe1, 0xf4, + 0x25, 0xfe, 0xe0, 0xe0, 0xe3, 0x7a, 0xe6, 0x9a, 0xa6, 0xff, 0x56, 0x83, 0xca, 0xb4, 0x40, 0xd0, + 0xe7, 0x14, 0x43, 0xcd, 0x92, 0x8c, 0x2a, 0xfb, 0x0e, 0x19, 0x04, 0x56, 0x77, 0xa1, 0xe0, 0xf5, + 0xf8, 0x20, 0xe7, 0x51, 0x59, 0xe7, 0x6f, 0x86, 0xb5, 0x7b, 0x20, 0xe9, 0xe7, 0xc3, 0xda, 0xe5, + 0x84, 0xf9, 0x90, 0x81, 0x23, 0x55, 0x7e, 0xa3, 0x89, 0x78, 0xf8, 0x2d, 0x1b, 0xdd, 0x68, 0xf7, + 0x04, 0x05, 0x4b, 0x8e, 0xfe, 0x07, 0x0d, 0xe6, 0x45, 0x93, 0xf8, 0x00, 0x0a, 0x3c, 0x7f, 0x96, + 0xe1, 0x1b, 0x22, 0xae, 0xd4, 0x23, 0x05, 0xd7, 0xde, 0x27, 0xbe, 0x11, 0x9f, 0xaf, 0x90, 0x82, + 0x23, 0x8b, 0x08, 0x43, 0xce, 0xf6, 0x49, 0x37, 0xdc, 0xc8, 0xb7, 0xa6, 0x9a, 0x96, 0x03, 0x6d, + 0x1d, 0x1b, 0x0f, 0x77, 0x1f, 0xf9, 0xc4, 0xe5, 0x9b, 0x11, 0x83, 0xc1, 0x1e, 0xb7, 0x81, 0x03, + 0x53, 0xfa, 0xef, 0x34, 0x88, 0x5c, 0xf1, 0xe3, 0xce, 0x88, 0x73, 0x7c, 0xdb, 0x76, 0x4f, 0x65, + 0x5a, 0xa3, 0x70, 0x0e, 0x25, 0x1d, 0x47, 0x12, 0xcf, 0xbb, 0x10, 0x33, 0xb3, 0x5d, 0x88, 0xdc, + 0xa1, 0xe9, 0xb9, 0xbe, 0xed, 0xf6, 0x27, 0xf0, 0x65, 0x47, 0xd2, 0x71, 0x24, 0xa1, 0xff, 0x3b, + 0x03, 0x25, 0x1e, 0x6b, 0x78, 0x23, 0x7f, 0x0d, 0xca, 0x8e, 0xba, 0x7b, 0x32, 0xe6, 0xcb, 0xd2, + 0x44, 0xf2, 0x3c, 0xe2, 0xa4, 0x2c, 0x57, 0x3e, 0xb6, 0x89, 0x63, 0x45, 0xca, 0x99, 0xa4, 0xf2, + 0x4d, 0x95, 0x89, 0x93, 0xb2, 0x1c, 0x67, 0x1f, 0xf2, 0xba, 0x96, 0x9d, 0x57, 0x94, 0xda, 0x6f, + 0x73, 0x22, 0x0e, 0x78, 0xcf, 0xcb, 0xcf, 0xfc, 0x8c, 0xf9, 0xb9, 0x0e, 0x4b, 0x7c, 0x23, 0xbd, + 0xbe, 0x1f, 0xb6, 0xa7, 0x39, 0xd1, 0x24, 0xa1, 0xd1, 0xb0, 0xb6, 0xf4, 0x6e, 0x82, 0x83, 0xc7, + 0x24, 0x79, 0x8c, 0x8e, 0xdd, 0xb5, 0xfd, 0xca, 0x82, 0x50, 0x89, 0x62, 0xbc, 0xcd, 0x89, 0x38, + 0xe0, 0x25, 0x36, 0xa0, 0x70, 0xe1, 0x06, 0xbc, 0x07, 0xc5, 0x7d, 0xdb, 0xa4, 0x1e, 0xf7, 0xcc, + 0xaf, 0x11, 0x96, 0xe8, 0x99, 0x23, 0xb8, 0x0d, 0x23, 0x0a, 0xf9, 0x3c, 0x14, 0xd7, 0x70, 0xbd, + 0xa0, 0x33, 0xce, 0xc5, 0xa1, 0xdc, 0xe1, 0x44, 0x1c, 0xf0, 0xae, 0x5f, 0xe2, 0xb7, 0xc7, 0xcf, + 0x9f, 0xd4, 0xe6, 0x1e, 0x3f, 0xa9, 0xcd, 0x7d, 0xf0, 0x44, 0xde, 0x24, 0xff, 0x04, 0x80, 0x83, + 0xa3, 0x1f, 0x10, 0x33, 0xa8, 0xd0, 0x8b, 0x27, 0x69, 0xde, 0x11, 0xc8, 0x07, 0x1c, 0x31, 0x75, + 0x66, 0xc6, 0x3a, 0x02, 0x85, 0x87, 0x13, 0x92, 0xa8, 0x01, 0xc5, 0x68, 0xba, 0x96, 0xd5, 0xb8, + 0x2a, 0xd5, 0x8a, 0xd1, 0x08, 0x8e, 0x63, 0x99, 0xc4, 0x71, 0x99, 0xbf, 0xf0, 0xb8, 0x34, 0x21, + 0xdb, 0xb7, 0x2d, 0xb1, 0x81, 0xc5, 0xe6, 0x97, 0x42, 0xb8, 0xba, 0xbb, 0xd7, 0x3a, 0x1f, 0xd6, + 0x5e, 0x9b, 0xf6, 0x34, 0xe5, 0x0f, 0x7a, 0x84, 0xd5, 0xef, 0xee, 0xb5, 0x30, 0x57, 0x7e, 0x5e, + 0x49, 0xe5, 0x67, 0x2c, 0xa9, 0x2d, 0x00, 0xb9, 0x6a, 0xae, 0x1d, 0xd4, 0x46, 0xf4, 0xd2, 0x70, + 0x2b, 0xe2, 0x60, 0x45, 0x0a, 0x31, 0x58, 0x35, 0xf9, 0xc0, 0x65, 0x7b, 0x2e, 0xdf, 0x7a, 0xe6, + 0x1b, 0xdd, 0x60, 0xd6, 0x2e, 0x6d, 0x7d, 0x21, 0x1d, 0xbe, 0x71, 0xb5, 0xe6, 0xab, 0xd2, 0xcd, + 0xea, 0xce, 0xb8, 0x31, 0x3c, 0x69, 0x1f, 0x79, 0xb0, 0x6a, 0xc9, 0xa1, 0x23, 0x76, 0x5a, 0x9c, + 0xd9, 0xe9, 0x65, 0xee, 0xb0, 0x35, 0x6e, 0x08, 0x4f, 0xda, 0x46, 0xdf, 0x83, 0xb5, 0x90, 0x38, + 0x39, 0xf9, 0x55, 0x40, 0x64, 0xaa, 0xca, 0x07, 0xd8, 0xd6, 0x54, 0x29, 0xfc, 0x02, 0x0b, 0xc8, + 0x82, 0xbc, 0x13, 0xf4, 0x02, 0x25, 0x81, 0xdf, 0x5f, 0x4f, 0xb7, 0x8a, 0xb8, 0xfa, 0xeb, 0x6a, + 0x0f, 0x10, 0x4d, 0x36, 0xf2, 0xfa, 0x97, 0xb6, 0xd1, 0x23, 0x28, 0x19, 0xae, 0xeb, 0xf9, 0x46, + 0x30, 0x8b, 0x2e, 0x0a, 0x57, 0xdb, 0x33, 0xbb, 0xda, 0x8e, 0x6d, 0x8c, 0xf5, 0x1c, 0x0a, 0x07, + 0xab, 0xae, 0xd0, 0x43, 0x58, 0xf6, 0x1e, 0xba, 0x84, 0x62, 0x72, 0x4c, 0x28, 0x71, 0x4d, 0xc2, + 0x2a, 0x65, 0xe1, 0xfd, 0xcb, 0x29, 0xbd, 0x27, 0x94, 0xe3, 0x92, 0x4e, 0xd2, 0x19, 0x1e, 0xf7, + 0x82, 0xea, 0x00, 0xc7, 0xb6, 0x2b, 0x3b, 0xc7, 0xca, 0x52, 0xfc, 0x5c, 0x74, 0x33, 0xa2, 0x62, + 0x45, 0x02, 0x7d, 0x05, 0x4a, 0xa6, 0xd3, 0x67, 0x3e, 0x09, 0xde, 0xa5, 0x96, 0xc5, 0x09, 0x8a, + 0xd6, 0xb7, 0x13, 0xb3, 0xb0, 0x2a, 0x87, 0x4e, 0x60, 0xd1, 0x56, 0x5a, 0xd4, 0xca, 0x8a, 0xa8, + 0xc5, 0xad, 0x99, 0xfb, 0x52, 0xd6, 0x5c, 0xe1, 0x48, 0xa4, 0x52, 0x70, 0xc2, 0xf2, 0xda, 0x57, + 0xa1, 0xf4, 0x5f, 0x76, 0x4c, 0xbc, 0xe3, 0x1a, 0xdf, 0xba, 0x99, 0x3a, 0xae, 0x3f, 0x67, 0x60, + 0x29, 0x99, 0xf0, 0x68, 0x32, 0xd1, 0xa6, 0xbe, 0x33, 0x86, 0xa8, 0x9c, 0x9d, 0x8a, 0xca, 0x12, + 0xfc, 0xe6, 0x5f, 0x06, 0xfc, 0xb6, 0x00, 0x8c, 0x9e, 0x1d, 0xe2, 0x5e, 0x80, 0xa3, 0x11, 0x72, + 0xc5, 0x2f, 0x5f, 0x58, 0x91, 0x12, 0x2f, 0x89, 0x9e, 0xeb, 0x53, 0xcf, 0x71, 0x08, 0x15, 0x58, + 0x59, 0x90, 0x2f, 0x89, 0x11, 0x15, 0x2b, 0x12, 0xe8, 0x26, 0xa0, 0x23, 0xc7, 0x33, 0x4f, 0x45, + 0x0a, 0xc2, 0x73, 0x2e, 0x50, 0xb2, 0x10, 0xbc, 0x09, 0x35, 0x27, 0xb8, 0xf8, 0x39, 0x1a, 0xfa, + 0x02, 0xe4, 0xda, 0xbc, 0x09, 0xd0, 0x0f, 0x20, 0xf9, 0x9c, 0x83, 0x6e, 0x04, 0x99, 0xd0, 0xa2, + 0xf7, 0x96, 0xd9, 0xb2, 0xa0, 0x5f, 0x81, 0x22, 0xf6, 0x3c, 0xbf, 0x6d, 0xf8, 0x27, 0x0c, 0xd5, + 0x20, 0xd7, 0xe3, 0x3f, 0xe4, 0xbb, 0x97, 0x78, 0xb3, 0x15, 0x1c, 0x1c, 0xd0, 0xf5, 0x5f, 0x68, + 0xf0, 0xea, 0xd4, 0xf7, 0x36, 0x9e, 0x51, 0x33, 0xfa, 0x92, 0x21, 0x45, 0x19, 0x8d, 0xe5, 0xb0, + 0x22, 0xc5, 0xfb, 0xa6, 0xc4, 0x23, 0xdd, 0x78, 0xdf, 0x94, 0xf0, 0x86, 0x93, 0xb2, 0xfa, 0xbf, + 0x32, 0x90, 0x0f, 0x86, 0xa8, 0xff, 0x71, 0xab, 0xfc, 0x06, 0xe4, 0x99, 0xf0, 0x23, 0xc3, 0x8b, + 0xd0, 0x32, 0xf0, 0x8e, 0x25, 0x97, 0x37, 0x31, 0x5d, 0xc2, 0x98, 0xd1, 0x09, 0x8b, 0x37, 0x6a, + 0x62, 0xf6, 0x03, 0x32, 0x0e, 0xf9, 0xe8, 0x6d, 0x3e, 0x33, 0x1a, 0x2c, 0xea, 0xe2, 0xaa, 0xa1, + 0x49, 0x2c, 0xa8, 0xe7, 0xc3, 0xda, 0xa2, 0x34, 0x2e, 0xbe, 0xb1, 0x94, 0x46, 0xf7, 0x61, 0xc1, + 0x22, 0xbe, 0x61, 0x3b, 0x41, 0xf3, 0x96, 0xfa, 0x61, 0x30, 0x30, 0xd6, 0x0a, 0x54, 0x9b, 0x25, + 0x1e, 0x93, 0xfc, 0xc0, 0xa1, 0x41, 0x7e, 0xf0, 0x4c, 0xcf, 0x0a, 0x9e, 0xd6, 0x73, 0xf1, 0xc1, + 0xdb, 0xf1, 0x2c, 0x82, 0x05, 0x47, 0x7f, 0xac, 0x41, 0x29, 0xb0, 0xb4, 0x63, 0xf4, 0x19, 0x41, + 0x9b, 0xd1, 0x2a, 0x82, 0xed, 0x0e, 0xef, 0xe4, 0xf9, 0x77, 0x07, 0x3d, 0x72, 0x3e, 0xac, 0x15, + 0x85, 0x18, 0xff, 0x88, 0x16, 0xa0, 0xe4, 0x28, 0x73, 0x41, 0x8e, 0x5e, 0x87, 0x9c, 0x68, 0x94, + 0x65, 0x32, 0xa3, 0x46, 0x4f, 0x34, 0xd3, 0x38, 0xe0, 0xe9, 0x1f, 0x67, 0xa0, 0x9c, 0x58, 0x5c, + 0x8a, 0xae, 0x2e, 0x7a, 0xd8, 0xc8, 0xa4, 0x78, 0x2c, 0x9b, 0xfe, 0x0f, 0x91, 0xef, 0x40, 0xde, + 0xe4, 0xeb, 0x0b, 0xff, 0x23, 0xb5, 0x39, 0xcb, 0x56, 0x88, 0xcc, 0xc4, 0x95, 0x24, 0x3e, 0x19, + 0x96, 0x06, 0xd1, 0x2d, 0x58, 0xa5, 0xc4, 0xa7, 0x83, 0xed, 0x63, 0x9f, 0x50, 0xb5, 0x5b, 0xcf, + 0xc5, 0x7d, 0x0f, 0x1e, 0x17, 0xc0, 0x93, 0x3a, 0x21, 0x54, 0xe6, 0x5f, 0x02, 0x2a, 0x75, 0x07, + 0xe6, 0xff, 0x8f, 0x3d, 0xfa, 0x77, 0xa1, 0x18, 0x77, 0x51, 0x9f, 0xb0, 0x4b, 0xfd, 0xfb, 0x50, + 0xe0, 0xd5, 0x18, 0x76, 0xff, 0x17, 0xdc, 0x44, 0xc9, 0x3b, 0x22, 0x93, 0xe6, 0x8e, 0xd0, 0xaf, + 0x42, 0xf9, 0x6e, 0xcf, 0x9a, 0xf1, 0xdf, 0x09, 0x5b, 0x10, 0xfc, 0x73, 0x8c, 0x43, 0x70, 0x30, + 0x94, 0x2b, 0x10, 0xac, 0x4e, 0xd8, 0xca, 0xab, 0xd8, 0x4f, 0x35, 0x00, 0x31, 0x21, 0xee, 0x9e, + 0x11, 0xd7, 0xe7, 0xab, 0xe1, 0xdb, 0x36, 0xbe, 0x1a, 0x71, 0xf6, 0x04, 0x07, 0xdd, 0x85, 0xbc, + 0x27, 0x5a, 0x32, 0xf9, 0x4c, 0x35, 0xe3, 0xc4, 0x1f, 0x95, 0x6a, 0xd0, 0xd7, 0x61, 0x69, 0xac, + 0xb9, 0xf1, 0xf4, 0x59, 0x75, 0xee, 0xc3, 0x67, 0xd5, 0xb9, 0x8f, 0x9e, 0x55, 0xe7, 0xde, 0x1f, + 0x55, 0xb5, 0xa7, 0xa3, 0xaa, 0xf6, 0xe1, 0xa8, 0xaa, 0x7d, 0x34, 0xaa, 0x6a, 0x1f, 0x8f, 0xaa, + 0xda, 0xe3, 0xbf, 0x57, 0xe7, 0xee, 0x67, 0xce, 0x36, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xed, + 0xf9, 0xac, 0x4b, 0x08, 0x20, 0x00, 0x00, } diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index 989f076a10..cd8af72122 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -133,10 +133,6 @@ message CreateOptions { // - All: all dry run stages will be processed // +optional repeated string dryRun = 1; - - // If IncludeUninitialized is specified, the object may be - // returned without completing initialization. - optional bool includeUninitialized = 2; } // DeleteOptions may be provided when deleting an API object. @@ -203,10 +199,6 @@ message GetOptions { // - if it's 0, then we simply return what we currently have in cache, no guarantee; // - if set to non zero, then the result is at least as fresh as given rv. optional string resourceVersion = 1; - - // If true, partially initialized resources are included in the response. - // +optional - optional bool includeUninitialized = 2; } // GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying @@ -380,10 +372,6 @@ message ListOptions { // +optional optional string fieldSelector = 2; - // If true, partially initialized resources are included in the response. - // +optional - optional bool includeUninitialized = 6; - // Watch for changes to the described resources and return them as a stream of // add, update, and remove notifications. Specify resourceVersion. // +optional @@ -602,6 +590,8 @@ message ObjectMeta { // When an object is created, the system will populate this list with the current set of initializers. // Only privileged users may set or modify this list. Once it is empty, it may not be modified further // by any user. + // + // DEPRECATED - initializers are an alpha field and will be removed in v1.15. optional Initializers initializers = 16; // Must be empty before the object is deleted from the registry. Each entry diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 8f488ba7ea..5e6a2b9a64 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -235,6 +235,8 @@ type ObjectMeta struct { // When an object is created, the system will populate this list with the current set of initializers. // Only privileged users may set or modify this list. Once it is empty, it may not be modified further // by any user. + // + // DEPRECATED - initializers are an alpha field and will be removed in v1.15. Initializers *Initializers `json:"initializers,omitempty" protobuf:"bytes,16,opt,name=initializers"` // Must be empty before the object is deleted from the registry. Each entry @@ -327,9 +329,9 @@ type ListOptions struct { // Defaults to everything. // +optional FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"` - // If true, partially initialized resources are included in the response. - // +optional - IncludeUninitialized bool `json:"includeUninitialized,omitempty" protobuf:"varint,6,opt,name=includeUninitialized"` + + // +k8s:deprecated=includeUninitialized,protobuf=6 + // Watch for changes to the described resources and return them as a stream of // add, update, and remove notifications. Specify resourceVersion. // +optional @@ -402,9 +404,7 @@ type GetOptions struct { // - if it's 0, then we simply return what we currently have in cache, no guarantee; // - if set to non zero, then the result is at least as fresh as given rv. ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,1,opt,name=resourceVersion"` - // If true, partially initialized resources are included in the response. - // +optional - IncludeUninitialized bool `json:"includeUninitialized,omitempty" protobuf:"varint,2,opt,name=includeUninitialized"` + // +k8s:deprecated=includeUninitialized,protobuf=2 } // DeletionPropagation decides if a deletion will propagate to the dependents of @@ -489,10 +489,7 @@ type CreateOptions struct { // - All: all dry run stages will be processed // +optional DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` - - // If IncludeUninitialized is specified, the object may be - // returned without completing initialization. - IncludeUninitialized bool `json:"includeUninitialized,omitempty" protobuf:"varint,2,opt,name=includeUninitialized"` + // +k8s:deprecated=includeUninitialized,protobuf=2 } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go index 679e709e8e..32ca6cb10a 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go @@ -86,9 +86,8 @@ func (APIVersions) SwaggerDoc() map[string]string { } var map_CreateOptions = map[string]string{ - "": "CreateOptions may be provided when creating an API object.", - "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "includeUninitialized": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", + "": "CreateOptions may be provided when creating an API object.", + "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", } func (CreateOptions) SwaggerDoc() map[string]string { @@ -119,9 +118,8 @@ func (ExportOptions) SwaggerDoc() map[string]string { } var map_GetOptions = map[string]string{ - "": "GetOptions is the standard query options to the standard REST get call.", - "resourceVersion": "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "includeUninitialized": "If true, partially initialized resources are included in the response.", + "": "GetOptions is the standard query options to the standard REST get call.", + "resourceVersion": "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", } func (GetOptions) SwaggerDoc() map[string]string { @@ -200,15 +198,14 @@ func (ListMeta) SwaggerDoc() map[string]string { } var map_ListOptions = map[string]string{ - "": "ListOptions is the query options to a standard REST list call.", - "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "includeUninitialized": "If true, partially initialized resources are included in the response.", - "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "timeoutSeconds": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "limit": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "continue": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "": "ListOptions is the query options to a standard REST list call.", + "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "timeoutSeconds": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "limit": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "continue": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", } func (ListOptions) SwaggerDoc() map[string]string { @@ -230,7 +227,7 @@ var map_ObjectMeta = map[string]string{ "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", - "initializers": "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.", + "initializers": "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.\n\nDEPRECATED - initializers are an alpha field and will be removed in v1.15.", "finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", "clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", } diff --git a/staging/src/k8s.io/apimachinery/pkg/util/initialization/BUILD b/staging/src/k8s.io/apimachinery/pkg/util/initialization/BUILD deleted file mode 100644 index b1ad2dba0f..0000000000 --- a/staging/src/k8s.io/apimachinery/pkg/util/initialization/BUILD +++ /dev/null @@ -1,28 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["initialization.go"], - importmap = "k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/initialization", - importpath = "k8s.io/apimachinery/pkg/util/initialization", - visibility = ["//visibility:public"], - deps = [ - "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/staging/src/k8s.io/apimachinery/pkg/util/initialization/initialization.go b/staging/src/k8s.io/apimachinery/pkg/util/initialization/initialization.go deleted file mode 100644 index 341b595574..0000000000 --- a/staging/src/k8s.io/apimachinery/pkg/util/initialization/initialization.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -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 initialization - -import ( - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// IsInitialized returns if the initializers indicates means initialized. -func IsInitialized(initializers *metav1.Initializers) bool { - if initializers == nil { - return true - } - // Persisted objects will never be in this state. The initializer admission - // plugin will override metadata.initializers to nil. If the initializer - // admissio plugin is disabled, the generic registry always set - // metadata.initializers to nil. However, this function - // might be called before the object persisted, thus the check. - if len(initializers.Pending) == 0 && initializers.Result == nil { - return true - } - return false -} - -// IsObjectInitialized returns if the object is initialized. -func IsObjectInitialized(obj runtime.Object) (bool, error) { - accessor, err := meta.Accessor(obj) - if err != nil { - return false, err - } - return IsInitialized(accessor.GetInitializers()), nil -} diff --git a/staging/src/k8s.io/apiserver/Godeps/Godeps.json b/staging/src/k8s.io/apiserver/Godeps/Godeps.json index 3c4e62c487..a9e95a1369 100644 --- a/staging/src/k8s.io/apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/apiserver/Godeps/Godeps.json @@ -942,10 +942,6 @@ "ImportPath": "k8s.io/api/admission/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -1298,10 +1294,6 @@ "ImportPath": "k8s.io/client-go/informers/admissionregistration", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -1486,14 +1478,6 @@ "ImportPath": "k8s.io/client-go/kubernetes/scheme", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -1750,10 +1734,6 @@ "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/staging/src/k8s.io/apiserver/pkg/admission/BUILD b/staging/src/k8s.io/apiserver/pkg/admission/BUILD index e45f33e1ec..658d1d3ff3 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/admission/BUILD @@ -78,7 +78,6 @@ filegroup( "//staging/src/k8s.io/apiserver/pkg/admission/configuration:all-srcs", "//staging/src/k8s.io/apiserver/pkg/admission/initializer:all-srcs", "//staging/src/k8s.io/apiserver/pkg/admission/metrics:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization:all-srcs", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle:all-srcs", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/config:all-srcs", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/errors:all-srcs", diff --git a/staging/src/k8s.io/apiserver/pkg/admission/configuration/BUILD b/staging/src/k8s.io/apiserver/pkg/admission/configuration/BUILD index 10136848ec..3443278141 100644 --- a/staging/src/k8s.io/apiserver/pkg/admission/configuration/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/admission/configuration/BUILD @@ -10,18 +10,14 @@ go_test( name = "go_default_test", srcs = [ "configuration_manager_test.go", - "initializer_manager_test.go", "mutating_webhook_manager_test.go", "validating_webhook_manager_test.go", ], embed = [":go_default_library"], deps = [ - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", @@ -32,17 +28,13 @@ go_library( name = "go_default_library", srcs = [ "configuration_manager.go", - "initializer_manager.go", "mutating_webhook_manager.go", "validating_webhook_manager.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/admission/configuration", importpath = "k8s.io/apiserver/pkg/admission/configuration", deps = [ - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", @@ -51,7 +43,6 @@ go_library( "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/listers/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/klog:go_default_library", ], ) diff --git a/staging/src/k8s.io/apiserver/pkg/admission/configuration/initializer_manager.go b/staging/src/k8s.io/apiserver/pkg/admission/configuration/initializer_manager.go deleted file mode 100644 index f2b7e90994..0000000000 --- a/staging/src/k8s.io/apiserver/pkg/admission/configuration/initializer_manager.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -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 configuration - -import ( - "fmt" - "reflect" - "sort" - - "k8s.io/klog" - - "k8s.io/api/admissionregistration/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -type InitializerConfigurationLister interface { - List(opts metav1.ListOptions) (*v1alpha1.InitializerConfigurationList, error) -} - -type InitializerConfigurationManager struct { - *poller -} - -func NewInitializerConfigurationManager(c InitializerConfigurationLister) *InitializerConfigurationManager { - getFn := func() (runtime.Object, error) { - list, err := c.List(metav1.ListOptions{}) - if err != nil { - if errors.IsNotFound(err) || errors.IsForbidden(err) { - klog.V(5).Infof("Initializers are disabled due to an error: %v", err) - return nil, ErrDisabled - } - return nil, err - } - return mergeInitializerConfigurations(list), nil - } - return &InitializerConfigurationManager{ - newPoller(getFn), - } -} - -// Initializers returns the merged InitializerConfiguration. -func (im *InitializerConfigurationManager) Initializers() (*v1alpha1.InitializerConfiguration, error) { - configuration, err := im.poller.configuration() - if err != nil { - return nil, err - } - initializerConfiguration, ok := configuration.(*v1alpha1.InitializerConfiguration) - if !ok { - return nil, fmt.Errorf("expected type %v, got type %v", reflect.TypeOf(initializerConfiguration), reflect.TypeOf(configuration)) - } - return initializerConfiguration, nil -} - -func (im *InitializerConfigurationManager) Run(stopCh <-chan struct{}) { - im.poller.Run(stopCh) -} - -func mergeInitializerConfigurations(initializerConfigurationList *v1alpha1.InitializerConfigurationList) *v1alpha1.InitializerConfiguration { - configurations := initializerConfigurationList.Items - sort.SliceStable(configurations, InitializerConfigurationSorter(configurations).ByName) - var ret v1alpha1.InitializerConfiguration - for _, c := range configurations { - ret.Initializers = append(ret.Initializers, c.Initializers...) - } - return &ret -} - -type InitializerConfigurationSorter []v1alpha1.InitializerConfiguration - -func (a InitializerConfigurationSorter) ByName(i, j int) bool { - return a[i].Name < a[j].Name -} diff --git a/staging/src/k8s.io/apiserver/pkg/admission/configuration/initializer_manager_test.go b/staging/src/k8s.io/apiserver/pkg/admission/configuration/initializer_manager_test.go deleted file mode 100644 index 783e67a5b7..0000000000 --- a/staging/src/k8s.io/apiserver/pkg/admission/configuration/initializer_manager_test.go +++ /dev/null @@ -1,182 +0,0 @@ -/* -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 configuration - -import ( - "fmt" - "reflect" - "testing" - "time" - - "k8s.io/api/admissionregistration/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -type mockLister struct { - invoked int - successes int - failures int - configurationList v1alpha1.InitializerConfigurationList - t *testing.T -} - -func newMockLister(successes, failures int, configurationList v1alpha1.InitializerConfigurationList, t *testing.T) *mockLister { - return &mockLister{ - failures: failures, - successes: successes, - configurationList: configurationList, - t: t, - } -} - -// The first List will be successful; the next m.failures List will -// fail; the next m.successes List will be successful -// List should only be called 1+m.failures+m.successes times. -func (m *mockLister) List(options metav1.ListOptions) (*v1alpha1.InitializerConfigurationList, error) { - m.invoked++ - if m.invoked == 1 { - return &m.configurationList, nil - } - if m.invoked <= 1+m.failures { - return nil, fmt.Errorf("some error") - } - if m.invoked <= 1+m.failures+m.successes { - return &m.configurationList, nil - } - m.t.Fatalf("unexpected call to List, should only be called %d times", 1+m.successes+m.failures) - return nil, nil -} - -var _ InitializerConfigurationLister = &mockLister{} - -func TestConfiguration(t *testing.T) { - cases := []struct { - name string - failures int - // note that the first call to mockLister is always a success. - successes int - expectReady bool - }{ - { - name: "number of failures hasn't reached failureThreshold", - failures: defaultFailureThreshold - 1, - expectReady: true, - }, - { - name: "number of failures just reaches failureThreshold", - failures: defaultFailureThreshold, - expectReady: false, - }, - { - name: "number of failures exceeds failureThreshold", - failures: defaultFailureThreshold + 1, - expectReady: false, - }, - { - name: "number of failures exceeds failureThreshold, but then get another success", - failures: defaultFailureThreshold + 1, - successes: 1, - expectReady: true, - }, - } - for _, c := range cases { - mock := newMockLister(c.successes, c.failures, v1alpha1.InitializerConfigurationList{}, t) - manager := NewInitializerConfigurationManager(mock) - manager.interval = 1 * time.Millisecond - for i := 0; i < 1+c.successes+c.failures; i++ { - manager.sync() - } - _, err := manager.Initializers() - if err != nil && c.expectReady { - t.Errorf("case %s, expect ready, got: %v", c.name, err) - } - if err == nil && !c.expectReady { - t.Errorf("case %s, expect not ready", c.name) - } - } -} - -func TestMergeInitializerConfigurations(t *testing.T) { - configurationsList := v1alpha1.InitializerConfigurationList{ - Items: []v1alpha1.InitializerConfiguration{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: "provider_2", - }, - Initializers: []v1alpha1.Initializer{ - { - Name: "initializer_a", - }, - { - Name: "initializer_b", - }, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Name: "provider_1", - }, - Initializers: []v1alpha1.Initializer{ - { - Name: "initializer_c", - }, - { - Name: "initializer_d", - }, - }, - }, - }, - } - - expected := &v1alpha1.InitializerConfiguration{ - Initializers: []v1alpha1.Initializer{ - { - Name: "initializer_c", - }, - { - Name: "initializer_d", - }, - { - Name: "initializer_a", - }, - { - Name: "initializer_b", - }, - }, - } - - got := mergeInitializerConfigurations(&configurationsList) - if !reflect.DeepEqual(got, expected) { - t.Errorf("expected: %#v, got: %#v", expected, got) - } -} - -type disabledInitializerConfigLister struct{} - -func (l *disabledInitializerConfigLister) List(options metav1.ListOptions) (*v1alpha1.InitializerConfigurationList, error) { - return nil, errors.NewNotFound(schema.GroupResource{Group: "admissionregistration", Resource: "initializerConfigurations"}, "") -} -func TestInitializerConfigDisabled(t *testing.T) { - manager := NewInitializerConfigurationManager(&disabledInitializerConfigLister{}) - manager.sync() - _, err := manager.Initializers() - if err.Error() != ErrDisabled.Error() { - t.Errorf("expected %v, got %v", ErrDisabled, err) - } -} diff --git a/staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization/BUILD b/staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization/BUILD deleted file mode 100644 index ad3b9b5f58..0000000000 --- a/staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization/BUILD +++ /dev/null @@ -1,61 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["initialization.go"], - importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/admission/plugin/initialization", - importpath = "k8s.io/apiserver/pkg/admission/plugin/initialization", - deps = [ - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/validation:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/admission/configuration:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/klog:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["initialization_test.go"], - embed = [":go_default_library"], - deps = [ - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - ], -) diff --git a/staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization/initialization.go b/staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization/initialization.go deleted file mode 100644 index 8219b797f5..0000000000 --- a/staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization/initialization.go +++ /dev/null @@ -1,369 +0,0 @@ -/* -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 initialization - -import ( - "fmt" - "io" - "strings" - - "k8s.io/klog" - - "k8s.io/api/admissionregistration/v1alpha1" - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/api/validation" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apiserver/pkg/admission" - "k8s.io/apiserver/pkg/admission/configuration" - "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/apiserver/pkg/features" - utilfeature "k8s.io/apiserver/pkg/util/feature" - clientset "k8s.io/client-go/kubernetes" -) - -const ( - // Name of admission plug-in - PluginName = "Initializers" -) - -// Register registers a plugin -func Register(plugins *admission.Plugins) { - plugins.Register(PluginName, func(config io.Reader) (admission.Interface, error) { - return NewInitializer(), nil - }) -} - -type initializerOptions struct { - Initializers []string -} - -// InitializationConfig specifies initialization config -type InitializationConfig interface { - Run(stopCh <-chan struct{}) - Initializers() (*v1alpha1.InitializerConfiguration, error) -} - -type initializer struct { - config InitializationConfig - authorizer authorizer.Authorizer -} - -// NewInitializer creates a new initializer plugin which assigns newly created resources initializers -// based on configuration loaded from the admission API group. -// FUTURE: this may be moved to the storage layer of the apiserver, but for now this is an alpha feature -// that can be disabled. -func NewInitializer() admission.Interface { - return &initializer{} -} - -// ValidateInitialization implements the InitializationValidator interface. -func (i *initializer) ValidateInitialization() error { - if i.config == nil { - return fmt.Errorf("the Initializer admission plugin requires a Kubernetes client to be provided") - } - if i.authorizer == nil { - return fmt.Errorf("the Initializer admission plugin requires an authorizer to be provided") - } - - if !utilfeature.DefaultFeatureGate.Enabled(features.Initializers) { - if err := utilfeature.DefaultMutableFeatureGate.Set(string(features.Initializers) + "=true"); err != nil { - klog.Errorf("error enabling Initializers feature as part of admission plugin setup: %v", err) - } else { - klog.Infof("enabled Initializers feature as part of admission plugin setup") - } - } - - i.config.Run(wait.NeverStop) - return nil -} - -// SetExternalKubeClientSet implements the WantsExternalKubeClientSet interface. -func (i *initializer) SetExternalKubeClientSet(client clientset.Interface) { - i.config = configuration.NewInitializerConfigurationManager(client.AdmissionregistrationV1alpha1().InitializerConfigurations()) -} - -// SetAuthorizer implements the WantsAuthorizer interface. -func (i *initializer) SetAuthorizer(a authorizer.Authorizer) { - i.authorizer = a -} - -var initializerFieldPath = field.NewPath("metadata", "initializers") - -// readConfig holds requests instead of failing them if the server is not yet initialized -// or is unresponsive. It formats the returned error for client use if necessary. -func (i *initializer) readConfig(a admission.Attributes) (*v1alpha1.InitializerConfiguration, error) { - // read initializers from config - config, err := i.config.Initializers() - if err == nil { - return config, nil - } - - // if initializer configuration is disabled, fail open - if err == configuration.ErrDisabled { - return &v1alpha1.InitializerConfiguration{}, nil - } - - e := errors.NewServerTimeout(a.GetResource().GroupResource(), "create", 1) - if err == configuration.ErrNotReady { - e.ErrStatus.Message = fmt.Sprintf("Waiting for initialization configuration to load: %v", err) - e.ErrStatus.Reason = "LoadingConfiguration" - e.ErrStatus.Details.Causes = append(e.ErrStatus.Details.Causes, metav1.StatusCause{ - Type: "InitializerConfigurationPending", - Message: "The server is waiting for the initializer configuration to be loaded.", - }) - } else { - e.ErrStatus.Message = fmt.Sprintf("Unable to refresh the initializer configuration: %v", err) - e.ErrStatus.Reason = "LoadingConfiguration" - e.ErrStatus.Details.Causes = append(e.ErrStatus.Details.Causes, metav1.StatusCause{ - Type: "InitializerConfigurationFailure", - Message: "An error has occurred while refreshing the initializer configuration, no resources can be created until a refresh succeeds.", - }) - } - return nil, e -} - -// Admit checks for create requests to add initializers, or update request to enforce invariants. -// The admission controller fails open if the object doesn't have ObjectMeta (can't be initialized). -// A client with sufficient permission ("initialize" verb on resource) can specify its own initializers -// or an empty initializers struct (which bypasses initialization). Only clients with the initialize verb -// can update objects that have not completed initialization. Sub resources can still be modified on -// resources that are undergoing initialization. -// TODO: once this logic is ready for beta, move it into the REST storage layer. -func (i *initializer) Admit(a admission.Attributes) (err error) { - switch a.GetOperation() { - case admission.Create, admission.Update: - default: - return nil - } - - // TODO: should sub-resource action should be denied until the object is initialized? - if len(a.GetSubresource()) > 0 { - return nil - } - - switch a.GetOperation() { - case admission.Create: - accessor, err := meta.Accessor(a.GetObject()) - if err != nil { - // objects without meta accessor cannot be checked for initialization, and it is possible to make calls - // via our API that don't have ObjectMeta - return nil - } - existing := accessor.GetInitializers() - if existing != nil { - klog.V(5).Infof("Admin bypassing initialization for %s", a.GetResource()) - - // it must be possible for some users to bypass initialization - for now, check the initialize operation - if err := i.canInitialize(a, "create with initializers denied"); err != nil { - return err - } - // allow administrators to bypass initialization by setting an empty initializers struct - if len(existing.Pending) == 0 && existing.Result == nil { - accessor.SetInitializers(nil) - return nil - } - } else { - klog.V(5).Infof("Checking initialization for %s", a.GetResource()) - - config, err := i.readConfig(a) - if err != nil { - return err - } - - // Mirror pods are exempt from initialization because they are created and initialized - // on the Kubelet before they appear in the API. - // TODO: once this moves to REST storage layer, this becomes a pod specific concern - if a.GetKind().GroupKind() == v1.SchemeGroupVersion.WithKind("Pod").GroupKind() { - accessor, err := meta.Accessor(a.GetObject()) - if err != nil { - return err - } - annotations := accessor.GetAnnotations() - if _, isMirror := annotations[v1.MirrorPodAnnotationKey]; isMirror { - return nil - } - } - - names := findInitializers(config, a.GetResource()) - if len(names) == 0 { - klog.V(5).Infof("No initializers needed") - return nil - } - - klog.V(5).Infof("Found initializers for %s: %v", a.GetResource(), names) - accessor.SetInitializers(newInitializers(names)) - } - - case admission.Update: - accessor, err := meta.Accessor(a.GetObject()) - if err != nil { - // objects without meta accessor cannot be checked for initialization, and it is possible to make calls - // via our API that don't have ObjectMeta - return nil - } - updated := accessor.GetInitializers() - - // controllers deployed with an empty initializers.pending have their initializers set to nil - // but should be able to update without changing their manifest - if updated != nil && len(updated.Pending) == 0 && updated.Result == nil { - accessor.SetInitializers(nil) - updated = nil - } - - existingAccessor, err := meta.Accessor(a.GetOldObject()) - if err != nil { - // if the old object does not have an accessor, but the new one does, error out - return fmt.Errorf("initialized resources must be able to set initializers (%T): %v", a.GetOldObject(), err) - } - existing := existingAccessor.GetInitializers() - - // updates on initialized resources are allowed - if updated == nil && existing == nil { - return nil - } - - klog.V(5).Infof("Modifying uninitialized resource %s", a.GetResource()) - - // because we are called before validation, we need to ensure the update transition is valid. - if errs := validation.ValidateInitializersUpdate(updated, existing, initializerFieldPath); len(errs) > 0 { - return errors.NewInvalid(a.GetKind().GroupKind(), a.GetName(), errs) - } - - // caller must have the ability to mutate un-initialized resources - if err := i.canInitialize(a, "update to uninitialized resource denied"); err != nil { - return err - } - - // TODO: restrict initialization list changes to specific clients? - } - - return nil -} - -func (i *initializer) canInitialize(a admission.Attributes, message string) error { - // caller must have the ability to mutate un-initialized resources - decision, reason, err := i.authorizer.Authorize(authorizer.AttributesRecord{ - Name: a.GetName(), - ResourceRequest: true, - User: a.GetUserInfo(), - Verb: "initialize", - Namespace: a.GetNamespace(), - APIGroup: a.GetResource().Group, - APIVersion: a.GetResource().Version, - Resource: a.GetResource().Resource, - }) - if err != nil { - return err - } - if decision != authorizer.DecisionAllow { - return errors.NewForbidden(a.GetResource().GroupResource(), a.GetName(), fmt.Errorf("%s: %s", message, reason)) - } - return nil -} - -// Handles returns true if this admission controller can handle the given operation -// where operation can be one of CREATE, UPDATE, DELETE, or CONNECT -func (i *initializer) Handles(op admission.Operation) bool { - return op == admission.Create || op == admission.Update -} - -// newInitializers populates an Initializers struct. -func newInitializers(names []string) *metav1.Initializers { - if len(names) == 0 { - return nil - } - var init []metav1.Initializer - for _, name := range names { - init = append(init, metav1.Initializer{Name: name}) - } - return &metav1.Initializers{ - Pending: init, - } -} - -// findInitializers returns the list of initializer names that apply to a config. It returns an empty list -// if no initializers apply. -func findInitializers(initializers *v1alpha1.InitializerConfiguration, gvr schema.GroupVersionResource) []string { - var names []string - for _, init := range initializers.Initializers { - if !matchRule(init.Rules, gvr) { - continue - } - names = append(names, init.Name) - } - return names -} - -// matchRule returns true if any rule matches the provided group version resource. -func matchRule(rules []v1alpha1.Rule, gvr schema.GroupVersionResource) bool { - for _, rule := range rules { - if !hasGroup(rule.APIGroups, gvr.Group) { - return false - } - if !hasVersion(rule.APIVersions, gvr.Version) { - return false - } - if !hasResource(rule.Resources, gvr.Resource) { - return false - } - } - return len(rules) > 0 -} - -func hasGroup(groups []string, group string) bool { - if groups[0] == "*" { - return true - } - for _, g := range groups { - if g == group { - return true - } - } - return false -} - -func hasVersion(versions []string, version string) bool { - if versions[0] == "*" { - return true - } - for _, v := range versions { - if v == version { - return true - } - } - return false -} - -func hasResource(resources []string, resource string) bool { - if resources[0] == "*" || resources[0] == "*/*" { - return true - } - for _, r := range resources { - if strings.Contains(r, "/") { - continue - } - if r == resource { - return true - } - } - return false -} diff --git a/staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization/initialization_test.go b/staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization/initialization_test.go deleted file mode 100644 index fd9e1fa774..0000000000 --- a/staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization/initialization_test.go +++ /dev/null @@ -1,194 +0,0 @@ -/* -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 initialization - -import ( - "reflect" - "strings" - "testing" - - "k8s.io/api/admissionregistration/v1alpha1" - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apiserver/pkg/admission" - "k8s.io/apiserver/pkg/authorization/authorizer" -) - -func newInitializer(name string, rules ...v1alpha1.Rule) *v1alpha1.InitializerConfiguration { - return addInitializer(&v1alpha1.InitializerConfiguration{}, name, rules...) -} - -func addInitializer(base *v1alpha1.InitializerConfiguration, name string, rules ...v1alpha1.Rule) *v1alpha1.InitializerConfiguration { - base.Initializers = append(base.Initializers, v1alpha1.Initializer{ - Name: name, - Rules: rules, - }) - return base -} - -func TestFindInitializers(t *testing.T) { - type args struct { - initializers *v1alpha1.InitializerConfiguration - gvr schema.GroupVersionResource - } - tests := []struct { - name string - args args - want []string - }{ - { - name: "empty", - args: args{ - gvr: schema.GroupVersionResource{}, - initializers: newInitializer("1"), - }, - }, - { - name: "everything", - args: args{ - gvr: schema.GroupVersionResource{}, - initializers: newInitializer("1", v1alpha1.Rule{APIGroups: []string{"*"}, APIVersions: []string{"*"}, Resources: []string{"*"}}), - }, - want: []string{"1"}, - }, - { - name: "empty group", - args: args{ - gvr: schema.GroupVersionResource{}, - initializers: newInitializer("1", v1alpha1.Rule{APIGroups: []string{""}, APIVersions: []string{"*"}, Resources: []string{"*"}}), - }, - want: []string{"1"}, - }, - { - name: "pod", - args: args{ - gvr: schema.GroupVersionResource{Resource: "pods"}, - initializers: addInitializer( - newInitializer("1", v1alpha1.Rule{APIGroups: []string{""}, APIVersions: []string{"*"}, Resources: []string{"pods"}}), - "2", v1alpha1.Rule{APIGroups: []string{""}, APIVersions: []string{"*"}, Resources: []string{"pods"}}, - ), - }, - want: []string{"1", "2"}, - }, - { - name: "multiple matches", - args: args{ - gvr: schema.GroupVersionResource{Resource: "pods"}, - initializers: newInitializer("1", v1alpha1.Rule{APIGroups: []string{""}, APIVersions: []string{"*"}, Resources: []string{"pods"}}), - }, - want: []string{"1"}, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := findInitializers(tt.args.initializers, tt.args.gvr); !reflect.DeepEqual(got, tt.want) { - t.Errorf("findInitializers() = %v, want %v", got, tt.want) - } - }) - } -} - -type fakeAuthorizer struct { - accept bool -} - -func (f *fakeAuthorizer) Authorize(a authorizer.Attributes) (authorizer.Decision, string, error) { - if f.accept { - return authorizer.DecisionAllow, "", nil - } - return authorizer.DecisionNoOpinion, "denied", nil -} - -func TestAdmitUpdate(t *testing.T) { - tests := []struct { - name string - oldInitializers *metav1.Initializers - newInitializers *metav1.Initializers - verifyUpdatedObj func(runtime.Object) (pass bool, reason string) - err string - }{ - { - name: "updates on initialized resources are allowed", - oldInitializers: nil, - newInitializers: nil, - err: "", - }, - { - name: "updates on initialized resources are allowed", - oldInitializers: &metav1.Initializers{Pending: []metav1.Initializer{{Name: "init.k8s.io"}}}, - newInitializers: &metav1.Initializers{}, - verifyUpdatedObj: func(obj runtime.Object) (bool, string) { - accessor, err := meta.Accessor(obj) - if err != nil { - return false, "cannot get accessor" - } - if accessor.GetInitializers() != nil { - return false, "expect nil initializers" - } - return true, "" - }, - err: "", - }, - { - name: "initializers may not be set once initialized", - oldInitializers: nil, - newInitializers: &metav1.Initializers{Pending: []metav1.Initializer{{Name: "init.k8s.io"}}}, - err: "field is immutable once initialization has completed", - }, - { - name: "empty initializer list is treated as nil initializer", - oldInitializers: nil, - newInitializers: &metav1.Initializers{}, - verifyUpdatedObj: func(obj runtime.Object) (bool, string) { - accessor, err := meta.Accessor(obj) - if err != nil { - return false, "cannot get accessor" - } - if accessor.GetInitializers() != nil { - return false, "expect nil initializers" - } - return true, "" - }, - err: "", - }, - } - - plugin := initializer{ - config: nil, - authorizer: &fakeAuthorizer{true}, - } - for _, tc := range tests { - oldObj := &v1.Pod{} - oldObj.Initializers = tc.oldInitializers - newObj := &v1.Pod{} - newObj.Initializers = tc.newInitializers - a := admission.NewAttributesRecord(newObj, oldObj, schema.GroupVersionKind{}, "", "foo", schema.GroupVersionResource{}, "", admission.Update, false, nil) - err := plugin.Admit(a) - switch { - case tc.err == "" && err != nil: - t.Errorf("%q: unexpected error: %v", tc.name, err) - case tc.err != "" && err == nil: - t.Errorf("%q: unexpected no error, expected %s", tc.name, tc.err) - case tc.err != "" && err != nil && !strings.Contains(err.Error(), tc.err): - t.Errorf("%q: expected %s, got %v", tc.name, tc.err, err) - } - } - -} diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go index 6d8bac3adb..36a925c3ac 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go @@ -335,7 +335,6 @@ type SimpleRESTStorage struct { fakeWatch *watch.FakeWatcher requestedLabelSelector labels.Selector requestedFieldSelector fields.Selector - requestedUninitialized bool requestedResourceVersion string requestedResourceNamespace string @@ -390,7 +389,6 @@ func (storage *SimpleRESTStorage) List(ctx context.Context, options *metainterna if options != nil && options.FieldSelector != nil { storage.requestedFieldSelector = options.FieldSelector } - storage.requestedUninitialized = options.IncludeUninitialized return result, storage.errors["list"] } @@ -1689,52 +1687,6 @@ func TestGetCompression(t *testing.T) { } } -func TestGetUninitialized(t *testing.T) { - storage := map[string]rest.Storage{} - simpleStorage := SimpleRESTStorage{ - list: []genericapitesting.Simple{ - { - ObjectMeta: metav1.ObjectMeta{ - Initializers: &metav1.Initializers{ - Pending: []metav1.Initializer{{Name: "test"}}, - }, - }, - Other: "foo", - }, - }, - } - selfLinker := &setTestSelfLinker{ - t: t, - expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple/id", - alternativeSet: sets.NewString("/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple"), - name: "id", - namespace: "default", - } - storage["simple"] = &simpleStorage - handler := handleLinker(storage, selfLinker) - server := httptest.NewServer(handler) - defer server.Close() - - resp, err := http.Get(server.URL + "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple?includeUninitialized=true") - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if resp.StatusCode != http.StatusOK { - t.Fatalf("unexpected response: %#v", resp) - } - var itemOut genericapitesting.SimpleList - body, err := extractBody(resp, &itemOut) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if len(itemOut.Items) != 1 || itemOut.Items[0].Other != "foo" { - t.Errorf("Unexpected data: %#v, expected %#v (%s)", itemOut, simpleStorage.item, string(body)) - } - if !simpleStorage.requestedUninitialized { - t.Errorf("Didn't set correct flag") - } -} - func TestGetPretty(t *testing.T) { storage := map[string]rest.Storage{} simpleStorage := SimpleRESTStorage{ diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/create.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/create.go index 7774f849e1..510bdeae7d 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/create.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/create.go @@ -23,7 +23,6 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/validation" @@ -150,13 +149,7 @@ func createHandler(r rest.NamedCreater, scope RequestScope, admit admission.Inte } trace.Step("Object stored in database") - // If the object is partially initialized, always indicate it via StatusAccepted code := http.StatusCreated - if accessor, err := meta.Accessor(result); err == nil { - if accessor.GetInitializers() != nil { - code = http.StatusAccepted - } - } status, ok := result.(*metav1.Status) if ok && err == nil && status.Code == 0 { status.Code = int32(code) diff --git a/staging/src/k8s.io/apiserver/pkg/features/kube_features.go b/staging/src/k8s.io/apiserver/pkg/features/kube_features.go index 88d949c4df..3541908935 100644 --- a/staging/src/k8s.io/apiserver/pkg/features/kube_features.go +++ b/staging/src/k8s.io/apiserver/pkg/features/kube_features.go @@ -65,13 +65,6 @@ const ( // Enables compression of REST responses (GET and LIST only) APIResponseCompression utilfeature.Feature = "APIResponseCompression" - // owner: @smarterclayton - // alpha: v1.7 - // - // Allow asynchronous coordination of object creation. - // Auto-enabled by the Initializers admission plugin. - Initializers utilfeature.Feature = "Initializers" - // owner: @smarterclayton // alpha: v1.8 // beta: v1.9 @@ -103,7 +96,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS AdvancedAuditing: {Default: true, PreRelease: utilfeature.GA}, DynamicAuditing: {Default: false, PreRelease: utilfeature.Alpha}, APIResponseCompression: {Default: false, PreRelease: utilfeature.Alpha}, - Initializers: {Default: false, PreRelease: utilfeature.Alpha}, APIListChunking: {Default: true, PreRelease: utilfeature.Beta}, DryRun: {Default: true, PreRelease: utilfeature.Beta}, } diff --git a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/BUILD b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/BUILD index 69db106208..0935908b24 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/BUILD @@ -36,7 +36,6 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/apis/example:go_default_library", "//staging/src/k8s.io/apiserver/pkg/apis/example/v1:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage:go_default_library", @@ -46,8 +45,6 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/storage/names:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/testing:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature/testing:go_default_library", ], ) diff --git a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go index fa324ed905..5489596e63 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go @@ -307,7 +307,6 @@ func (e *Store) ListPredicate(ctx context.Context, p storage.SelectionPredicate, // By default we should serve the request from etcd. options = &metainternalversion.ListOptions{ResourceVersion: ""} } - p.IncludeUninitialized = options.IncludeUninitialized p.Limit = options.Limit p.Continue = options.Continue list := e.NewListFunc() @@ -380,92 +379,9 @@ func (e *Store) Create(ctx context.Context, obj runtime.Object, createValidation return nil, err } } - if !options.IncludeUninitialized { - return e.WaitForInitialized(ctx, out) - } return out, nil } -// WaitForInitialized holds until the object is initialized, or returns an error if the default limit expires. -// This method is exposed publicly for consumers of generic rest tooling. -func (e *Store) WaitForInitialized(ctx context.Context, obj runtime.Object) (runtime.Object, error) { - // return early if we don't have initializers, or if they've completed already - accessor, err := meta.Accessor(obj) - if err != nil { - return obj, nil - } - initializers := accessor.GetInitializers() - if initializers == nil { - return obj, nil - } - if result := initializers.Result; result != nil { - return nil, kubeerr.FromObject(result) - } - - key, err := e.KeyFunc(ctx, accessor.GetName()) - if err != nil { - return nil, err - } - qualifiedResource := e.qualifiedResourceFromContext(ctx) - w, err := e.Storage.Watch(ctx, key, accessor.GetResourceVersion(), storage.SelectionPredicate{ - Label: labels.Everything(), - Field: fields.Everything(), - - IncludeUninitialized: true, - }) - if err != nil { - return nil, err - } - defer w.Stop() - - latest := obj - ch := w.ResultChan() - for { - select { - case event, ok := <-ch: - if !ok { - msg := fmt.Sprintf("server has timed out waiting for the initialization of %s %s", - qualifiedResource.String(), accessor.GetName()) - return nil, kubeerr.NewTimeoutError(msg, 0) - } - switch event.Type { - case watch.Deleted: - if latest = event.Object; latest != nil { - if accessor, err := meta.Accessor(latest); err == nil { - if initializers := accessor.GetInitializers(); initializers != nil && initializers.Result != nil { - // initialization failed, but we missed the modification event - return nil, kubeerr.FromObject(initializers.Result) - } - } - } - return nil, kubeerr.NewInternalError(fmt.Errorf("object deleted while waiting for creation")) - case watch.Error: - if status, ok := event.Object.(*metav1.Status); ok { - return nil, &kubeerr.StatusError{ErrStatus: *status} - } - return nil, kubeerr.NewInternalError(fmt.Errorf("unexpected object in watch stream, can't complete initialization %T", event.Object)) - case watch.Modified: - latest = event.Object - accessor, err = meta.Accessor(latest) - if err != nil { - return nil, kubeerr.NewInternalError(fmt.Errorf("object no longer has access to metadata %T: %v", latest, err)) - } - initializers := accessor.GetInitializers() - if initializers == nil { - // completed initialization - return latest, nil - } - if result := initializers.Result; result != nil { - // initialization failed - return nil, kubeerr.FromObject(result) - } - } - case <-ctx.Done(): - return nil, ctx.Err() - } - } -} - // shouldDeleteDuringUpdate checks if a Update is removing all the object's // finalizers. If so, it further checks if the object's // DeletionGracePeriodSeconds is 0. @@ -483,20 +399,6 @@ func (e *Store) shouldDeleteDuringUpdate(ctx context.Context, key string, obj, e return len(newMeta.GetFinalizers()) == 0 && oldMeta.GetDeletionGracePeriodSeconds() != nil && *oldMeta.GetDeletionGracePeriodSeconds() == 0 } -// shouldDeleteForFailedInitialization returns true if the provided object is initializing and has -// a failure recorded. -func (e *Store) shouldDeleteForFailedInitialization(ctx context.Context, obj runtime.Object) bool { - m, err := meta.Accessor(obj) - if err != nil { - utilruntime.HandleError(err) - return false - } - if initializers := m.GetInitializers(); initializers != nil && initializers.Result != nil { - return true - } - return false -} - // deleteWithoutFinalizers handles deleting an object ignoring its finalizer list. // Used for objects that are either been finalized or have never initialized. func (e *Store) deleteWithoutFinalizers(ctx context.Context, name, key string, obj runtime.Object, preconditions *storage.Preconditions, dryRun bool) (runtime.Object, bool, error) { @@ -652,10 +554,6 @@ func (e *Store) Update(ctx context.Context, name string, objInfo rest.UpdatedObj return nil, false, err } - if e.shouldDeleteForFailedInitialization(ctx, out) { - return e.deleteWithoutFinalizers(ctx, name, key, out, storagePreconditions, dryrun.IsDryRun(options.DryRun)) - } - if creating { if e.AfterCreate != nil { if err := e.AfterCreate(out); err != nil { @@ -1055,11 +953,6 @@ func (e *Store) DeleteCollection(ctx context.Context, options *metav1.DeleteOpti listOptions = listOptions.DeepCopy() } - // DeleteCollection must remain backwards compatible with old clients that expect it to - // remove all resources, initialized or not, within the type. It is also consistent with - // Delete which does not require IncludeUninitialized - listOptions.IncludeUninitialized = true - listObj, err := e.List(ctx, listOptions) if err != nil { return nil, err @@ -1174,7 +1067,6 @@ func (e *Store) Watch(ctx context.Context, options *metainternalversion.ListOpti resourceVersion := "" if options != nil { resourceVersion = options.ResourceVersion - predicate.IncludeUninitialized = options.IncludeUninitialized } return e.WatchPredicate(ctx, predicate, resourceVersion) } diff --git a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go index 33c876c35e..0208257e0c 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go @@ -42,11 +42,9 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apimachinery/pkg/watch" "k8s.io/apiserver/pkg/apis/example" examplev1 "k8s.io/apiserver/pkg/apis/example/v1" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/storage" @@ -56,8 +54,6 @@ import ( "k8s.io/apiserver/pkg/storage/names" "k8s.io/apiserver/pkg/storage/storagebackend/factory" storagetesting "k8s.io/apiserver/pkg/storage/testing" - utilfeature "k8s.io/apiserver/pkg/util/feature" - utilfeaturetesting "k8s.io/apiserver/pkg/util/feature/testing" ) var scheme = runtime.NewScheme() @@ -127,9 +123,9 @@ func NewTestGenericStoreRegistry(t *testing.T) (factory.DestroyFunc, *Store) { return newTestGenericStoreRegistry(t, scheme, false) } -func getPodAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func getPodAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { pod := obj.(*example.Pod) - return labels.Set{"name": pod.ObjectMeta.Name}, nil, pod.Initializers != nil, nil + return labels.Set{"name": pod.ObjectMeta.Name}, nil, nil } // matchPodName returns selection predicate that matches any pod with name in the set. @@ -152,8 +148,8 @@ func matchEverything() storage.SelectionPredicate { return storage.SelectionPredicate{ Label: labels.Everything(), Field: fields.Everything(), - GetAttrs: func(obj runtime.Object) (label labels.Set, field fields.Set, uninitialized bool, err error) { - return nil, nil, false, nil + GetAttrs: func(obj runtime.Object) (label labels.Set, field fields.Set, err error) { + return nil, nil, nil }, } } @@ -379,33 +375,6 @@ func TestStoreCreate(t *testing.T) { } } -func isPendingInitialization(obj metav1.Object) bool { - return obj.GetInitializers() != nil && obj.GetInitializers().Result == nil && len(obj.GetInitializers().Pending) > 0 -} - -func hasInitializers(obj metav1.Object, expected ...string) bool { - if !isPendingInitialization(obj) { - return false - } - if len(expected) != len(obj.GetInitializers().Pending) { - return false - } - for i, init := range obj.GetInitializers().Pending { - if init.Name != expected[i] { - return false - } - } - return true -} - -func isFailedInitialization(obj metav1.Object) bool { - return obj.GetInitializers() != nil && obj.GetInitializers().Result != nil && obj.GetInitializers().Result.Status == metav1.StatusFailure -} - -func isInitialized(obj metav1.Object) bool { - return obj.GetInitializers() == nil -} - func isQualifiedResource(err error, kind, group string) bool { if err.(errors.APIStatus).Status().Details.Kind != kind || err.(errors.APIStatus).Status().Details.Group != group { return false @@ -413,185 +382,6 @@ func isQualifiedResource(err error, kind, group string) bool { return true } -func TestStoreCreateInitialized(t *testing.T) { - defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.Initializers, true)() - - podA := &example.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "foo", Namespace: "test", - Initializers: &metav1.Initializers{ - Pending: []metav1.Initializer{{Name: validInitializerName}}, - }, - }, - Spec: example.PodSpec{NodeName: "machine"}, - } - - ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") - destroyFunc, registry := NewTestGenericStoreRegistry(t) - defer destroyFunc() - - ch := make(chan struct{}) - chObserver := make(chan struct{}) - - // simulate a background initializer that initializes the object - early := make(chan struct{}, 1) - go func() { - defer close(ch) - w, err := registry.Watch(ctx, &metainternalversion.ListOptions{ - IncludeUninitialized: true, - Watch: true, - FieldSelector: fields.OneTermEqualSelector("metadata.name", "foo"), - }) - if err != nil { - t.Fatal(err) - } - defer w.Stop() - event := <-w.ResultChan() - pod := event.Object.(*example.Pod) - if event.Type != watch.Added || !hasInitializers(pod, validInitializerName) { - t.Fatalf("unexpected event: %s %#v", event.Type, event.Object) - } - - select { - case <-early: - t.Fatalf("CreateInitialized should not have returned") - default: - } - - pod.Initializers = nil - updated, _, err := registry.Update(ctx, podA.Name, rest.DefaultUpdatedObjectInfo(pod), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) - if err != nil { - t.Fatal(err) - } - pod = updated.(*example.Pod) - if !isInitialized(pod) { - t.Fatalf("unexpected update: %#v", pod.Initializers) - } - - event = <-w.ResultChan() - if event.Type != watch.Modified || !isInitialized(event.Object.(*example.Pod)) { - t.Fatalf("unexpected event: %s %#v", event.Type, event.Object) - } - }() - - // create a background worker that should only observe the final creation - go func() { - defer close(chObserver) - w, err := registry.Watch(ctx, &metainternalversion.ListOptions{ - IncludeUninitialized: false, - Watch: true, - FieldSelector: fields.OneTermEqualSelector("metadata.name", "foo"), - }) - if err != nil { - t.Fatal(err) - } - defer w.Stop() - - event := <-w.ResultChan() - pod := event.Object.(*example.Pod) - if event.Type != watch.Added || !isInitialized(pod) { - t.Fatalf("unexpected event: %s %#v", event.Type, event.Object) - } - }() - - // create the object - objA, err := registry.Create(ctx, podA, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - // signal that we're now waiting, then wait for both observers to see - // the result of the create. - early <- struct{}{} - <-ch - <-chObserver - - // get the object - checkobj, err := registry.Get(ctx, podA.Name, &metav1.GetOptions{}) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - // verify objects are equal - if e, a := objA, checkobj; !reflect.DeepEqual(e, a) { - t.Errorf("Expected %#v, got %#v", e, a) - } -} - -func TestStoreCreateInitializedFailed(t *testing.T) { - defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.Initializers, true)() - - podA := &example.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "foo", Namespace: "test", - Initializers: &metav1.Initializers{ - Pending: []metav1.Initializer{{Name: validInitializerName}}, - }, - }, - Spec: example.PodSpec{NodeName: "machine"}, - } - - ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") - destroyFunc, registry := NewTestGenericStoreRegistry(t) - defer destroyFunc() - - ch := make(chan struct{}) - go func() { - w, err := registry.Watch(ctx, &metainternalversion.ListOptions{ - IncludeUninitialized: true, - Watch: true, - FieldSelector: fields.OneTermEqualSelector("metadata.name", "foo"), - }) - if err != nil { - t.Fatal(err) - } - event := <-w.ResultChan() - pod := event.Object.(*example.Pod) - if event.Type != watch.Added || !hasInitializers(pod, validInitializerName) { - t.Fatalf("unexpected event: %s %#v", event.Type, event.Object) - } - pod.Initializers.Pending = nil - pod.Initializers.Result = &metav1.Status{Status: metav1.StatusFailure, Code: 403, Reason: metav1.StatusReasonForbidden, Message: "induced failure"} - updated, _, err := registry.Update(ctx, podA.Name, rest.DefaultUpdatedObjectInfo(pod), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) - if err != nil { - t.Fatal(err) - } - pod = updated.(*example.Pod) - if !isFailedInitialization(pod) { - t.Fatalf("unexpected update: %#v", pod.Initializers) - } - - event = <-w.ResultChan() - if event.Type != watch.Modified || !isFailedInitialization(event.Object.(*example.Pod)) { - t.Fatalf("unexpected event: %s %#v", event.Type, event.Object) - } - - event = <-w.ResultChan() - if event.Type != watch.Deleted || !isFailedInitialization(event.Object.(*example.Pod)) { - t.Fatalf("unexpected event: %s %#v", event.Type, event.Object) - } - w.Stop() - close(ch) - }() - - // create the object - _, err := registry.Create(ctx, podA, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) - if !errors.IsForbidden(err) { - t.Fatalf("unexpected error: %#v", err.(errors.APIStatus).Status()) - } - if err.(errors.APIStatus).Status().Message != "induced failure" { - t.Fatalf("unexpected error: %#v", err) - } - - <-ch - - // get the object - _, err = registry.Get(ctx, podA.Name, &metav1.GetOptions{}) - if !errors.IsNotFound(err) { - t.Fatalf("Unexpected error: %v", err) - } -} - func updateAndVerify(t *testing.T, ctx context.Context, registry *Store, pod *example.Pod) bool { obj, _, err := registry.Update(ctx, pod.Name, rest.DefaultUpdatedObjectInfo(pod), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) if err != nil { @@ -897,44 +687,6 @@ func TestStoreDelete(t *testing.T) { } } -func TestStoreDeleteUninitialized(t *testing.T) { - podA := &example.Pod{ - ObjectMeta: metav1.ObjectMeta{Name: "foo", Initializers: &metav1.Initializers{Pending: []metav1.Initializer{{Name: validInitializerName}}}}, - Spec: example.PodSpec{NodeName: "machine"}, - } - - testContext := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") - destroyFunc, registry := NewTestGenericStoreRegistry(t) - defer destroyFunc() - - // test failure condition - _, _, err := registry.Delete(testContext, podA.Name, nil) - if !errors.IsNotFound(err) { - t.Errorf("Unexpected error: %v", err) - } - - // create pod - _, err = registry.Create(testContext, podA, rest.ValidateAllObjectFunc, &metav1.CreateOptions{IncludeUninitialized: true}) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - // delete object - _, wasDeleted, err := registry.Delete(testContext, podA.Name, nil) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - if !wasDeleted { - t.Errorf("unexpected, pod %s should have been deleted immediately", podA.Name) - } - - // try to get a item which should be deleted - _, err = registry.Get(testContext, podA.Name, &metav1.GetOptions{}) - if !errors.IsNotFound(err) { - t.Errorf("Unexpected error: %v", err) - } -} - // TestGracefulStoreCanDeleteIfExistingGracePeriodZero tests recovery from // race condition where the graceful delete is unable to complete // in prior operation, but the pod remains with deletion timestamp @@ -1040,45 +792,6 @@ func TestGracefulStoreHandleFinalizers(t *testing.T) { } } -func TestFailedInitializationStoreUpdate(t *testing.T) { - defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.Initializers, true)() - - initialGeneration := int64(1) - podInitializing := &example.Pod{ - ObjectMeta: metav1.ObjectMeta{Name: "foo", Initializers: &metav1.Initializers{Pending: []metav1.Initializer{{Name: validInitializerName}}}, Generation: initialGeneration}, - Spec: example.PodSpec{NodeName: "machine"}, - } - - testContext := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") - destroyFunc, registry := NewTestGenericStoreRegistry(t) - registry.EnableGarbageCollection = true - defaultDeleteStrategy := testRESTStrategy{scheme, names.SimpleNameGenerator, true, false, true} - registry.DeleteStrategy = testGracefulStrategy{defaultDeleteStrategy} - defer destroyFunc() - - // create pod, view initializing - obj, err := registry.Create(testContext, podInitializing, rest.ValidateAllObjectFunc, &metav1.CreateOptions{IncludeUninitialized: true}) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - pod := obj.(*example.Pod) - - // update the pod with initialization failure, the pod should be deleted - pod.Initializers.Result = &metav1.Status{Status: metav1.StatusFailure} - result, _, err := registry.Update(testContext, podInitializing.Name, rest.DefaultUpdatedObjectInfo(pod), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - _, err = registry.Get(testContext, podInitializing.Name, &metav1.GetOptions{}) - if err == nil || !errors.IsNotFound(err) { - t.Fatalf("Unexpected error: %v", err) - } - pod = result.(*example.Pod) - if pod.Initializers == nil || pod.Initializers.Result == nil || pod.Initializers.Result.Status != metav1.StatusFailure { - t.Fatalf("Pod returned from update was not correct: %#v", pod) - } -} - func TestNonGracefulStoreHandleFinalizers(t *testing.T) { initialGeneration := int64(1) podWithFinalizer := &example.Pod{ @@ -1656,14 +1369,6 @@ func TestStoreDeletionPropagation(t *testing.T) { func TestStoreDeleteCollection(t *testing.T) { podA := &example.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} podB := &example.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} - podC := &example.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "baz", - Initializers: &metav1.Initializers{ - Pending: []metav1.Initializer{{Name: validInitializerName}}, - }, - }, - } testContext := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") destroyFunc, registry := NewTestGenericStoreRegistry(t) @@ -1675,9 +1380,6 @@ func TestStoreDeleteCollection(t *testing.T) { if _, err := registry.Create(testContext, podB, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}); err != nil { t.Errorf("Unexpected error: %v", err) } - if _, err := registry.Create(testContext, podC, rest.ValidateAllObjectFunc, &metav1.CreateOptions{IncludeUninitialized: true}); err != nil { - t.Errorf("Unexpected error: %v", err) - } // Delete all pods. deleted, err := registry.DeleteCollection(testContext, nil, &metainternalversion.ListOptions{}) @@ -1685,7 +1387,7 @@ func TestStoreDeleteCollection(t *testing.T) { t.Fatalf("Unexpected error: %v", err) } deletedPods := deleted.(*example.PodList) - if len(deletedPods.Items) != 3 { + if len(deletedPods.Items) != 2 { t.Errorf("Unexpected number of pods deleted: %d, expected: 3", len(deletedPods.Items)) } @@ -1695,9 +1397,6 @@ func TestStoreDeleteCollection(t *testing.T) { if _, err := registry.Get(testContext, podB.Name, &metav1.GetOptions{}); !errors.IsNotFound(err) { t.Errorf("Unexpected error: %v", err) } - if _, err := registry.Get(testContext, podC.Name, &metav1.GetOptions{}); !errors.IsNotFound(err) { - t.Errorf("Unexpected error: %v", err) - } } func TestStoreDeleteCollectionNotFound(t *testing.T) { @@ -1892,12 +1591,12 @@ func newTestGenericStoreRegistry(t *testing.T, scheme *runtime.Scheme, hasCacheE return storage.SelectionPredicate{ Label: label, Field: field, - GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, bool, error) { + GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) { pod, ok := obj.(*example.Pod) if !ok { - return nil, nil, false, fmt.Errorf("not a pod") + return nil, nil, fmt.Errorf("not a pod") } - return labels.Set(pod.ObjectMeta.Labels), generic.ObjectMetaFieldsSet(&pod.ObjectMeta, true), pod.Initializers != nil, nil + return labels.Set(pod.ObjectMeta.Labels), generic.ObjectMetaFieldsSet(&pod.ObjectMeta, true), nil }, } }, diff --git a/staging/src/k8s.io/apiserver/pkg/registry/rest/BUILD b/staging/src/k8s.io/apiserver/pkg/registry/rest/BUILD index 7ad6f3b6fa..37d58875c5 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/rest/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/registry/rest/BUILD @@ -48,9 +48,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/names:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", ], ) diff --git a/staging/src/k8s.io/apiserver/pkg/registry/rest/create.go b/staging/src/k8s.io/apiserver/pkg/registry/rest/create.go index 388ca52339..8e69cb76b6 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/rest/create.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/rest/create.go @@ -28,9 +28,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apiserver/pkg/admission" - "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/storage/names" - utilfeature "k8s.io/apiserver/pkg/util/feature" ) // RESTCreateStrategy defines the minimum validation, accepted input, and @@ -92,11 +90,8 @@ func BeforeCreate(strategy RESTCreateStrategy, ctx context.Context, obj runtime. objectMeta.SetName(strategy.GenerateName(objectMeta.GetGenerateName())) } - // Ensure Initializers are not set unless the feature is enabled - if !utilfeature.DefaultFeatureGate.Enabled(features.Initializers) { - objectMeta.SetInitializers(nil) - } - + // Initializers are a deprecated alpha field and should not be saved + objectMeta.SetInitializers(nil) // ClusterName is ignored and should not be saved if len(objectMeta.GetClusterName()) > 0 { objectMeta.SetClusterName("") diff --git a/staging/src/k8s.io/apiserver/pkg/registry/rest/rest.go b/staging/src/k8s.io/apiserver/pkg/registry/rest/rest.go index 572f924e73..9fad541348 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/rest/rest.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/rest/rest.go @@ -176,8 +176,7 @@ type Creater interface { // This object must be a pointer type for use with Codec.DecodeInto([]byte, runtime.Object) New() runtime.Object - // Create creates a new version of a resource. If includeUninitialized is set, the object may be returned - // without completing initialization. + // Create creates a new version of a resource. Create(ctx context.Context, obj runtime.Object, createValidation ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) } @@ -189,8 +188,7 @@ type NamedCreater interface { // Create creates a new version of a resource. It expects a name parameter from the path. // This is needed for create operations on subresources which include the name of the parent - // resource in the path. If includeUninitialized is set, the object may be returned without - // completing initialization. + // resource in the path. Create(ctx context.Context, name string, obj runtime.Object, createValidation ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) } diff --git a/staging/src/k8s.io/apiserver/pkg/registry/rest/update.go b/staging/src/k8s.io/apiserver/pkg/registry/rest/update.go index 147541bcfd..048c35fa4e 100644 --- a/staging/src/k8s.io/apiserver/pkg/registry/rest/update.go +++ b/staging/src/k8s.io/apiserver/pkg/registry/rest/update.go @@ -28,8 +28,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apiserver/pkg/admission" - "k8s.io/apiserver/pkg/features" - utilfeature "k8s.io/apiserver/pkg/util/feature" ) // RESTUpdateStrategy defines the minimum validation, accepted input, and @@ -104,11 +102,9 @@ func BeforeUpdate(strategy RESTUpdateStrategy, ctx context.Context, obj, old run } objectMeta.SetGeneration(oldMeta.GetGeneration()) - // Ensure Initializers are not set unless the feature is enabled - if !utilfeature.DefaultFeatureGate.Enabled(features.Initializers) { - oldMeta.SetInitializers(nil) - objectMeta.SetInitializers(nil) - } + // Initializers are a deprecated alpha field and should not be saved + oldMeta.SetInitializers(nil) + objectMeta.SetInitializers(nil) strategy.PrepareForUpdate(ctx, obj, old) diff --git a/staging/src/k8s.io/apiserver/pkg/server/BUILD b/staging/src/k8s.io/apiserver/pkg/server/BUILD index e66dd2298a..18f319fd31 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/server/BUILD @@ -73,7 +73,6 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/waitgroup:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/version:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/BUILD b/staging/src/k8s.io/apiserver/pkg/server/options/BUILD index 79c96a1394..f8859d1f22 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/server/options/BUILD @@ -36,7 +36,6 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/initializer:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/metrics:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating:go_default_library", diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/admission.go b/staging/src/k8s.io/apiserver/pkg/server/options/admission.go index b53c05f62a..09d4854141 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/admission.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/admission.go @@ -28,7 +28,6 @@ import ( "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/admission/initializer" admissionmetrics "k8s.io/apiserver/pkg/admission/metrics" - "k8s.io/apiserver/pkg/admission/plugin/initialization" "k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle" mutatingwebhook "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating" validatingwebhook "k8s.io/apiserver/pkg/admission/plugin/webhook/validating" @@ -79,8 +78,8 @@ func NewAdmissionOptions() *AdmissionOptions { // admission plugins. The apiserver always runs the validating ones // after all the mutating ones, so their relative order in this list // doesn't matter. - RecommendedPluginOrder: []string{lifecycle.PluginName, initialization.PluginName, mutatingwebhook.PluginName, validatingwebhook.PluginName}, - DefaultOffPlugins: sets.NewString(initialization.PluginName), + RecommendedPluginOrder: []string{lifecycle.PluginName, mutatingwebhook.PluginName, validatingwebhook.PluginName}, + DefaultOffPlugins: sets.NewString(), } server.RegisterAllAdmissionPlugins(options.Plugins) return options diff --git a/staging/src/k8s.io/apiserver/pkg/server/plugins.go b/staging/src/k8s.io/apiserver/pkg/server/plugins.go index 84813aafe6..7a9094337d 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/plugins.go +++ b/staging/src/k8s.io/apiserver/pkg/server/plugins.go @@ -19,7 +19,6 @@ package server // This file exists to force the desired plugin implementations to be linked into genericapi pkg. import ( "k8s.io/apiserver/pkg/admission" - "k8s.io/apiserver/pkg/admission/plugin/initialization" "k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle" mutatingwebhook "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating" validatingwebhook "k8s.io/apiserver/pkg/admission/plugin/webhook/validating" @@ -28,7 +27,6 @@ import ( // RegisterAllAdmissionPlugins registers all admission plugins func RegisterAllAdmissionPlugins(plugins *admission.Plugins) { lifecycle.Register(plugins) - initialization.Register(plugins) validatingwebhook.Register(plugins) mutatingwebhook.Register(plugins) } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go index e3515148c3..008f768ec4 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go @@ -62,8 +62,8 @@ type Config struct { // KeyFunc is used to get a key in the underlying storage for a given object. KeyFunc func(runtime.Object) (string, error) - // GetAttrsFunc is used to get object labels, fields, and the uninitialized bool - GetAttrsFunc func(runtime.Object) (label labels.Set, field fields.Set, uninitialized bool, err error) + // GetAttrsFunc is used to get object labels, fields + GetAttrsFunc func(runtime.Object) (label labels.Set, field fields.Set, err error) // TriggerPublisherFunc is used for optimizing amount of watchers that // needs to process an incoming event. @@ -131,7 +131,7 @@ func (i *indexedWatchers) terminateAll(objectType reflect.Type) { } } -type filterWithAttrsFunc func(key string, l labels.Set, f fields.Set, uninitialized bool) bool +type filterWithAttrsFunc func(key string, l labels.Set, f fields.Set) bool // Cacher is responsible for serving WATCH and LIST requests for a given // resource from its internal cache and updating its cache in the background @@ -458,7 +458,7 @@ func (c *Cacher) GetToList(ctx context.Context, key string, resourceVersion stri if !ok { return fmt.Errorf("non *storeElement returned from storage: %v", obj) } - if filter(elem.Key, elem.Labels, elem.Fields, elem.Uninitialized) { + if filter(elem.Key, elem.Labels, elem.Fields) { listVal.Set(reflect.Append(listVal, reflect.ValueOf(elem.Object).Elem())) } } @@ -532,7 +532,7 @@ func (c *Cacher) List(ctx context.Context, key string, resourceVersion string, p if !ok { return fmt.Errorf("non *storeElement returned from storage: %v", obj) } - if filter(elem.Key, elem.Labels, elem.Fields, elem.Uninitialized) { + if filter(elem.Key, elem.Labels, elem.Fields) { listVal.Set(reflect.Append(listVal, reflect.ValueOf(elem.Object).Elem())) } } @@ -693,11 +693,11 @@ func forgetWatcher(c *Cacher, index int, triggerValue string, triggerSupported b } func filterWithAttrsFunction(key string, p storage.SelectionPredicate) filterWithAttrsFunc { - filterFunc := func(objKey string, label labels.Set, field fields.Set, uninitialized bool) bool { + filterFunc := func(objKey string, label labels.Set, field fields.Set) bool { if !hasPathPrefix(objKey, key) { return false } - return p.MatchesObjectAttributes(label, field, uninitialized) + return p.MatchesObjectAttributes(label, field) } return filterFunc } @@ -871,10 +871,10 @@ func (c *cacheWatcher) add(event *watchCacheEvent, budget *timeBudget) { // NOTE: sendWatchCacheEvent is assumed to not modify !!! func (c *cacheWatcher) sendWatchCacheEvent(event *watchCacheEvent) { - curObjPasses := event.Type != watch.Deleted && c.filter(event.Key, event.ObjLabels, event.ObjFields, event.ObjUninitialized) + curObjPasses := event.Type != watch.Deleted && c.filter(event.Key, event.ObjLabels, event.ObjFields) oldObjPasses := false if event.PrevObject != nil { - oldObjPasses = c.filter(event.Key, event.PrevObjLabels, event.PrevObjFields, event.PrevObjUninitialized) + oldObjPasses = c.filter(event.Key, event.PrevObjLabels, event.PrevObjFields) } if !curObjPasses && !oldObjPasses { // Watcher is not interested in that object. diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go index 780af4b2d1..2f36e43163 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go @@ -46,7 +46,7 @@ import ( func TestCacheWatcherCleanupNotBlockedByResult(t *testing.T) { var lock sync.RWMutex count := 0 - filter := func(string, labels.Set, fields.Set, bool) bool { return true } + filter := func(string, labels.Set, fields.Set) bool { return true } forget := func(bool) { lock.Lock() defer lock.Unlock() @@ -70,7 +70,7 @@ func TestCacheWatcherCleanupNotBlockedByResult(t *testing.T) { } func TestCacheWatcherHandlesFiltering(t *testing.T) { - filter := func(_ string, _ labels.Set, field fields.Set, _ bool) bool { + filter := func(_ string, _ labels.Set, field fields.Set) bool { return field["spec.nodeName"] == "host" } forget := func(bool) {} @@ -240,7 +240,7 @@ func newTestCacher(s storage.Interface, cap int) (*Cacher, storage.Versioner) { Type: &example.Pod{}, ResourcePrefix: prefix, KeyFunc: func(obj runtime.Object) (string, error) { return storage.NamespaceKeyFunc(prefix, obj) }, - GetAttrsFunc: func(obj runtime.Object) (labels.Set, fields.Set, bool, error) { return nil, nil, true, nil }, + GetAttrsFunc: func(obj runtime.Object) (labels.Set, fields.Set, error) { return nil, nil, nil }, NewListFunc: func() runtime.Object { return &example.PodList{} }, Codec: codecs.LegacyCodec(examplev1.SchemeGroupVersion), } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go index 527b81dda2..b11c0c2b1c 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go @@ -46,30 +46,27 @@ const ( // the previous value of the object to enable proper filtering in the // upper layers. type watchCacheEvent struct { - Type watch.EventType - Object runtime.Object - ObjLabels labels.Set - ObjFields fields.Set - ObjUninitialized bool - PrevObject runtime.Object - PrevObjLabels labels.Set - PrevObjFields fields.Set - PrevObjUninitialized bool - Key string - ResourceVersion uint64 + Type watch.EventType + Object runtime.Object + ObjLabels labels.Set + ObjFields fields.Set + PrevObject runtime.Object + PrevObjLabels labels.Set + PrevObjFields fields.Set + Key string + ResourceVersion uint64 } // Computing a key of an object is generally non-trivial (it performs // e.g. validation underneath). Similarly computing object fields and // labels. To avoid computing them multiple times (to serve the event // in different List/Watch requests), in the underlying store we are -// keeping structs (key, object, labels, fields, uninitialized). +// keeping structs (key, object, labels, fields). type storeElement struct { - Key string - Object runtime.Object - Labels labels.Set - Fields fields.Set - Uninitialized bool + Key string + Object runtime.Object + Labels labels.Set + Fields fields.Set } func storeElementKey(obj interface{}) (string, error) { @@ -107,7 +104,7 @@ type watchCache struct { keyFunc func(runtime.Object) (string, error) // getAttrsFunc is used to get labels and fields of an object. - getAttrsFunc func(runtime.Object) (labels.Set, fields.Set, bool, error) + getAttrsFunc func(runtime.Object) (labels.Set, fields.Set, error) // cache is used a cyclic buffer - its first element (with the smallest // resourceVersion) is defined by startIndex, its last element is defined @@ -147,7 +144,7 @@ type watchCache struct { func newWatchCache( capacity int, keyFunc func(runtime.Object) (string, error), - getAttrsFunc func(runtime.Object) (labels.Set, fields.Set, bool, error), + getAttrsFunc func(runtime.Object) (labels.Set, fields.Set, error), versioner storage.Versioner) *watchCache { wc := &watchCache{ capacity: capacity, @@ -220,19 +217,18 @@ func (w *watchCache) processEvent(event watch.Event, resourceVersion uint64, upd return fmt.Errorf("couldn't compute key: %v", err) } elem := &storeElement{Key: key, Object: event.Object} - elem.Labels, elem.Fields, elem.Uninitialized, err = w.getAttrsFunc(event.Object) + elem.Labels, elem.Fields, err = w.getAttrsFunc(event.Object) if err != nil { return err } watchCacheEvent := &watchCacheEvent{ - Type: event.Type, - Object: elem.Object, - ObjLabels: elem.Labels, - ObjFields: elem.Fields, - ObjUninitialized: elem.Uninitialized, - Key: key, - ResourceVersion: resourceVersion, + Type: event.Type, + Object: elem.Object, + ObjLabels: elem.Labels, + ObjFields: elem.Fields, + Key: key, + ResourceVersion: resourceVersion, } // TODO: We should consider moving this lock below after the watchCacheEvent @@ -250,7 +246,6 @@ func (w *watchCache) processEvent(event watch.Event, resourceVersion uint64, upd watchCacheEvent.PrevObject = previousElem.Object watchCacheEvent.PrevObjLabels = previousElem.Labels watchCacheEvent.PrevObjFields = previousElem.Fields - watchCacheEvent.PrevObjUninitialized = previousElem.Uninitialized } if w.onEvent != nil { @@ -373,16 +368,15 @@ func (w *watchCache) Replace(objs []interface{}, resourceVersion string) error { if err != nil { return fmt.Errorf("couldn't compute key: %v", err) } - objLabels, objFields, objUninitialized, err := w.getAttrsFunc(object) + objLabels, objFields, err := w.getAttrsFunc(object) if err != nil { return err } toReplace = append(toReplace, &storeElement{ - Key: key, - Object: object, - Labels: objLabels, - Fields: objFields, - Uninitialized: objUninitialized, + Key: key, + Object: object, + Labels: objLabels, + Fields: objFields, }) } @@ -451,18 +445,17 @@ func (w *watchCache) GetAllEventsSinceThreadUnsafe(resourceVersion uint64) ([]*w if !ok { return nil, fmt.Errorf("not a storeElement: %v", elem) } - objLabels, objFields, objUninitialized, err := w.getAttrsFunc(elem.Object) + objLabels, objFields, err := w.getAttrsFunc(elem.Object) if err != nil { return nil, err } result[i] = &watchCacheEvent{ - Type: watch.Added, - Object: elem.Object, - ObjLabels: objLabels, - ObjFields: objFields, - ObjUninitialized: objUninitialized, - Key: elem.Key, - ResourceVersion: w.resourceVersion, + Type: watch.Added, + Object: elem.Object, + ObjLabels: objLabels, + ObjFields: objFields, + Key: elem.Key, + ResourceVersion: w.resourceVersion, } } return result, nil diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go index 594105faae..b7bfa0bd54 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go @@ -56,11 +56,10 @@ func makeTestPod(name string, resourceVersion uint64) *v1.Pod { func makeTestStoreElement(pod *v1.Pod) *storeElement { return &storeElement{ - Key: "prefix/ns/" + pod.Name, - Object: pod, - Labels: labels.Set(pod.Labels), - Fields: fields.Set{"spec.nodeName": pod.Spec.NodeName}, - Uninitialized: false, + Key: "prefix/ns/" + pod.Name, + Object: pod, + Labels: labels.Set(pod.Labels), + Fields: fields.Set{"spec.nodeName": pod.Spec.NodeName}, } } @@ -69,12 +68,12 @@ func newTestWatchCache(capacity int) *watchCache { keyFunc := func(obj runtime.Object) (string, error) { return storage.NamespaceKeyFunc("prefix", obj) } - getAttrsFunc := func(obj runtime.Object) (labels.Set, fields.Set, bool, error) { + getAttrsFunc := func(obj runtime.Object) (labels.Set, fields.Set, error) { pod, ok := obj.(*v1.Pod) if !ok { - return nil, nil, false, fmt.Errorf("not a pod") + return nil, nil, fmt.Errorf("not a pod") } - return labels.Set(pod.Labels), fields.Set{"spec.nodeName": pod.Spec.NodeName}, false, nil + return labels.Set(pod.Labels), fields.Set{"spec.nodeName": pod.Spec.NodeName}, nil } versioner := etcd.APIObjectVersioner{} wc := newWatchCache(capacity, keyFunc, getAttrsFunc, versioner) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go index 2cf08211c6..8f4ae504a9 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go @@ -314,9 +314,9 @@ func TestGetToList(t *testing.T) { pred: storage.SelectionPredicate{ Label: labels.Everything(), Field: fields.ParseSelectorOrDie("metadata.name!=" + storedObj.Name), - GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, bool, error) { + GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) { pod := obj.(*example.Pod) - return nil, fields.Set{"metadata.name": pod.Name}, pod.Initializers != nil, nil + return nil, fields.Set{"metadata.name": pod.Name}, nil }, }, expectedOut: nil, @@ -819,9 +819,9 @@ func TestList(t *testing.T) { t.Fatal(err) } - getAttrs := func(obj runtime.Object) (labels.Set, fields.Set, bool, error) { + getAttrs := func(obj runtime.Object) (labels.Set, fields.Set, error) { pod := obj.(*example.Pod) - return nil, fields.Set{"metadata.name": pod.Name}, pod.Initializers != nil, nil + return nil, fields.Set{"metadata.name": pod.Name}, nil } tests := []struct { @@ -1124,9 +1124,9 @@ func TestListContinuation(t *testing.T) { Continue: continueValue, Label: labels.Everything(), Field: fields.Everything(), - GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, bool, error) { + GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) { pod := obj.(*example.Pod) - return nil, fields.Set{"metadata.name": pod.Name}, pod.Initializers != nil, nil + return nil, fields.Set{"metadata.name": pod.Name}, nil }, } } @@ -1233,9 +1233,9 @@ func TestListInconsistentContinuation(t *testing.T) { Continue: continueValue, Label: labels.Everything(), Field: fields.Everything(), - GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, bool, error) { + GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) { pod := obj.(*example.Pod) - return nil, fields.Set{"metadata.name": pod.Name}, pod.Initializers != nil, nil + return nil, fields.Set{"metadata.name": pod.Name}, nil }, } } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go index caca032d2c..a843803885 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go @@ -72,9 +72,9 @@ func testWatch(t *testing.T, recursive bool) { pred: storage.SelectionPredicate{ Label: labels.Everything(), Field: fields.ParseSelectorOrDie("metadata.name=bar"), - GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, bool, error) { + GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) { pod := obj.(*example.Pod) - return nil, fields.Set{"metadata.name": pod.Name}, pod.Initializers != nil, nil + return nil, fields.Set{"metadata.name": pod.Name}, nil }, }, }, { // update @@ -87,9 +87,9 @@ func testWatch(t *testing.T, recursive bool) { pred: storage.SelectionPredicate{ Label: labels.Everything(), Field: fields.ParseSelectorOrDie("metadata.name!=bar"), - GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, bool, error) { + GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) { pod := obj.(*example.Pod) - return nil, fields.Set{"metadata.name": pod.Name}, pod.Initializers != nil, nil + return nil, fields.Set{"metadata.name": pod.Name}, nil }, }, }} diff --git a/staging/src/k8s.io/apiserver/pkg/storage/interfaces.go b/staging/src/k8s.io/apiserver/pkg/storage/interfaces.go index 2b5da24ff8..56dd6dbdc9 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/interfaces.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/interfaces.go @@ -86,8 +86,6 @@ type TriggerPublisherFunc func(obj runtime.Object) []MatchValue var Everything = SelectionPredicate{ Label: labels.Everything(), Field: fields.Everything(), - // TODO: split this into a new top level constant? - IncludeUninitialized: true, } // Pass an UpdateFunc to Interface.GuaranteedUpdate to make an update diff --git a/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate.go b/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate.go index 9c8c3d5994..bed741dfa7 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate.go @@ -25,59 +25,58 @@ import ( // AttrFunc returns label and field sets and the uninitialized flag for List or Watch to match. // In any failure to parse given object, it returns error. -type AttrFunc func(obj runtime.Object) (labels.Set, fields.Set, bool, error) +type AttrFunc func(obj runtime.Object) (labels.Set, fields.Set, error) // FieldMutationFunc allows the mutation of the field selection fields. It is mutating to // avoid the extra allocation on this common path type FieldMutationFunc func(obj runtime.Object, fieldSet fields.Set) error -func DefaultClusterScopedAttr(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func DefaultClusterScopedAttr(obj runtime.Object) (labels.Set, fields.Set, error) { metadata, err := meta.Accessor(obj) if err != nil { - return nil, nil, false, err + return nil, nil, err } fieldSet := fields.Set{ "metadata.name": metadata.GetName(), } - return labels.Set(metadata.GetLabels()), fieldSet, metadata.GetInitializers() != nil, nil + return labels.Set(metadata.GetLabels()), fieldSet, nil } -func DefaultNamespaceScopedAttr(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func DefaultNamespaceScopedAttr(obj runtime.Object) (labels.Set, fields.Set, error) { metadata, err := meta.Accessor(obj) if err != nil { - return nil, nil, false, err + return nil, nil, err } fieldSet := fields.Set{ "metadata.name": metadata.GetName(), "metadata.namespace": metadata.GetNamespace(), } - return labels.Set(metadata.GetLabels()), fieldSet, metadata.GetInitializers() != nil, nil + return labels.Set(metadata.GetLabels()), fieldSet, nil } func (f AttrFunc) WithFieldMutation(fieldMutator FieldMutationFunc) AttrFunc { - return func(obj runtime.Object) (labels.Set, fields.Set, bool, error) { - labelSet, fieldSet, initialized, err := f(obj) + return func(obj runtime.Object) (labels.Set, fields.Set, error) { + labelSet, fieldSet, err := f(obj) if err != nil { - return nil, nil, false, err + return nil, nil, err } if err := fieldMutator(obj, fieldSet); err != nil { - return nil, nil, false, err + return nil, nil, err } - return labelSet, fieldSet, initialized, nil + return labelSet, fieldSet, nil } } // SelectionPredicate is used to represent the way to select objects from api storage. type SelectionPredicate struct { - Label labels.Selector - Field fields.Selector - IncludeUninitialized bool - GetAttrs AttrFunc - IndexFields []string - Limit int64 - Continue string + Label labels.Selector + Field fields.Selector + GetAttrs AttrFunc + IndexFields []string + Limit int64 + Continue string } // Matches returns true if the given object's labels and fields (as @@ -87,13 +86,10 @@ func (s *SelectionPredicate) Matches(obj runtime.Object) (bool, error) { if s.Empty() { return true, nil } - labels, fields, uninitialized, err := s.GetAttrs(obj) + labels, fields, err := s.GetAttrs(obj) if err != nil { return false, err } - if !s.IncludeUninitialized && uninitialized { - return false, nil - } matched := s.Label.Matches(labels) if matched && s.Field != nil { matched = matched && s.Field.Matches(fields) @@ -103,10 +99,7 @@ func (s *SelectionPredicate) Matches(obj runtime.Object) (bool, error) { // MatchesObjectAttributes returns true if the given labels and fields // match s.Label and s.Field. -func (s *SelectionPredicate) MatchesObjectAttributes(l labels.Set, f fields.Set, uninitialized bool) bool { - if !s.IncludeUninitialized && uninitialized { - return false - } +func (s *SelectionPredicate) MatchesObjectAttributes(l labels.Set, f fields.Set) bool { if s.Label.Empty() && s.Field.Empty() { return true } @@ -146,5 +139,5 @@ func (s *SelectionPredicate) MatcherIndex() []MatchValue { // Empty returns true if the predicate performs no filtering. func (s *SelectionPredicate) Empty() bool { - return s.Label.Empty() && s.Field.Empty() && s.IncludeUninitialized + return s.Label.Empty() && s.Field.Empty() } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate_test.go b/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate_test.go index 8f6bcf7f89..16f15876ca 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate_test.go @@ -48,7 +48,6 @@ func TestSelectionPredicate(t *testing.T) { labelSelector, fieldSelector string labels labels.Set fields fields.Set - uninitialized bool err error shouldMatch bool matchSingleKey string @@ -81,14 +80,6 @@ func TestSelectionPredicate(t *testing.T) { shouldMatch: true, matchSingleKey: "12345", }, - "E": { - fieldSelector: "metadata.name=12345", - labels: labels.Set{}, - fields: fields.Set{"metadata.name": "12345"}, - uninitialized: true, - shouldMatch: false, - matchSingleKey: "12345", - }, "error": { labelSelector: "name=foo", fieldSelector: "uid=12345", @@ -109,8 +100,8 @@ func TestSelectionPredicate(t *testing.T) { sp := &SelectionPredicate{ Label: parsedLabel, Field: parsedField, - GetAttrs: func(runtime.Object) (label labels.Set, field fields.Set, uninitialized bool, err error) { - return item.labels, item.fields, item.uninitialized, item.err + GetAttrs: func(runtime.Object) (label labels.Set, field fields.Set, err error) { + return item.labels, item.fields, item.err }, } got, err := sp.Matches(&Ignored{}) diff --git a/staging/src/k8s.io/apiserver/pkg/storage/tests/cacher_test.go b/staging/src/k8s.io/apiserver/pkg/storage/tests/cacher_test.go index 42571822b8..581922fb13 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/tests/cacher_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/tests/cacher_test.go @@ -61,12 +61,12 @@ func init() { } // GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { pod, ok := obj.(*example.Pod) if !ok { - return nil, nil, false, fmt.Errorf("not a pod") + return nil, nil, fmt.Errorf("not a pod") } - return labels.Set(pod.ObjectMeta.Labels), PodToSelectableFields(pod), pod.Initializers != nil, nil + return labels.Set(pod.ObjectMeta.Labels), PodToSelectableFields(pod), nil } // PodToSelectableFields returns a field set that represents the object @@ -194,9 +194,9 @@ func TestGetToList(t *testing.T) { pred: storage.SelectionPredicate{ Label: labels.Everything(), Field: fields.ParseSelectorOrDie("metadata.name!=" + storedObj.Name), - GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, bool, error) { + GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) { pod := obj.(*example.Pod) - return nil, fields.Set{"metadata.name": pod.Name}, pod.Initializers != nil, nil + return nil, fields.Set{"metadata.name": pod.Name}, nil }, }, expectedOut: nil, @@ -520,12 +520,12 @@ func TestFiltering(t *testing.T) { pred := storage.SelectionPredicate{ Label: labels.SelectorFromSet(labels.Set{"filter": "foo"}), Field: fields.Everything(), - GetAttrs: func(obj runtime.Object) (label labels.Set, field fields.Set, uninitialized bool, err error) { + GetAttrs: func(obj runtime.Object) (label labels.Set, field fields.Set, err error) { metadata, err := meta.Accessor(obj) if err != nil { t.Fatalf("Unexpected error: %v", err) } - return labels.Set(metadata.GetLabels()), nil, metadata.GetInitializers() != nil, nil + return labels.Set(metadata.GetLabels()), nil, nil }, } watcher, err := cacher.Watch(context.TODO(), "pods/ns/foo", fooCreated.ResourceVersion, pred) diff --git a/staging/src/k8s.io/cli-runtime/Godeps/Godeps.json b/staging/src/k8s.io/cli-runtime/Godeps/Godeps.json index 6cb1250ecf..b1a330cd13 100644 --- a/staging/src/k8s.io/cli-runtime/Godeps/Godeps.json +++ b/staging/src/k8s.io/cli-runtime/Godeps/Godeps.json @@ -202,10 +202,6 @@ "ImportPath": "gopkg.in/yaml.v2", "Rev": "5420a8b6744d3b0345ab293f6fcba19c978f1183" }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/builder_flags.go b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/builder_flags.go index 1d2aec6dd5..2f953211ef 100644 --- a/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/builder_flags.go +++ b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/builder_flags.go @@ -28,12 +28,11 @@ import ( type ResourceBuilderFlags struct { FileNameFlags *FileNameFlags - LabelSelector *string - FieldSelector *string - AllNamespaces *bool - All *bool - Local *bool - IncludeUninitialized *bool + LabelSelector *string + FieldSelector *string + AllNamespaces *bool + All *bool + Local *bool Scheme *runtime.Scheme Latest bool @@ -88,12 +87,6 @@ func (o *ResourceBuilderFlags) WithLocal(defaultVal bool) *ResourceBuilderFlags return o } -// WithUninitialized is using an alpha feature and may be dropped -func (o *ResourceBuilderFlags) WithUninitialized(defaultVal bool) *ResourceBuilderFlags { - o.IncludeUninitialized = &defaultVal - return o -} - func (o *ResourceBuilderFlags) WithScheme(scheme *runtime.Scheme) *ResourceBuilderFlags { o.Scheme = scheme return o @@ -128,9 +121,6 @@ func (o *ResourceBuilderFlags) AddFlags(flagset *pflag.FlagSet) { if o.Local != nil { flagset.BoolVar(o.Local, "local", *o.Local, "If true, annotation will NOT contact api-server but run locally.") } - if o.IncludeUninitialized != nil { - flagset.BoolVar(o.IncludeUninitialized, "include-uninitialized", *o.IncludeUninitialized, `If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.`) - } } // ToBuilder gives you back a resource finder to visit resources that are located @@ -179,10 +169,6 @@ func (o *ResourceBuilderFlags) ToBuilder(restClientGetter RESTClientGetter, reso } } - if o.IncludeUninitialized != nil { - builder.IncludeUninitialized(*o.IncludeUninitialized) - } - if !o.StopOnFirstError { builder.ContinueOnError() } diff --git a/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/resource/builder.go b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/resource/builder.go index 42f660a4e5..edc61d264b 100644 --- a/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/resource/builder.go +++ b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/resource/builder.go @@ -73,12 +73,11 @@ type Builder struct { stream bool dir bool - labelSelector *string - fieldSelector *string - selectAll bool - includeUninitialized bool - limitChunks int64 - requestTransforms []RequestTransform + labelSelector *string + fieldSelector *string + selectAll bool + limitChunks int64 + requestTransforms []RequestTransform resources []string @@ -441,12 +440,6 @@ func (b *Builder) ExportParam(export bool) *Builder { return b } -// IncludeUninitialized accepts the include-uninitialized boolean for these resources -func (b *Builder) IncludeUninitialized(includeUninitialized bool) *Builder { - b.includeUninitialized = includeUninitialized - return b -} - // NamespaceParam accepts the namespace that these resources should be // considered under from - used by DefaultNamespace() and RequireNamespace() func (b *Builder) NamespaceParam(namespace string) *Builder { @@ -844,7 +837,7 @@ func (b *Builder) visitBySelector() *Result { if mapping.Scope.Name() != meta.RESTScopeNameNamespace { selectorNamespace = "" } - visitors = append(visitors, NewSelector(client, mapping, selectorNamespace, labelSelector, fieldSelector, b.export, b.includeUninitialized, b.limitChunks)) + visitors = append(visitors, NewSelector(client, mapping, selectorNamespace, labelSelector, fieldSelector, b.export, b.limitChunks)) } if b.continueOnError { result.visitor = EagerVisitorList(visitors) diff --git a/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/resource/selector.go b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/resource/selector.go index f36508bd4a..0c0bdbec41 100644 --- a/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/resource/selector.go +++ b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/resource/selector.go @@ -27,27 +27,25 @@ import ( // Selector is a Visitor for resources that match a label selector. type Selector struct { - Client RESTClient - Mapping *meta.RESTMapping - Namespace string - LabelSelector string - FieldSelector string - Export bool - IncludeUninitialized bool - LimitChunks int64 + Client RESTClient + Mapping *meta.RESTMapping + Namespace string + LabelSelector string + FieldSelector string + Export bool + LimitChunks int64 } // NewSelector creates a resource selector which hides details of getting items by their label selector. -func NewSelector(client RESTClient, mapping *meta.RESTMapping, namespace, labelSelector, fieldSelector string, export, includeUninitialized bool, limitChunks int64) *Selector { +func NewSelector(client RESTClient, mapping *meta.RESTMapping, namespace, labelSelector, fieldSelector string, export bool, limitChunks int64) *Selector { return &Selector{ - Client: client, - Mapping: mapping, - Namespace: namespace, - LabelSelector: labelSelector, - FieldSelector: fieldSelector, - Export: export, - IncludeUninitialized: includeUninitialized, - LimitChunks: limitChunks, + Client: client, + Mapping: mapping, + Namespace: namespace, + LabelSelector: labelSelector, + FieldSelector: fieldSelector, + Export: export, + LimitChunks: limitChunks, } } @@ -60,11 +58,10 @@ func (r *Selector) Visit(fn VisitorFunc) error { r.ResourceMapping().GroupVersionKind.GroupVersion().String(), r.Export, &metav1.ListOptions{ - LabelSelector: r.LabelSelector, - FieldSelector: r.FieldSelector, - IncludeUninitialized: r.IncludeUninitialized, - Limit: r.LimitChunks, - Continue: continueToken, + LabelSelector: r.LabelSelector, + FieldSelector: r.FieldSelector, + Limit: r.LimitChunks, + Continue: continueToken, }, ) if err != nil { diff --git a/staging/src/k8s.io/client-go/Godeps/Godeps.json b/staging/src/k8s.io/client-go/Godeps/Godeps.json index c2ce6b066a..3d4d25f44e 100644 --- a/staging/src/k8s.io/client-go/Godeps/Godeps.json +++ b/staging/src/k8s.io/client-go/Godeps/Godeps.json @@ -270,10 +270,6 @@ "ImportPath": "gopkg.in/yaml.v2", "Rev": "5420a8b6744d3b0345ab293f6fcba19c978f1183" }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/staging/src/k8s.io/client-go/informers/BUILD b/staging/src/k8s.io/client-go/informers/BUILD index 7810958a1c..b0d4e74483 100644 --- a/staging/src/k8s.io/client-go/informers/BUILD +++ b/staging/src/k8s.io/client-go/informers/BUILD @@ -10,7 +10,6 @@ go_library( importpath = "k8s.io/client-go/informers", visibility = ["//visibility:public"], deps = [ - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta1:go_default_library", diff --git a/staging/src/k8s.io/client-go/informers/admissionregistration/BUILD b/staging/src/k8s.io/client-go/informers/admissionregistration/BUILD index 133a747864..679ce4eefc 100644 --- a/staging/src/k8s.io/client-go/informers/admissionregistration/BUILD +++ b/staging/src/k8s.io/client-go/informers/admissionregistration/BUILD @@ -11,7 +11,6 @@ go_library( importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/informers/admissionregistration", importpath = "k8s.io/client-go/informers/admissionregistration", deps = [ - "//staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/client-go/informers/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library", ], @@ -28,7 +27,6 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1:all-srcs", "//staging/src/k8s.io/client-go/informers/admissionregistration/v1beta1:all-srcs", ], tags = ["automanaged"], diff --git a/staging/src/k8s.io/client-go/informers/admissionregistration/interface.go b/staging/src/k8s.io/client-go/informers/admissionregistration/interface.go index 7a0783cc3a..f56fe31e24 100644 --- a/staging/src/k8s.io/client-go/informers/admissionregistration/interface.go +++ b/staging/src/k8s.io/client-go/informers/admissionregistration/interface.go @@ -19,15 +19,12 @@ limitations under the License. package admissionregistration import ( - v1alpha1 "k8s.io/client-go/informers/admissionregistration/v1alpha1" v1beta1 "k8s.io/client-go/informers/admissionregistration/v1beta1" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to each of this group's versions. type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface } @@ -43,11 +40,6 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} - // V1beta1 returns a new v1beta1.Interface. func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) diff --git a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/BUILD b/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/BUILD deleted file mode 100644 index cc6eb8d2d2..0000000000 --- a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "initializerconfiguration.go", - "interface.go", - ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1", - importpath = "k8s.io/client-go/informers/admissionregistration/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/initializerconfiguration.go b/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/initializerconfiguration.go deleted file mode 100644 index 4cfaae5bdc..0000000000 --- a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/initializerconfiguration.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - time "time" - - admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1alpha1 "k8s.io/client-go/listers/admissionregistration/v1alpha1" - cache "k8s.io/client-go/tools/cache" -) - -// InitializerConfigurationInformer provides access to a shared informer and lister for -// InitializerConfigurations. -type InitializerConfigurationInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.InitializerConfigurationLister -} - -type initializerConfigurationInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewInitializerConfigurationInformer constructs a new informer for InitializerConfiguration type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewInitializerConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredInitializerConfigurationInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredInitializerConfigurationInformer constructs a new informer for InitializerConfiguration type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredInitializerConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.AdmissionregistrationV1alpha1().InitializerConfigurations().List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.AdmissionregistrationV1alpha1().InitializerConfigurations().Watch(options) - }, - }, - &admissionregistrationv1alpha1.InitializerConfiguration{}, - resyncPeriod, - indexers, - ) -} - -func (f *initializerConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredInitializerConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *initializerConfigurationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&admissionregistrationv1alpha1.InitializerConfiguration{}, f.defaultInformer) -} - -func (f *initializerConfigurationInformer) Lister() v1alpha1.InitializerConfigurationLister { - return v1alpha1.NewInitializerConfigurationLister(f.Informer().GetIndexer()) -} diff --git a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go b/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go deleted file mode 100644 index 0f47d65d84..0000000000 --- a/staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // InitializerConfigurations returns a InitializerConfigurationInformer. - InitializerConfigurations() InitializerConfigurationInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// InitializerConfigurations returns a InitializerConfigurationInformer. -func (v *version) InitializerConfigurations() InitializerConfigurationInformer { - return &initializerConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/staging/src/k8s.io/client-go/informers/generic.go b/staging/src/k8s.io/client-go/informers/generic.go index ab1a410ed1..530536d598 100644 --- a/staging/src/k8s.io/client-go/informers/generic.go +++ b/staging/src/k8s.io/client-go/informers/generic.go @@ -21,12 +21,11 @@ package informers import ( "fmt" - v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" v1beta1 "k8s.io/api/admissionregistration/v1beta1" v1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" v1beta2 "k8s.io/api/apps/v1beta2" - auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1" + v1alpha1 "k8s.io/api/auditregistration/v1alpha1" autoscalingv1 "k8s.io/api/autoscaling/v1" v2beta1 "k8s.io/api/autoscaling/v2beta1" v2beta2 "k8s.io/api/autoscaling/v2beta2" @@ -80,11 +79,7 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=admissionregistration.k8s.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("initializerconfigurations"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().InitializerConfigurations().Informer()}, nil - - // Group=admissionregistration.k8s.io, Version=v1beta1 + // Group=admissionregistration.k8s.io, Version=v1beta1 case v1beta1.SchemeGroupVersion.WithResource("mutatingwebhookconfigurations"): return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1beta1().MutatingWebhookConfigurations().Informer()}, nil case v1beta1.SchemeGroupVersion.WithResource("validatingwebhookconfigurations"): @@ -123,7 +118,7 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().StatefulSets().Informer()}, nil // Group=auditregistration.k8s.io, Version=v1alpha1 - case auditregistrationv1alpha1.SchemeGroupVersion.WithResource("auditsinks"): + case v1alpha1.SchemeGroupVersion.WithResource("auditsinks"): return &genericInformer{resource: resource.GroupResource(), informer: f.Auditregistration().V1alpha1().AuditSinks().Informer()}, nil // Group=autoscaling, Version=v1 diff --git a/staging/src/k8s.io/client-go/kubernetes/BUILD b/staging/src/k8s.io/client-go/kubernetes/BUILD index ed3e7ca8c5..0dc5428be7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/BUILD @@ -12,7 +12,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//staging/src/k8s.io/client-go/discovery:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1:go_default_library", @@ -63,7 +62,6 @@ filegroup( ":package-srcs", "//staging/src/k8s.io/client-go/kubernetes/fake:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/scheme:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1:all-srcs", diff --git a/staging/src/k8s.io/client-go/kubernetes/clientset.go b/staging/src/k8s.io/client-go/kubernetes/clientset.go index 3b530df542..921250d4e4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/clientset.go +++ b/staging/src/k8s.io/client-go/kubernetes/clientset.go @@ -20,7 +20,6 @@ package kubernetes import ( discovery "k8s.io/client-go/discovery" - admissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" @@ -59,7 +58,6 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface - AdmissionregistrationV1alpha1() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface // Deprecated: please explicitly pick a version if possible. Admissionregistration() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface @@ -134,44 +132,38 @@ type Interface interface { // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - admissionregistrationV1alpha1 *admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Client - admissionregistrationV1beta1 *admissionregistrationv1beta1.AdmissionregistrationV1beta1Client - appsV1 *appsv1.AppsV1Client - appsV1beta1 *appsv1beta1.AppsV1beta1Client - appsV1beta2 *appsv1beta2.AppsV1beta2Client - auditregistrationV1alpha1 *auditregistrationv1alpha1.AuditregistrationV1alpha1Client - authenticationV1 *authenticationv1.AuthenticationV1Client - authenticationV1beta1 *authenticationv1beta1.AuthenticationV1beta1Client - authorizationV1 *authorizationv1.AuthorizationV1Client - authorizationV1beta1 *authorizationv1beta1.AuthorizationV1beta1Client - autoscalingV1 *autoscalingv1.AutoscalingV1Client - autoscalingV2beta1 *autoscalingv2beta1.AutoscalingV2beta1Client - autoscalingV2beta2 *autoscalingv2beta2.AutoscalingV2beta2Client - batchV1 *batchv1.BatchV1Client - batchV1beta1 *batchv1beta1.BatchV1beta1Client - batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client - certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client - coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client - coordinationV1 *coordinationv1.CoordinationV1Client - coreV1 *corev1.CoreV1Client - eventsV1beta1 *eventsv1beta1.EventsV1beta1Client - extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client - networkingV1 *networkingv1.NetworkingV1Client - policyV1beta1 *policyv1beta1.PolicyV1beta1Client - rbacV1 *rbacv1.RbacV1Client - rbacV1beta1 *rbacv1beta1.RbacV1beta1Client - rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client - schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client - schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client - settingsV1alpha1 *settingsv1alpha1.SettingsV1alpha1Client - storageV1beta1 *storagev1beta1.StorageV1beta1Client - storageV1 *storagev1.StorageV1Client - storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client -} - -// AdmissionregistrationV1alpha1 retrieves the AdmissionregistrationV1alpha1Client -func (c *Clientset) AdmissionregistrationV1alpha1() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface { - return c.admissionregistrationV1alpha1 + admissionregistrationV1beta1 *admissionregistrationv1beta1.AdmissionregistrationV1beta1Client + appsV1 *appsv1.AppsV1Client + appsV1beta1 *appsv1beta1.AppsV1beta1Client + appsV1beta2 *appsv1beta2.AppsV1beta2Client + auditregistrationV1alpha1 *auditregistrationv1alpha1.AuditregistrationV1alpha1Client + authenticationV1 *authenticationv1.AuthenticationV1Client + authenticationV1beta1 *authenticationv1beta1.AuthenticationV1beta1Client + authorizationV1 *authorizationv1.AuthorizationV1Client + authorizationV1beta1 *authorizationv1beta1.AuthorizationV1beta1Client + autoscalingV1 *autoscalingv1.AutoscalingV1Client + autoscalingV2beta1 *autoscalingv2beta1.AutoscalingV2beta1Client + autoscalingV2beta2 *autoscalingv2beta2.AutoscalingV2beta2Client + batchV1 *batchv1.BatchV1Client + batchV1beta1 *batchv1beta1.BatchV1beta1Client + batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client + certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client + coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client + coordinationV1 *coordinationv1.CoordinationV1Client + coreV1 *corev1.CoreV1Client + eventsV1beta1 *eventsv1beta1.EventsV1beta1Client + extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client + networkingV1 *networkingv1.NetworkingV1Client + policyV1beta1 *policyv1beta1.PolicyV1beta1Client + rbacV1 *rbacv1.RbacV1Client + rbacV1beta1 *rbacv1beta1.RbacV1beta1Client + rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client + schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client + schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client + settingsV1alpha1 *settingsv1alpha1.SettingsV1alpha1Client + storageV1beta1 *storagev1beta1.StorageV1beta1Client + storageV1 *storagev1.StorageV1Client + storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client } // AdmissionregistrationV1beta1 retrieves the AdmissionregistrationV1beta1Client @@ -458,10 +450,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error - cs.admissionregistrationV1alpha1, err = admissionregistrationv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } cs.admissionregistrationV1beta1, err = admissionregistrationv1beta1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -602,7 +590,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset - cs.admissionregistrationV1alpha1 = admissionregistrationv1alpha1.NewForConfigOrDie(c) cs.admissionregistrationV1beta1 = admissionregistrationv1beta1.NewForConfigOrDie(c) cs.appsV1 = appsv1.NewForConfigOrDie(c) cs.appsV1beta1 = appsv1beta1.NewForConfigOrDie(c) @@ -643,7 +630,6 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset - cs.admissionregistrationV1alpha1 = admissionregistrationv1alpha1.New(c) cs.admissionregistrationV1beta1 = admissionregistrationv1beta1.New(c) cs.appsV1 = appsv1.New(c) cs.appsV1beta1 = appsv1beta1.New(c) diff --git a/staging/src/k8s.io/client-go/kubernetes/fake/BUILD b/staging/src/k8s.io/client-go/kubernetes/fake/BUILD index 72a7fa05fc..577b592550 100644 --- a/staging/src/k8s.io/client-go/kubernetes/fake/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/fake/BUILD @@ -11,7 +11,6 @@ go_library( importpath = "k8s.io/client-go/kubernetes/fake", visibility = ["//visibility:public"], deps = [ - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta1:go_default_library", @@ -53,8 +52,6 @@ go_library( "//staging/src/k8s.io/client-go/discovery:go_default_library", "//staging/src/k8s.io/client-go/discovery/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", diff --git a/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go b/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go index bf64a0c6d6..94dcdf439d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go +++ b/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go @@ -24,8 +24,6 @@ import ( "k8s.io/client-go/discovery" fakediscovery "k8s.io/client-go/discovery/fake" clientset "k8s.io/client-go/kubernetes" - admissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - fakeadmissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake" admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" fakeadmissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake" appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" @@ -135,11 +133,6 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { var _ clientset.Interface = &Clientset{} -// AdmissionregistrationV1alpha1 retrieves the AdmissionregistrationV1alpha1Client -func (c *Clientset) AdmissionregistrationV1alpha1() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface { - return &fakeadmissionregistrationv1alpha1.FakeAdmissionregistrationV1alpha1{Fake: &c.Fake} -} - // AdmissionregistrationV1beta1 retrieves the AdmissionregistrationV1beta1Client func (c *Clientset) AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface { return &fakeadmissionregistrationv1beta1.FakeAdmissionregistrationV1beta1{Fake: &c.Fake} diff --git a/staging/src/k8s.io/client-go/kubernetes/fake/register.go b/staging/src/k8s.io/client-go/kubernetes/fake/register.go index b9819b40b9..8e3e63b8d0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/fake/register.go +++ b/staging/src/k8s.io/client-go/kubernetes/fake/register.go @@ -19,7 +19,6 @@ limitations under the License. package fake import ( - admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" @@ -63,7 +62,6 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - admissionregistrationv1alpha1.AddToScheme, admissionregistrationv1beta1.AddToScheme, appsv1.AddToScheme, appsv1beta1.AddToScheme, diff --git a/staging/src/k8s.io/client-go/kubernetes/scheme/BUILD b/staging/src/k8s.io/client-go/kubernetes/scheme/BUILD index 97670574d9..10ca14b87f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/scheme/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/scheme/BUILD @@ -10,7 +10,6 @@ go_library( importpath = "k8s.io/client-go/kubernetes/scheme", visibility = ["//visibility:public"], deps = [ - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta1:go_default_library", diff --git a/staging/src/k8s.io/client-go/kubernetes/scheme/register.go b/staging/src/k8s.io/client-go/kubernetes/scheme/register.go index 3953dc9f89..49f065c380 100644 --- a/staging/src/k8s.io/client-go/kubernetes/scheme/register.go +++ b/staging/src/k8s.io/client-go/kubernetes/scheme/register.go @@ -19,7 +19,6 @@ limitations under the License. package scheme import ( - admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" @@ -63,7 +62,6 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - admissionregistrationv1alpha1.AddToScheme, admissionregistrationv1beta1.AddToScheme, appsv1.AddToScheme, appsv1beta1.AddToScheme, diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/BUILD b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/BUILD deleted file mode 100644 index 8a8cc81468..0000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "admissionregistration_client.go", - "doc.go", - "generated_expansion.go", - "initializerconfiguration.go", - ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go deleted file mode 100644 index 5e02f72274..0000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/client-go/kubernetes/scheme" - rest "k8s.io/client-go/rest" -) - -type AdmissionregistrationV1alpha1Interface interface { - RESTClient() rest.Interface - InitializerConfigurationsGetter -} - -// AdmissionregistrationV1alpha1Client is used to interact with features provided by the admissionregistration.k8s.io group. -type AdmissionregistrationV1alpha1Client struct { - restClient rest.Interface -} - -func (c *AdmissionregistrationV1alpha1Client) InitializerConfigurations() InitializerConfigurationInterface { - return newInitializerConfigurations(c) -} - -// NewForConfig creates a new AdmissionregistrationV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*AdmissionregistrationV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &AdmissionregistrationV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new AdmissionregistrationV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *AdmissionregistrationV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new AdmissionregistrationV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *AdmissionregistrationV1alpha1Client { - return &AdmissionregistrationV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *AdmissionregistrationV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go deleted file mode 100644 index df51baa4d4..0000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/BUILD b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/BUILD deleted file mode 100644 index 34ad1ad6f3..0000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_admissionregistration_client.go", - "fake_initializerconfiguration.go", - ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake", - importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake", - visibility = ["//visibility:public"], - deps = [ - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/doc.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/doc.go deleted file mode 100644 index 16f4439906..0000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go deleted file mode 100644 index 8457aec276..0000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeAdmissionregistrationV1alpha1 struct { - *testing.Fake -} - -func (c *FakeAdmissionregistrationV1alpha1) InitializerConfigurations() v1alpha1.InitializerConfigurationInterface { - return &FakeInitializerConfigurations{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeAdmissionregistrationV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_initializerconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_initializerconfiguration.go deleted file mode 100644 index 4baee66104..0000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_initializerconfiguration.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeInitializerConfigurations implements InitializerConfigurationInterface -type FakeInitializerConfigurations struct { - Fake *FakeAdmissionregistrationV1alpha1 -} - -var initializerconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Resource: "initializerconfigurations"} - -var initializerconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "InitializerConfiguration"} - -// Get takes name of the initializerConfiguration, and returns the corresponding initializerConfiguration object, and an error if there is any. -func (c *FakeInitializerConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.InitializerConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(initializerconfigurationsResource, name), &v1alpha1.InitializerConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.InitializerConfiguration), err -} - -// List takes label and field selectors, and returns the list of InitializerConfigurations that match those selectors. -func (c *FakeInitializerConfigurations) List(opts v1.ListOptions) (result *v1alpha1.InitializerConfigurationList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(initializerconfigurationsResource, initializerconfigurationsKind, opts), &v1alpha1.InitializerConfigurationList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.InitializerConfigurationList{ListMeta: obj.(*v1alpha1.InitializerConfigurationList).ListMeta} - for _, item := range obj.(*v1alpha1.InitializerConfigurationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested initializerConfigurations. -func (c *FakeInitializerConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(initializerconfigurationsResource, opts)) -} - -// Create takes the representation of a initializerConfiguration and creates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any. -func (c *FakeInitializerConfigurations) Create(initializerConfiguration *v1alpha1.InitializerConfiguration) (result *v1alpha1.InitializerConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(initializerconfigurationsResource, initializerConfiguration), &v1alpha1.InitializerConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.InitializerConfiguration), err -} - -// Update takes the representation of a initializerConfiguration and updates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any. -func (c *FakeInitializerConfigurations) Update(initializerConfiguration *v1alpha1.InitializerConfiguration) (result *v1alpha1.InitializerConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(initializerconfigurationsResource, initializerConfiguration), &v1alpha1.InitializerConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.InitializerConfiguration), err -} - -// Delete takes name of the initializerConfiguration and deletes it. Returns an error if one occurs. -func (c *FakeInitializerConfigurations) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(initializerconfigurationsResource, name), &v1alpha1.InitializerConfiguration{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeInitializerConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(initializerconfigurationsResource, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.InitializerConfigurationList{}) - return err -} - -// Patch applies the patch and returns the patched initializerConfiguration. -func (c *FakeInitializerConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.InitializerConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(initializerconfigurationsResource, name, pt, data, subresources...), &v1alpha1.InitializerConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.InitializerConfiguration), err -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go deleted file mode 100644 index 1e29b96f4d..0000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type InitializerConfigurationExpansion interface{} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go deleted file mode 100644 index 7b8acecee9..0000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "time" - - v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - scheme "k8s.io/client-go/kubernetes/scheme" - rest "k8s.io/client-go/rest" -) - -// InitializerConfigurationsGetter has a method to return a InitializerConfigurationInterface. -// A group's client should implement this interface. -type InitializerConfigurationsGetter interface { - InitializerConfigurations() InitializerConfigurationInterface -} - -// InitializerConfigurationInterface has methods to work with InitializerConfiguration resources. -type InitializerConfigurationInterface interface { - Create(*v1alpha1.InitializerConfiguration) (*v1alpha1.InitializerConfiguration, error) - Update(*v1alpha1.InitializerConfiguration) (*v1alpha1.InitializerConfiguration, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.InitializerConfiguration, error) - List(opts v1.ListOptions) (*v1alpha1.InitializerConfigurationList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.InitializerConfiguration, err error) - InitializerConfigurationExpansion -} - -// initializerConfigurations implements InitializerConfigurationInterface -type initializerConfigurations struct { - client rest.Interface -} - -// newInitializerConfigurations returns a InitializerConfigurations -func newInitializerConfigurations(c *AdmissionregistrationV1alpha1Client) *initializerConfigurations { - return &initializerConfigurations{ - client: c.RESTClient(), - } -} - -// Get takes name of the initializerConfiguration, and returns the corresponding initializerConfiguration object, and an error if there is any. -func (c *initializerConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.InitializerConfiguration, err error) { - result = &v1alpha1.InitializerConfiguration{} - err = c.client.Get(). - Resource("initializerconfigurations"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of InitializerConfigurations that match those selectors. -func (c *initializerConfigurations) List(opts v1.ListOptions) (result *v1alpha1.InitializerConfigurationList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.InitializerConfigurationList{} - err = c.client.Get(). - Resource("initializerconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested initializerConfigurations. -func (c *initializerConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("initializerconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a initializerConfiguration and creates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any. -func (c *initializerConfigurations) Create(initializerConfiguration *v1alpha1.InitializerConfiguration) (result *v1alpha1.InitializerConfiguration, err error) { - result = &v1alpha1.InitializerConfiguration{} - err = c.client.Post(). - Resource("initializerconfigurations"). - Body(initializerConfiguration). - Do(). - Into(result) - return -} - -// Update takes the representation of a initializerConfiguration and updates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any. -func (c *initializerConfigurations) Update(initializerConfiguration *v1alpha1.InitializerConfiguration) (result *v1alpha1.InitializerConfiguration, err error) { - result = &v1alpha1.InitializerConfiguration{} - err = c.client.Put(). - Resource("initializerconfigurations"). - Name(initializerConfiguration.Name). - Body(initializerConfiguration). - Do(). - Into(result) - return -} - -// Delete takes name of the initializerConfiguration and deletes it. Returns an error if one occurs. -func (c *initializerConfigurations) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("initializerconfigurations"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *initializerConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("initializerconfigurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched initializerConfiguration. -func (c *initializerConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.InitializerConfiguration, err error) { - result = &v1alpha1.InitializerConfiguration{} - err = c.client.Patch(pt). - Resource("initializerconfigurations"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/BUILD b/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/BUILD deleted file mode 100644 index c714d216a1..0000000000 --- a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "initializerconfiguration.go", - ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/listers/admissionregistration/v1alpha1", - importpath = "k8s.io/client-go/listers/admissionregistration/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go deleted file mode 100644 index 2c9f9f6a6c..0000000000 --- a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// InitializerConfigurationListerExpansion allows custom methods to be added to -// InitializerConfigurationLister. -type InitializerConfigurationListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/initializerconfiguration.go b/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/initializerconfiguration.go deleted file mode 100644 index dbd7301fcf..0000000000 --- a/staging/src/k8s.io/client-go/listers/admissionregistration/v1alpha1/initializerconfiguration.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// InitializerConfigurationLister helps list InitializerConfigurations. -type InitializerConfigurationLister interface { - // List lists all InitializerConfigurations in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.InitializerConfiguration, err error) - // Get retrieves the InitializerConfiguration from the index for a given name. - Get(name string) (*v1alpha1.InitializerConfiguration, error) - InitializerConfigurationListerExpansion -} - -// initializerConfigurationLister implements the InitializerConfigurationLister interface. -type initializerConfigurationLister struct { - indexer cache.Indexer -} - -// NewInitializerConfigurationLister returns a new InitializerConfigurationLister. -func NewInitializerConfigurationLister(indexer cache.Indexer) InitializerConfigurationLister { - return &initializerConfigurationLister{indexer: indexer} -} - -// List lists all InitializerConfigurations in the indexer. -func (s *initializerConfigurationLister) List(selector labels.Selector) (ret []*v1alpha1.InitializerConfiguration, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.InitializerConfiguration)) - }) - return ret, err -} - -// Get retrieves the InitializerConfiguration from the index for a given name. -func (s *initializerConfigurationLister) Get(name string) (*v1alpha1.InitializerConfiguration, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("initializerconfiguration"), name) - } - return obj.(*v1alpha1.InitializerConfiguration), nil -} diff --git a/staging/src/k8s.io/cloud-provider/Godeps/Godeps.json b/staging/src/k8s.io/cloud-provider/Godeps/Godeps.json index c7f0a32f8a..a6cc5d2114 100644 --- a/staging/src/k8s.io/cloud-provider/Godeps/Godeps.json +++ b/staging/src/k8s.io/cloud-provider/Godeps/Godeps.json @@ -158,10 +158,6 @@ "ImportPath": "gopkg.in/yaml.v2", "Rev": "5420a8b6744d3b0345ab293f6fcba19c978f1183" }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -458,10 +454,6 @@ "ImportPath": "k8s.io/client-go/informers/admissionregistration", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -646,10 +638,6 @@ "ImportPath": "k8s.io/client-go/kubernetes/scheme", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -778,10 +766,6 @@ "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/staging/src/k8s.io/csi-api/Godeps/Godeps.json b/staging/src/k8s.io/csi-api/Godeps/Godeps.json index 86dbf7ced3..c5019f7696 100644 --- a/staging/src/k8s.io/csi-api/Godeps/Godeps.json +++ b/staging/src/k8s.io/csi-api/Godeps/Godeps.json @@ -162,10 +162,6 @@ "ImportPath": "gopkg.in/yaml.v2", "Rev": "5420a8b6744d3b0345ab293f6fcba19c978f1183" }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json b/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json index 2cc85f781e..9d47f970bf 100644 --- a/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json +++ b/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json @@ -530,10 +530,6 @@ "ImportPath": "k8s.io/api/admission/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -898,10 +894,6 @@ "ImportPath": "k8s.io/apiserver/pkg/admission/metrics", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/initialization", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -1282,10 +1274,6 @@ "ImportPath": "k8s.io/client-go/informers/admissionregistration", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -1470,10 +1458,6 @@ "ImportPath": "k8s.io/client-go/kubernetes/scheme", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -1602,10 +1586,6 @@ "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/strategy.go b/staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/strategy.go index 96c40fd33f..636e8e4470 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/strategy.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/strategy.go @@ -118,12 +118,12 @@ func (apiServerStatusStrategy) ValidateUpdate(ctx context.Context, obj, old runt return validation.ValidateAPIServiceStatusUpdate(obj.(*apiregistration.APIService), old.(*apiregistration.APIService)) } -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { apiserver, ok := obj.(*apiregistration.APIService) if !ok { - return nil, nil, false, fmt.Errorf("given object is not a APIService.") + return nil, nil, fmt.Errorf("given object is not a APIService.") } - return labels.Set(apiserver.ObjectMeta.Labels), APIServiceToSelectableFields(apiserver), apiserver.Initializers != nil, nil + return labels.Set(apiserver.ObjectMeta.Labels), APIServiceToSelectableFields(apiserver), nil } // MatchAPIService is the filter used by the generic etcd backend to watch events diff --git a/staging/src/k8s.io/metrics/Godeps/Godeps.json b/staging/src/k8s.io/metrics/Godeps/Godeps.json index a7e918f0f6..502f3806c3 100644 --- a/staging/src/k8s.io/metrics/Godeps/Godeps.json +++ b/staging/src/k8s.io/metrics/Godeps/Godeps.json @@ -166,10 +166,6 @@ "ImportPath": "gopkg.in/yaml.v2", "Rev": "5420a8b6744d3b0345ab293f6fcba19c978f1183" }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/staging/src/k8s.io/node-api/Godeps/Godeps.json b/staging/src/k8s.io/node-api/Godeps/Godeps.json index a30538004d..04b6bc7f61 100644 --- a/staging/src/k8s.io/node-api/Godeps/Godeps.json +++ b/staging/src/k8s.io/node-api/Godeps/Godeps.json @@ -162,10 +162,6 @@ "ImportPath": "gopkg.in/yaml.v2", "Rev": "5420a8b6744d3b0345ab293f6fcba19c978f1183" }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json b/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json index 224ed76c9a..f9c46010c0 100644 --- a/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json @@ -502,10 +502,6 @@ "ImportPath": "k8s.io/api/admission/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -862,10 +858,6 @@ "ImportPath": "k8s.io/apiserver/pkg/admission/metrics", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/initialization", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -1242,10 +1234,6 @@ "ImportPath": "k8s.io/client-go/informers/admissionregistration", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -1430,10 +1418,6 @@ "ImportPath": "k8s.io/client-go/kubernetes/scheme", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -1562,10 +1546,6 @@ "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/fischer/strategy.go b/staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/fischer/strategy.go index a0e9af28c0..3bfaeb2a91 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/fischer/strategy.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/fischer/strategy.go @@ -38,12 +38,12 @@ func NewStrategy(typer runtime.ObjectTyper) fischerStrategy { // GetAttrs returns labels.Set, fields.Set, the presence of Initializers if any // and error in case the given runtime.Object is not a Fischer -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { apiserver, ok := obj.(*wardle.Fischer) if !ok { - return nil, nil, false, fmt.Errorf("given object is not a Fischer") + return nil, nil, fmt.Errorf("given object is not a Fischer") } - return labels.Set(apiserver.ObjectMeta.Labels), SelectableFields(apiserver), apiserver.Initializers != nil, nil + return labels.Set(apiserver.ObjectMeta.Labels), SelectableFields(apiserver), nil } // MatchFischer is the filter used by the generic etcd backend to watch events diff --git a/staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/flunder/strategy.go b/staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/flunder/strategy.go index 8f6fdccf0f..7aa5f97d8b 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/flunder/strategy.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/flunder/strategy.go @@ -39,12 +39,12 @@ func NewStrategy(typer runtime.ObjectTyper) flunderStrategy { // GetAttrs returns labels.Set, fields.Set, the presence of Initializers if any // and error in case the given runtime.Object is not a Flunder -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { apiserver, ok := obj.(*wardle.Flunder) if !ok { - return nil, nil, false, fmt.Errorf("given object is not a Flunder") + return nil, nil, fmt.Errorf("given object is not a Flunder") } - return labels.Set(apiserver.ObjectMeta.Labels), SelectableFields(apiserver), apiserver.Initializers != nil, nil + return labels.Set(apiserver.ObjectMeta.Labels), SelectableFields(apiserver), nil } // MatchFlunder is the filter used by the generic etcd backend to watch events diff --git a/staging/src/k8s.io/sample-cli-plugin/Godeps/Godeps.json b/staging/src/k8s.io/sample-cli-plugin/Godeps/Godeps.json index 2ecca328a6..b6f37d6578 100644 --- a/staging/src/k8s.io/sample-cli-plugin/Godeps/Godeps.json +++ b/staging/src/k8s.io/sample-cli-plugin/Godeps/Godeps.json @@ -194,10 +194,6 @@ "ImportPath": "gopkg.in/yaml.v2", "Rev": "5420a8b6744d3b0345ab293f6fcba19c978f1183" }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/staging/src/k8s.io/sample-controller/Godeps/Godeps.json b/staging/src/k8s.io/sample-controller/Godeps/Godeps.json index b5b090c17e..b94236dff6 100644 --- a/staging/src/k8s.io/sample-controller/Godeps/Godeps.json +++ b/staging/src/k8s.io/sample-controller/Godeps/Godeps.json @@ -174,10 +174,6 @@ "ImportPath": "gopkg.in/yaml.v2", "Rev": "5420a8b6744d3b0345ab293f6fcba19c978f1183" }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -490,10 +486,6 @@ "ImportPath": "k8s.io/client-go/informers/admissionregistration", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -682,14 +674,6 @@ "ImportPath": "k8s.io/client-go/kubernetes/scheme", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -946,10 +930,6 @@ "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, - { - "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1alpha1", - "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - }, { "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1beta1", "Rev": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/test/e2e/apimachinery/BUILD b/test/e2e/apimachinery/BUILD index ba37035994..6488830237 100644 --- a/test/e2e/apimachinery/BUILD +++ b/test/e2e/apimachinery/BUILD @@ -18,7 +18,6 @@ go_library( "framework.go", "garbage_collector.go", "generated_clientset.go", - "initializers.go", "namespace.go", "resource_quota.go", "table_conversion.go", @@ -31,7 +30,6 @@ go_library( "//pkg/apis/rbac/v1beta1:go_default_library", "//pkg/printers:go_default_library", "//pkg/quota/v1/evaluator/core:go_default_library", - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/authorization/v1:go_default_library", @@ -68,7 +66,6 @@ go_library( "//staging/src/k8s.io/client-go/dynamic:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/util/cert:go_default_library", - "//staging/src/k8s.io/client-go/util/retry:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset:go_default_library", diff --git a/test/e2e/apimachinery/initializers.go b/test/e2e/apimachinery/initializers.go deleted file mode 100644 index 7420f320e4..0000000000 --- a/test/e2e/apimachinery/initializers.go +++ /dev/null @@ -1,423 +0,0 @@ -/* -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 apimachinery - -import ( - "fmt" - "strings" - "time" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "k8s.io/api/admissionregistration/v1alpha1" - apps "k8s.io/api/apps/v1" - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/wait" - clientset "k8s.io/client-go/kubernetes" - clientretry "k8s.io/client-go/util/retry" - "k8s.io/kubernetes/test/e2e/framework" - imageutils "k8s.io/kubernetes/test/utils/image" -) - -var _ = SIGDescribe("Initializers [Feature:Initializers]", func() { - f := framework.NewDefaultFramework("initializers") - - // TODO: Add failure traps once we have JustAfterEach - // See https://github.com/onsi/ginkgo/issues/303 - - It("should be invisible to controllers by default", func() { - ns := f.Namespace.Name - c := f.ClientSet - - podName := "uninitialized-pod" - framework.Logf("Creating pod %s", podName) - - ch := make(chan struct{}) - go func() { - pod := newUninitializedPod(podName) - _, err := c.CoreV1().Pods(ns).Create(pod) - Expect(err).NotTo(HaveOccurred(), "failed to create pod %s in namespace: %s", podName, ns) - close(ch) - }() - - // wait to ensure the scheduler does not act on an uninitialized pod - err := wait.PollImmediate(2*time.Second, 15*time.Second, func() (bool, error) { - p, err := c.CoreV1().Pods(ns).Get(podName, metav1.GetOptions{}) - if err != nil { - if errors.IsNotFound(err) { - return false, nil - } - return false, err - } - return len(p.Spec.NodeName) > 0, nil - }) - Expect(err).To(Equal(wait.ErrWaitTimeout)) - - // verify that we can update an initializing pod - pod, err := c.CoreV1().Pods(ns).Get(podName, metav1.GetOptions{}) - Expect(err).NotTo(HaveOccurred(), "failed to get pod %s in namespace: %s", podName, ns) - pod.Annotations = map[string]string{"update-1": "test"} - pod, err = c.CoreV1().Pods(ns).Update(pod) - Expect(err).NotTo(HaveOccurred(), "failed to update pod %s in namespace %s to: %+v", pod.Name, ns, pod) - - // verify the list call filters out uninitialized pods - listOptions := metav1.ListOptions{IncludeUninitialized: true} - pods, err := c.CoreV1().Pods(ns).List(listOptions) - Expect(err).NotTo(HaveOccurred(), "failed to list pods in namespace: %s, given list options: %+v", ns, listOptions) - Expect(pods.Items).To(HaveLen(1)) - pods, err = c.CoreV1().Pods(ns).List(metav1.ListOptions{}) - Expect(err).NotTo(HaveOccurred(), "failed to list pods in namespace: %s", ns) - Expect(pods.Items).To(HaveLen(0)) - - // clear initializers - pod.Initializers = nil - pod, err = c.CoreV1().Pods(ns).Update(pod) - Expect(err).NotTo(HaveOccurred(), "failed to update pod %s in namespace %s to: %+v", pod.Name, ns, pod) - - // pod should now start running - err = framework.WaitForPodRunningInNamespace(c, pod) - Expect(err).NotTo(HaveOccurred(), "error while waiting for pod %s to go to Running phase in namespace: %s", pod.Name, pod.Namespace) - - // ensure create call returns - <-ch - - // verify that we cannot start the pod initializing again - pod, err = c.CoreV1().Pods(ns).Get(podName, metav1.GetOptions{}) - Expect(err).NotTo(HaveOccurred(), "failed to get pod %s in namespace: %s", podName, ns) - pod.Initializers = &metav1.Initializers{ - Pending: []metav1.Initializer{{Name: "Other"}}, - } - _, err = c.CoreV1().Pods(ns).Update(pod) - if !errors.IsInvalid(err) || !strings.Contains(err.Error(), "immutable") { - Fail(fmt.Sprintf("expected invalid error: %v", err)) - } - }) - - It("should dynamically register and apply initializers to pods [Serial]", func() { - ns := f.Namespace.Name - c := f.ClientSet - - podName := "uninitialized-pod" - framework.Logf("Creating pod %s", podName) - - // create and register an initializer - initializerName := "pod.test.e2e.kubernetes.io" - initializerConfigName := "e2e-test-initializer" - initializerConfig := &v1alpha1.InitializerConfiguration{ - ObjectMeta: metav1.ObjectMeta{Name: initializerConfigName}, - Initializers: []v1alpha1.Initializer{ - { - Name: initializerName, - Rules: []v1alpha1.Rule{ - {APIGroups: []string{""}, APIVersions: []string{"*"}, Resources: []string{"pods"}}, - }, - }, - }, - } - _, err := c.AdmissionregistrationV1alpha1().InitializerConfigurations().Create(initializerConfig) - if errors.IsNotFound(err) { - framework.Skipf("dynamic configuration of initializers requires the alpha admissionregistration.k8s.io group to be enabled") - } - Expect(err).NotTo(HaveOccurred(), "failed to create and register initializer with config: %+v", initializerConfig) - - // we must remove the initializer when the test is complete and ensure no pods are pending for that initializer - defer cleanupInitializer(c, initializerConfigName, initializerName) - - // poller configuration is 1 second, wait at least that long - time.Sleep(3 * time.Second) - - // run create that blocks - ch := make(chan struct{}) - go func() { - defer close(ch) - pod := newInitPod(podName) - _, err := c.CoreV1().Pods(ns).Create(pod) - Expect(err).NotTo(HaveOccurred(), "failed to create pod %s in namespace: %s", podName, ns) - }() - - // wait until the pod shows up uninitialized - By("Waiting until the pod is visible to a client") - var pod *v1.Pod - err = wait.PollImmediate(2*time.Second, 15*time.Second, func() (bool, error) { - pod, err = c.CoreV1().Pods(ns).Get(podName, metav1.GetOptions{IncludeUninitialized: true}) - if errors.IsNotFound(err) { - return false, nil - } - if err != nil { - return false, err - } - return true, nil - }) - Expect(err).NotTo(HaveOccurred(), "failed to get pod %s from namespace: %s", podName, ns) - Expect(pod.Initializers).NotTo(BeNil()) - Expect(pod.Initializers.Pending).To(HaveLen(1)) - Expect(pod.Initializers.Pending[0].Name).To(Equal(initializerName)) - - // pretend we are an initializer - By("Completing initialization") - pod.Initializers = nil - pod, err = c.CoreV1().Pods(ns).Update(pod) - Expect(err).NotTo(HaveOccurred(), "failed to update pod %s in namespace %s to: %+v", pod.Name, ns, pod) - - // ensure create call returns - <-ch - - // pod should now start running - err = framework.WaitForPodRunningInNamespace(c, pod) - Expect(err).NotTo(HaveOccurred(), "error while waiting for pod %s to go to Running phase in namespace: %s", pod.Name, pod.Namespace) - - // bypass initialization by explicitly passing an empty pending list - By("Setting an empty initializer as an admin to bypass initialization") - podName = "preinitialized-pod" - pod = newUninitializedPod(podName) - pod.Initializers.Pending = nil - pod, err = c.CoreV1().Pods(ns).Create(pod) - Expect(err).NotTo(HaveOccurred(), "failed to create pod %s in namespace: %s", podName, ns) - Expect(pod.Initializers).To(BeNil()) - - // bypass initialization for mirror pods - By("Creating a mirror pod that bypasses initialization") - podName = "mirror-pod" - pod = newInitPod(podName) - pod.Annotations = map[string]string{ - v1.MirrorPodAnnotationKey: "true", - } - pod.Spec.NodeName = "node-does-not-yet-exist" - pod, err = c.CoreV1().Pods(ns).Create(pod) - Expect(err).NotTo(HaveOccurred(), "failed to create pod %s in namespace: %s", podName, ns) - Expect(pod.Initializers).To(BeNil()) - Expect(pod.Annotations[v1.MirrorPodAnnotationKey]).To(Equal("true")) - }) - - It("don't cause replicaset controller creating extra pods if the initializer is not handled [Serial]", func() { - ns := f.Namespace.Name - c := f.ClientSet - - podName := "uninitialized-pod" - framework.Logf("Creating pod %s", podName) - - // create and register an initializer, without setting up a controller to handle it. - initializerName := "pod.test.e2e.kubernetes.io" - initializerConfigName := "e2e-test-initializer" - initializerConfig := &v1alpha1.InitializerConfiguration{ - ObjectMeta: metav1.ObjectMeta{Name: initializerConfigName}, - Initializers: []v1alpha1.Initializer{ - { - Name: initializerName, - Rules: []v1alpha1.Rule{ - {APIGroups: []string{""}, APIVersions: []string{"*"}, Resources: []string{"pods"}}, - }, - }, - }, - } - _, err := c.AdmissionregistrationV1alpha1().InitializerConfigurations().Create(initializerConfig) - if errors.IsNotFound(err) { - framework.Skipf("dynamic configuration of initializers requires the alpha admissionregistration.k8s.io group to be enabled") - } - Expect(err).NotTo(HaveOccurred(), "failed to create and register initializer with config: %+v", initializerConfig) - - // we must remove the initializer when the test is complete and ensure no pods are pending for that initializer - defer cleanupInitializer(c, initializerConfigName, initializerName) - - // poller configuration is 1 second, wait at least that long - time.Sleep(3 * time.Second) - - // create a replicaset - rs := newReplicaset() - persistedRS, err := c.AppsV1().ReplicaSets(ns).Create(rs) - Expect(err).NotTo(HaveOccurred(), "failed to create replicaset %s in namespace: %s", persistedRS.Name, ns) - // wait for replicaset controller to confirm that it has handled the creation - err = waitForRSObservedGeneration(c, persistedRS.Namespace, persistedRS.Name, persistedRS.Generation) - Expect(err).NotTo(HaveOccurred(), "replicaset %s failed to observe generation: %d", persistedRS.Name, persistedRS.Generation) - - // update the replicaset spec to trigger a resync - patch := []byte(`{"spec":{"minReadySeconds":5}}`) - persistedRS, err = c.AppsV1().ReplicaSets(ns).Patch(persistedRS.Name, types.StrategicMergePatchType, patch) - Expect(err).NotTo(HaveOccurred(), "failed to apply to replicaset %s in namespace %s a strategic merge patch: %s", persistedRS.Name, ns, patch) - - // wait for replicaset controller to confirm that it has handle the spec update - err = waitForRSObservedGeneration(c, persistedRS.Namespace, persistedRS.Name, persistedRS.Generation) - Expect(err).NotTo(HaveOccurred(), "replicaset %s failed to observe generation: %d", persistedRS.Name, persistedRS.Generation) - - // verify that the replicaset controller doesn't create extra pod - selector, err := metav1.LabelSelectorAsSelector(persistedRS.Spec.Selector) - Expect(err).NotTo(HaveOccurred(), "failed to convert label selector %+v of LabelSelector api type into a struct that implements labels.Selector", persistedRS.Spec.Selector) - - listOptions := metav1.ListOptions{ - LabelSelector: selector.String(), - IncludeUninitialized: true, - } - pods, err := c.CoreV1().Pods(ns).List(listOptions) - Expect(err).NotTo(HaveOccurred(), "failed to list pods in namespace: %s, given list options: %+v", ns, listOptions) - Expect(len(pods.Items)).Should(Equal(1)) - }) - - It("will be set to nil if a patch removes the last pending initializer", func() { - ns := f.Namespace.Name - c := f.ClientSet - - podName := "to-be-patch-initialized-pod" - framework.Logf("Creating pod %s", podName) - - // TODO: lower the timeout so that the server responds faster. - _, err := c.CoreV1().Pods(ns).Create(newUninitializedPod(podName)) - if err != nil && !errors.IsTimeout(err) { - framework.Failf("expect err to be timeout error, got %v", err) - } - uninitializedPod, err := c.CoreV1().Pods(ns).Get(podName, metav1.GetOptions{}) - Expect(err).NotTo(HaveOccurred(), "failed to get pod %s in namespace: %s", podName, ns) - Expect(uninitializedPod.Initializers).NotTo(BeNil()) - Expect(len(uninitializedPod.Initializers.Pending)).Should(Equal(1)) - - patch := fmt.Sprintf(`{"metadata":{"initializers":{"pending":[{"$patch":"delete","name":"%s"}]}}}`, uninitializedPod.Initializers.Pending[0].Name) - patchedPod, err := c.CoreV1().Pods(ns).Patch(uninitializedPod.Name, types.StrategicMergePatchType, []byte(patch)) - Expect(err).NotTo(HaveOccurred(), "failed to apply to pod %s in namespace %s a strategic merge patch: %s", uninitializedPod.Name, ns, patch) - Expect(patchedPod.Initializers).To(BeNil()) - }) -}) - -func newUninitializedPod(podName string) *v1.Pod { - pod := newInitPod(podName) - pod.Initializers = &metav1.Initializers{ - Pending: []metav1.Initializer{{Name: "test.k8s.io"}}, - } - return pod -} - -func newReplicaset() *apps.ReplicaSet { - name := "initializer-test-replicaset" - replicas := int32(1) - labels := map[string]string{"initializer-test": "single-replicaset"} - return &apps.ReplicaSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - }, - Spec: apps.ReplicaSetSpec{ - Replicas: &replicas, - Template: v1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - }, - Spec: v1.PodSpec{ - TerminationGracePeriodSeconds: &zero, - Containers: []v1.Container{ - { - Name: name + "-container", - Image: imageutils.GetE2EImage(imageutils.Porter), - }, - }, - }, - }, - }, - } -} - -func newInitPod(podName string) *v1.Pod { - containerName := fmt.Sprintf("%s-container", podName) - port := 8080 - pod := &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: podName, - }, - Spec: v1.PodSpec{ - Containers: []v1.Container{ - { - Name: containerName, - Image: imageutils.GetE2EImage(imageutils.Porter), - Env: []v1.EnvVar{{Name: fmt.Sprintf("SERVE_PORT_%d", port), Value: "foo"}}, - Ports: []v1.ContainerPort{{ContainerPort: int32(port)}}, - }, - }, - RestartPolicy: v1.RestartPolicyNever, - }, - } - return pod -} - -// removeInitializersFromAllPods walks all pods and ensures they don't have the provided initializer, -// to guarantee completing the test doesn't block the entire cluster. -func removeInitializersFromAllPods(c clientset.Interface, initializerName string) { - pods, err := c.CoreV1().Pods("").List(metav1.ListOptions{IncludeUninitialized: true}) - if err != nil { - return - } - for _, p := range pods.Items { - if p.Initializers == nil { - continue - } - err := clientretry.RetryOnConflict(clientretry.DefaultRetry, func() error { - pod, err := c.CoreV1().Pods(p.Namespace).Get(p.Name, metav1.GetOptions{IncludeUninitialized: true}) - if err != nil { - if errors.IsNotFound(err) { - return nil - } - return err - } - if pod.Initializers == nil { - return nil - } - var updated []metav1.Initializer - for _, pending := range pod.Initializers.Pending { - if pending.Name != initializerName { - updated = append(updated, pending) - } - } - if len(updated) == len(pod.Initializers.Pending) { - return nil - } - pod.Initializers.Pending = updated - if len(updated) == 0 { - pod.Initializers = nil - } - framework.Logf("Found initializer on pod %s in ns %s", pod.Name, pod.Namespace) - _, err = c.CoreV1().Pods(p.Namespace).Update(pod) - return err - }) - if err != nil { - framework.Logf("Unable to remove initializer from pod %s in ns %s: %v", p.Name, p.Namespace, err) - } - } -} - -// remove the initializerConfig, and remove the initializer from all pods -func cleanupInitializer(c clientset.Interface, initializerConfigName, initializerName string) { - if err := c.AdmissionregistrationV1alpha1().InitializerConfigurations().Delete(initializerConfigName, nil); err != nil && !errors.IsNotFound(err) { - framework.Logf("got error on deleting %s", initializerConfigName) - } - // poller configuration is 1 second, wait at least that long - time.Sleep(3 * time.Second) - // clear our initializer from anyone who got it - removeInitializersFromAllPods(c, initializerName) -} - -// waits till the RS status.observedGeneration matches metadata.generation. -func waitForRSObservedGeneration(c clientset.Interface, ns, name string, generation int64) error { - return wait.PollImmediate(1*time.Second, 1*time.Minute, func() (bool, error) { - rs, err := c.AppsV1().ReplicaSets(ns).Get(name, metav1.GetOptions{}) - if err != nil { - return false, err - } - if generation > rs.Status.ObservedGeneration { - return false, nil - } - return true, nil - }) -} diff --git a/test/e2e/apimachinery/namespace.go b/test/e2e/apimachinery/namespace.go index 9c39ee4fab..87ea3dcfc9 100644 --- a/test/e2e/apimachinery/namespace.go +++ b/test/e2e/apimachinery/namespace.go @@ -86,7 +86,7 @@ func waitForPodInNamespace(c clientset.Interface, ns, podName string) *v1.Pod { var pod *v1.Pod var err error err = wait.PollImmediate(2*time.Second, 15*time.Second, func() (bool, error) { - pod, err = c.CoreV1().Pods(ns).Get(podName, metav1.GetOptions{IncludeUninitialized: true}) + pod, err = c.CoreV1().Pods(ns).Get(podName, metav1.GetOptions{}) if errors.IsNotFound(err) { return false, nil } @@ -130,28 +130,6 @@ func ensurePodsAreRemovedWhenNamespaceIsDeleted(f *framework.Framework) { By("Waiting for the pod to have running status") framework.ExpectNoError(framework.WaitForPodRunningInNamespace(f.ClientSet, pod)) - By("Creating an uninitialized pod in the namespace") - podB := &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod-uninitialized", - Initializers: &metav1.Initializers{Pending: []metav1.Initializer{{Name: "test.initializer.k8s.io"}}}, - }, - Spec: v1.PodSpec{ - Containers: []v1.Container{ - { - Name: "nginx", - Image: imageutils.GetPauseImageName(), - }, - }, - }, - } - go func() { - _, err = f.ClientSet.CoreV1().Pods(namespace.Name).Create(podB) - // This error is ok, because we will delete the pod before it completes initialization - framework.Logf("error from create uninitialized namespace: %v", err) - }() - podB = waitForPodInNamespace(f.ClientSet, namespace.Name, podB.Name) - By("Deleting the namespace") err = f.ClientSet.CoreV1().Namespaces().Delete(namespace.Name, nil) Expect(err).NotTo(HaveOccurred(), "failed to delete namespace: %s", namespace.Name) @@ -174,8 +152,6 @@ func ensurePodsAreRemovedWhenNamespaceIsDeleted(f *framework.Framework) { By("Verifying there are no pods in the namespace") _, err = f.ClientSet.CoreV1().Pods(namespace.Name).Get(pod.Name, metav1.GetOptions{}) Expect(err).To(HaveOccurred(), "failed to get pod %s in namespace: %s", pod.Name, namespace.Name) - _, err = f.ClientSet.CoreV1().Pods(namespace.Name).Get(podB.Name, metav1.GetOptions{IncludeUninitialized: true}) - Expect(err).To(HaveOccurred(), "failed to get pod %s in namespace: %s", podB.Name, namespace.Name) } func ensureServicesAreRemovedWhenNamespaceIsDeleted(f *framework.Framework) { diff --git a/test/e2e/apimachinery/resource_quota.go b/test/e2e/apimachinery/resource_quota.go index c34ae9c7d3..50f097995f 100644 --- a/test/e2e/apimachinery/resource_quota.go +++ b/test/e2e/apimachinery/resource_quota.go @@ -153,132 +153,6 @@ var _ = SIGDescribe("ResourceQuota", func() { Expect(err).NotTo(HaveOccurred()) }) - It("[Feature:Initializers] should create a ResourceQuota and capture the life of an uninitialized pod.", func() { - By("Creating a ResourceQuota") - quotaName := "test-quota" - resourceQuota := newTestResourceQuota(quotaName) - resourceQuota, err := createResourceQuota(f.ClientSet, f.Namespace.Name, resourceQuota) - Expect(err).NotTo(HaveOccurred()) - - By("Ensuring resource quota status is calculated") - usedResources := v1.ResourceList{} - usedResources[v1.ResourceQuotas] = resource.MustParse("1") - err = waitForResourceQuota(f.ClientSet, f.Namespace.Name, quotaName, usedResources) - Expect(err).NotTo(HaveOccurred()) - - By("Creating an uninitialized Pod that fits quota") - podName := "test-pod" - requests := v1.ResourceList{} - requests[v1.ResourceCPU] = resource.MustParse("500m") - requests[v1.ResourceMemory] = resource.MustParse("252Mi") - pod := newTestPodForQuota(f, podName, requests, v1.ResourceList{}) - pod.Initializers = &metav1.Initializers{Pending: []metav1.Initializer{{Name: "unhandled"}}} - pod, err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).Create(pod) - // because no one is handling the initializer, server will return a 504 timeout - if err != nil && !errors.IsTimeout(err) { - framework.Failf("expect err to be timeout error, got %v", err) - } - createdPod, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Get(podName, metav1.GetOptions{}) - Expect(err).NotTo(HaveOccurred()) - - By("Ensuring only pod count is charged") - usedResources = v1.ResourceList{} - usedResources[v1.ResourceQuotas] = resource.MustParse("1") - usedResources[v1.ResourcePods] = resource.MustParse("1") - err = waitForResourceQuota(f.ClientSet, f.Namespace.Name, quotaName, usedResources) - Expect(err).NotTo(HaveOccurred()) - - By("Ensuring an uninitialized pod can update its resource requirements") - // a pod cannot dynamically update its resource requirements. - requests = v1.ResourceList{} - requests[v1.ResourceCPU] = resource.MustParse("100m") - requests[v1.ResourceMemory] = resource.MustParse("100Mi") - _, err = framework.UpdatePodWithRetries(f.ClientSet, f.Namespace.Name, createdPod.Name, func(p *v1.Pod) { - p.Spec.Containers[0].Resources.Requests = requests - }) - Expect(err).NotTo(HaveOccurred()) - - By("Ensuring ResourceQuota status doesn't change") - usedResources = v1.ResourceList{} - usedResources[v1.ResourceQuotas] = resource.MustParse("1") - usedResources[v1.ResourcePods] = resource.MustParse("1") - err = waitForResourceQuota(f.ClientSet, f.Namespace.Name, quotaName, usedResources) - Expect(err).NotTo(HaveOccurred()) - - By("Allowing initializing a Pod that fits quota") - _, err = framework.UpdatePodWithRetries(f.ClientSet, f.Namespace.Name, createdPod.Name, func(p *v1.Pod) { - p.Initializers = nil - }) - Expect(err).NotTo(HaveOccurred()) - - By("Ensuring ResourceQuota status captures the usage of the intialized pod") - usedResources[v1.ResourceQuotas] = resource.MustParse("1") - usedResources[v1.ResourcePods] = resource.MustParse("1") - usedResources[v1.ResourceCPU] = requests[v1.ResourceCPU] - usedResources[v1.ResourceMemory] = requests[v1.ResourceMemory] - err = waitForResourceQuota(f.ClientSet, f.Namespace.Name, quotaName, usedResources) - Expect(err).NotTo(HaveOccurred()) - - By("Deleting the pod") - err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).Delete(createdPod.Name, metav1.NewDeleteOptions(0)) - Expect(err).NotTo(HaveOccurred()) - - By("Ensuring resource quota status released the pod usage") - usedResources[v1.ResourceQuotas] = resource.MustParse("1") - usedResources[v1.ResourcePods] = resource.MustParse("0") - usedResources[v1.ResourceCPU] = resource.MustParse("0") - usedResources[v1.ResourceMemory] = resource.MustParse("0") - err = waitForResourceQuota(f.ClientSet, f.Namespace.Name, quotaName, usedResources) - Expect(err).NotTo(HaveOccurred()) - - By("Allowing creating an uninitialized pod that exceeds remaining quota") - requests = v1.ResourceList{} - requests[v1.ResourceCPU] = resource.MustParse("1100m") - requests[v1.ResourceMemory] = resource.MustParse("100Mi") - podName = "too-large-pod" - pod = newTestPodForQuota(f, podName, requests, v1.ResourceList{}) - pod.Initializers = &metav1.Initializers{Pending: []metav1.Initializer{{Name: "unhandled"}}} - _, err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).Create(pod) - // because no one is handling the initializer, server will return a 504 timeout - if err != nil && !errors.IsTimeout(err) { - framework.Failf("expect err to be timeout error, got %v", err) - } - createdPod, err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).Get(podName, metav1.GetOptions{}) - Expect(err).NotTo(HaveOccurred()) - - By("Ensuring only charges pod count") - usedResources = v1.ResourceList{} - usedResources[v1.ResourceQuotas] = resource.MustParse("1") - usedResources[v1.ResourcePods] = resource.MustParse("1") - err = waitForResourceQuota(f.ClientSet, f.Namespace.Name, quotaName, usedResources) - Expect(err).NotTo(HaveOccurred()) - - By("Disallowing initializing a Pod that doesn't fit quota") - _, err = framework.UpdatePodWithRetries(f.ClientSet, f.Namespace.Name, createdPod.Name, func(p *v1.Pod) { - p.Initializers = nil - }) - Expect(err).To(HaveOccurred()) - - By("Ensuring ResourceQuota status doesn't change") - usedResources = v1.ResourceList{} - usedResources[v1.ResourceQuotas] = resource.MustParse("1") - usedResources[v1.ResourcePods] = resource.MustParse("1") - err = waitForResourceQuota(f.ClientSet, f.Namespace.Name, quotaName, usedResources) - Expect(err).NotTo(HaveOccurred()) - - By("Deleting the pod") - err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).Delete(createdPod.Name, metav1.NewDeleteOptions(0)) - Expect(err).NotTo(HaveOccurred()) - - By("Ensuring ResourceQuota status doesn't change") - usedResources = v1.ResourceList{} - usedResources[v1.ResourceQuotas] = resource.MustParse("1") - // TODO: This is a bug. We need 51247 to fix it. - usedResources[v1.ResourcePods] = resource.MustParse("1") - err = waitForResourceQuota(f.ClientSet, f.Namespace.Name, quotaName, usedResources) - Expect(err).NotTo(HaveOccurred()) - }) - It("should create a ResourceQuota and capture the life of a pod.", func() { By("Creating a ResourceQuota") quotaName := "test-quota" diff --git a/test/integration/apiserver/print_test.go b/test/integration/apiserver/print_test.go index 5411492c90..ff21b2f82b 100644 --- a/test/integration/apiserver/print_test.go +++ b/test/integration/apiserver/print_test.go @@ -74,10 +74,6 @@ var kindWhiteList = sets.NewString( "AdmissionReview", // -- - // k8s.io/api/admissionregistration - "InitializerConfiguration", - // -- - // k8s.io/api/authentication "TokenRequest", "TokenReview", diff --git a/test/integration/etcd/data.go b/test/integration/etcd/data.go index 201c4efdc5..49838c8ce8 100644 --- a/test/integration/etcd/data.go +++ b/test/integration/etcd/data.go @@ -394,11 +394,6 @@ func GetEtcdStorageData() map[schema.GroupVersionResource]StorageData { }, // -- - // k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1 - gvr("admissionregistration.k8s.io", "v1alpha1", "initializerconfigurations"): { - Stub: `{"metadata":{"name":"ic1"},"initializers":[{"name":"initializer.k8s.io","rules":[{"apiGroups":["group"],"apiVersions":["version"],"resources":["resource"]}],"failurePolicy":"Ignore"}]}`, - ExpectedEtcdPath: "/registry/initializerconfigurations/ic1", - }, // k8s.io/kubernetes/pkg/apis/admissionregistration/v1beta1 gvr("admissionregistration.k8s.io", "v1beta1", "validatingwebhookconfigurations"): { Stub: `{"metadata":{"name":"hook1","creationTimestamp":null},"webhooks":[{"name":"externaladmissionhook.k8s.io","clientConfig":{"service":{"namespace":"ns","name":"n"},"caBundle":null},"rules":[{"operations":["CREATE"],"apiGroups":["group"],"apiVersions":["version"],"resources":["resource"]}],"failurePolicy":"Ignore"}]}`, diff --git a/test/integration/master/BUILD b/test/integration/master/BUILD index 1556f86b90..f1d2c0f625 100644 --- a/test/integration/master/BUILD +++ b/test/integration/master/BUILD @@ -28,7 +28,6 @@ go_test( "//pkg/apis/core:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/master:go_default_library", - "//staging/src/k8s.io/api/admissionregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", diff --git a/test/integration/master/crd_test.go b/test/integration/master/crd_test.go index ac28b037c3..47f664f6b9 100644 --- a/test/integration/master/crd_test.go +++ b/test/integration/master/crd_test.go @@ -21,18 +21,12 @@ import ( "testing" "time" - admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" networkingv1 "k8s.io/api/networking/v1" apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" apiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apiserver/pkg/features" - utilfeature "k8s.io/apiserver/pkg/util/feature" - utilfeaturetesting "k8s.io/apiserver/pkg/util/feature/testing" "k8s.io/client-go/dynamic" "k8s.io/client-go/kubernetes" kubeapiservertesting "k8s.io/kubernetes/cmd/kube-apiserver/app/testing" @@ -99,16 +93,9 @@ func TestCRDShadowGroup(t *testing.T) { } func TestCRD(t *testing.T) { - defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.Initializers, true)() - - result := kubeapiservertesting.StartTestServerOrDie(t, nil, []string{"--admission-control", "Initializers"}, framework.SharedEtcd()) + result := kubeapiservertesting.StartTestServerOrDie(t, nil, nil, framework.SharedEtcd()) defer result.TearDownFn() - kubeclient, err := kubernetes.NewForConfig(result.ClientConfig) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - apiextensionsclient, err := apiextensionsclientset.NewForConfig(result.ClientConfig) if err != nil { t.Fatalf("Unexpected error: %v", err) @@ -141,135 +128,6 @@ func TestCRD(t *testing.T) { if err != nil { t.Errorf("Failed to list foos.cr.bar.com instances: %v", err) } - - t.Logf("Creating InitializerConfiguration") - _, err = kubeclient.AdmissionregistrationV1alpha1().InitializerConfigurations().Create(&admissionregistrationv1alpha1.InitializerConfiguration{ - ObjectMeta: metav1.ObjectMeta{ - Name: "foos.cr.bar.com", - }, - Initializers: []admissionregistrationv1alpha1.Initializer{ - { - Name: "cr.bar.com", - Rules: []admissionregistrationv1alpha1.Rule{ - { - APIGroups: []string{"cr.bar.com"}, - APIVersions: []string{"*"}, - Resources: []string{"*"}, - }, - }, - }, - }, - }) - if err != nil { - t.Fatalf("Failed to create InitializerConfiguration: %v", err) - } - - // TODO DO NOT MERGE THIS - time.Sleep(5 * time.Second) - - t.Logf("Creating Foo instance") - foo := &Foo{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "cr.bar.com/v1", - Kind: "Foo", - }, - ObjectMeta: metav1.ObjectMeta{Name: "foo"}, - } - unstructuredFoo, err := unstructuredFoo(foo) - if err != nil { - t.Fatalf("Unable to create Foo: %v", err) - } - createErr := make(chan error, 1) - go func() { - _, err := dynamicClient.Resource(fooResource).Namespace("default").Create(unstructuredFoo, metav1.CreateOptions{}) - t.Logf("Foo instance create returned: %v", err) - if err != nil { - createErr <- err - } - }() - - err = wait.PollImmediate(100*time.Millisecond, wait.ForeverTestTimeout, func() (bool, error) { - select { - case createErr := <-createErr: - return true, createErr - default: - } - - t.Logf("Checking that Foo instance is visible with IncludeUninitialized=true") - _, err := dynamicClient.Resource(fooResource).Namespace("default").Get(foo.ObjectMeta.Name, metav1.GetOptions{ - IncludeUninitialized: true, - }) - switch { - case err == nil: - return true, nil - case errors.IsNotFound(err): - return false, nil - default: - return false, err - } - }) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - t.Logf("Removing initializer from Foo instance") - success := false - for i := 0; i < 10; i++ { - // would love to replace the following with a patch, but removing strings from the intitializer array - // is not what JSON (Merge) patch authors had in mind. - fooUnstructured, err := dynamicClient.Resource(fooResource).Namespace("default").Get(foo.ObjectMeta.Name, metav1.GetOptions{ - IncludeUninitialized: true, - }) - if err != nil { - t.Fatalf("Error getting Foo instance: %v", err) - } - bs, _ := fooUnstructured.MarshalJSON() - t.Logf("Got Foo instance: %v", string(bs)) - foo := Foo{} - if err := json.Unmarshal(bs, &foo); err != nil { - t.Fatalf("Error parsing Foo instance: %v", err) - } - - // remove initialize - if foo.ObjectMeta.Initializers == nil { - t.Fatalf("Expected initializers to be set in Foo instance") - } - found := false - for i := range foo.ObjectMeta.Initializers.Pending { - if foo.ObjectMeta.Initializers.Pending[i].Name == "cr.bar.com" { - foo.ObjectMeta.Initializers.Pending = append(foo.ObjectMeta.Initializers.Pending[:i], foo.ObjectMeta.Initializers.Pending[i+1:]...) - found = true - break - } - } - if !found { - t.Fatalf("Expected cr.bar.com as initializer on Foo instance") - } - if len(foo.ObjectMeta.Initializers.Pending) == 0 && foo.ObjectMeta.Initializers.Result == nil { - foo.ObjectMeta.Initializers = nil - } - bs, err = json.Marshal(&foo) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - fooUnstructured.UnmarshalJSON(bs) - - _, err = dynamicClient.Resource(fooResource).Namespace("default").Update(fooUnstructured, metav1.UpdateOptions{}) - if err != nil && !errors.IsConflict(err) { - t.Fatalf("Failed to update Foo instance: %v", err) - } else if err == nil { - success = true - break - } - } - if !success { - t.Fatalf("Failed to remove initializer from Foo object") - } - - t.Logf("Checking that Foo instance is visible after removing the initializer") - if _, err := dynamicClient.Resource(fooResource).Namespace("default").Get(foo.ObjectMeta.Name, metav1.GetOptions{}); err != nil { - t.Errorf("Unexpected error: %v", err) - } } type Foo struct {