diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 1167ed85529..169bab6bb9b 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", @@ -18171,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", @@ -18687,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", @@ -19016,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", @@ -19120,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", @@ -19232,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", @@ -19336,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", @@ -19701,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", @@ -20196,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", @@ -20300,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", @@ -20665,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", @@ -21160,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", @@ -21264,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", @@ -21596,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", @@ -22091,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", @@ -22195,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", @@ -22373,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", @@ -22477,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", @@ -22581,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", @@ -22872,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", @@ -23404,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", @@ -24110,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", @@ -24990,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", @@ -25870,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", @@ -26563,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", @@ -26667,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", @@ -26771,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", @@ -26875,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", @@ -26979,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", @@ -27083,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", @@ -27195,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", @@ -27315,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", @@ -27427,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", @@ -27547,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", @@ -27659,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", @@ -27779,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", @@ -27891,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", @@ -28011,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", @@ -28123,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", @@ -28243,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", @@ -28347,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", @@ -28484,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", @@ -28588,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", @@ -28879,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", @@ -29411,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", @@ -29769,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", @@ -30389,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", @@ -31082,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", @@ -31186,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", @@ -31290,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", @@ -31394,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", @@ -31506,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", @@ -31626,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", @@ -31738,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", @@ -31858,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", @@ -31970,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", @@ -32090,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", @@ -32227,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", @@ -32331,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", @@ -32435,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", @@ -32726,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", @@ -33258,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", @@ -33964,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", @@ -34844,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", @@ -35724,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", @@ -36417,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", @@ -36521,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", @@ -36625,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", @@ -36729,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", @@ -36833,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", @@ -36937,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", @@ -37049,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", @@ -37169,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", @@ -37281,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", @@ -37401,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", @@ -37513,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", @@ -37633,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", @@ -37745,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", @@ -37865,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", @@ -37977,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", @@ -38097,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", @@ -38201,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", @@ -38558,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", @@ -38887,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", @@ -38991,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", @@ -39182,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", @@ -39297,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", @@ -39445,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", @@ -39535,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", @@ -39617,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", @@ -39699,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", @@ -39814,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", @@ -39904,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", @@ -39986,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", @@ -40068,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", @@ -40203,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", @@ -40494,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", @@ -41013,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", @@ -41117,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", @@ -41229,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", @@ -41382,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", @@ -41673,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", @@ -42192,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", @@ -42296,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", @@ -42408,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", @@ -42561,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", @@ -42852,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", @@ -43371,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", @@ -43475,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", @@ -43587,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", @@ -43773,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", @@ -44064,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", @@ -44583,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", @@ -44687,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", @@ -44799,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", @@ -44952,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", @@ -45243,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", @@ -45762,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", @@ -45866,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", @@ -45978,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", @@ -46131,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", @@ -46422,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", @@ -46941,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", @@ -47045,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", @@ -47157,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", @@ -47530,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", @@ -48102,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", @@ -48206,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", @@ -48384,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", @@ -48675,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", @@ -49020,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", @@ -49124,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", @@ -49236,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", @@ -49389,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", @@ -49680,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", @@ -50025,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", @@ -50129,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", @@ -50241,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", @@ -50427,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", @@ -50718,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", @@ -51063,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", @@ -51167,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", @@ -51279,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", @@ -51465,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", @@ -51569,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", @@ -51673,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", @@ -51964,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", @@ -52670,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", @@ -53028,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", @@ -53648,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", @@ -54354,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", @@ -54886,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", @@ -55753,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", @@ -56044,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", @@ -56373,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", @@ -56477,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", @@ -56581,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", @@ -56685,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", @@ -56789,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", @@ -56901,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", @@ -57021,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", @@ -57133,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", @@ -57253,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", @@ -57365,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", @@ -57485,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", @@ -57597,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", @@ -57717,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", @@ -57829,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", @@ -57949,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", @@ -58053,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", @@ -58157,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", @@ -58269,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", @@ -58626,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", @@ -58971,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", @@ -59075,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", @@ -59187,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", @@ -59307,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", @@ -59664,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", @@ -60183,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", @@ -60474,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", @@ -60803,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", @@ -60915,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", @@ -61035,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", @@ -61139,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", @@ -61243,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", @@ -61608,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", @@ -62108,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", @@ -62608,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", @@ -63124,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", @@ -63453,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", @@ -63557,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", @@ -63661,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", @@ -63765,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", @@ -63877,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", @@ -63981,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", @@ -64093,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", @@ -64205,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", @@ -64325,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", @@ -64437,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", @@ -64557,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", @@ -64661,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", @@ -64985,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", @@ -65485,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", @@ -65985,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", @@ -66501,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", @@ -66830,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", @@ -66934,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", @@ -67038,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", @@ -67142,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", @@ -67254,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", @@ -67358,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", @@ -67470,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", @@ -67582,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", @@ -67702,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", @@ -67814,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", @@ -67934,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", @@ -68038,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", @@ -68362,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", @@ -68862,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", @@ -69362,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", @@ -69878,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", @@ -70207,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", @@ -70311,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", @@ -70415,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", @@ -70519,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", @@ -70631,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", @@ -70735,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", @@ -70847,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", @@ -70959,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", @@ -71079,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", @@ -71191,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", @@ -71311,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", @@ -71415,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", @@ -71772,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", @@ -72101,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", @@ -72205,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", @@ -72537,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", @@ -72866,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", @@ -72970,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", @@ -73335,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", @@ -73680,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", @@ -73784,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", @@ -73896,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", @@ -74016,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", @@ -74373,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", @@ -74889,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", @@ -75384,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", @@ -75488,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", @@ -75600,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", @@ -75704,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", @@ -76036,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", @@ -76365,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", @@ -76469,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", @@ -76801,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", @@ -77317,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", @@ -77646,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", @@ -77750,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", @@ -77862,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", @@ -77966,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", diff --git a/pkg/controller/.import-restrictions b/pkg/controller/.import-restrictions index 15dac9dd092..96eeb2aeef2 100644 --- a/pkg/controller/.import-restrictions +++ b/pkg/controller/.import-restrictions @@ -80,7 +80,6 @@ "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", @@ -313,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/namespace/deletion/namespaced_resources_deleter.go b/pkg/controller/namespace/deletion/namespaced_resources_deleter.go index 7564fb2b5e2..379a8219cb7 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 f898b2217ea..3cdd33aa622 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/admission/util/BUILD b/pkg/kubeapiserver/admission/util/BUILD deleted file mode 100644 index 3d24fc3e0da..00000000000 --- 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 d20ba439c5a..00000000000 --- 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/kubectl/cmd/annotate/annotate.go b/pkg/kubectl/cmd/annotate/annotate.go index dedc9e77ec9..860cc10050c 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 8dc008569f5..2d526a7feda 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 dcb858f8105..bd3aa793492 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 85616898af3..b0f9cb1d480 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 751b591a0f3..bc15a3a4726 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 a342b90c92f..63781453f53 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 225d7847354..6e92d5fae4f 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 e4e2dd14bba..c7872ba2afd 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 ddc4ba489b8..a38da4f88d5 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 b0d58527090..e3e56346a8d 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 a18032d9031..c88414590d0 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 0293df42729..9cf7b896700 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 9d661cb3abb..750738cc42f 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/quota/v1/evaluator/core/persistent_volume_claims.go b/pkg/quota/v1/evaluator/core/persistent_volume_claims.go index ea8ecad52df..3cf3a2b0fa9 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 dbf20e5661c..955a59596f0 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/apps/replicaset/strategy.go b/pkg/registry/apps/replicaset/strategy.go index 72d70074988..57aa5ab81ca 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 b0a5e8a3472..4f4acaa5cfd 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 bfe3c9d597b..566c33c024b 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 be15c1b9636..bb27621f2e0 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 5922b7754a6..3f853a51395 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 312fa8cfb4b..5ab7d1edd4a 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 8f32c162a83..14e0d26a163 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/storage/storage_test.go b/pkg/registry/core/pod/storage/storage_test.go index 5a084bc1311..20b2b9443db 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 307870e1fbc..eed0d70b861 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 7c05fee212e..9a718f2a26a 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 d52fd42abc2..52d39cbe97d 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 a043384ad9c..4f556b3fef8 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/admission.go b/plugin/pkg/admission/podnodeselector/admission.go index 1d502a0de12..e3e81ea7164 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 ba1d3f16a52..398ef18fb1f 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/admission.go b/plugin/pkg/admission/podtolerationrestriction/admission.go index 35823f5a058..92ae3726cbc 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 10bfa2e6a63..8736d2de03a 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/admission.go b/plugin/pkg/admission/serviceaccount/admission.go index a1c9d43db4d..007e20bf40b 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 be5ca5237f1..79ae943d7ee 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/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go index 988fdc1fef9..1da0555bff7 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 0fbad281757..123bcc6cde9 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/validation/objectmeta.go b/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go index 44b9b160066..43e2cebe741 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 c067aa5581a..3374caf2e45 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 673e56212a7..bdb71340ab6 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 2f6740d368a..e434e5055ab 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 18d190b2444..79b7567360f 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/types.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 8f488ba7ea4..372f3837e23 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 @@ -327,9 +327,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 +402,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 +487,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 679e709e8e3..137c37cd707 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 { 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 b1ad2dba0f0..00000000000 --- 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 341b5955748..00000000000 --- 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/pkg/endpoints/apiserver_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go index 6d8bac3adb0..36a925c3acf 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 7774f849e1b..510bdeae7db 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 88d949c4df0..35419089354 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/store.go b/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go index fa324ed9059..5489596e634 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 33c876c35ee..0208257e0c6 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/create.go b/staging/src/k8s.io/apiserver/pkg/registry/rest/create.go index 388ca523394..6fc9930e356 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,7 @@ 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) - } - // 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 572f924e73b..9fad541348b 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 147541bcfd3..33c919edda5 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,12 +102,8 @@ 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) - } - strategy.PrepareForUpdate(ctx, obj, old) // ClusterName is ignored and should not be saved 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 e3515148c35..008f768ec4a 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 780af4b2d10..2f36e43163b 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 527b81dda2b..b11c0c2b1c1 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 594105faae8..b7bfa0bd544 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 2cf08211c62..8f4ae504a91 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 caca032d2cd..a8438038850 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 2b5da24ff86..56dd6dbdc91 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 9c8c3d5994c..bed741dfa7b 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 8f6bcf7f890..16f15876ca1 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 42571822b8c..581922fb132 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/pkg/genericclioptions/builder_flags.go b/staging/src/k8s.io/cli-runtime/pkg/genericclioptions/builder_flags.go index 1d2aec6dd53..2f953211ef1 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 42f660a4e53..edc61d264b0 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 f36508bd4a9..0c0bdbec41c 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/kube-aggregator/pkg/registry/apiservice/strategy.go b/staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/strategy.go index 96c40fd33f5..636e8e44702 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/sample-apiserver/pkg/registry/wardle/fischer/strategy.go b/staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/fischer/strategy.go index a0e9af28c0b..3bfaeb2a91f 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 8f6fdccf0f3..7aa5f97d8b3 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/test/e2e/apimachinery/namespace.go b/test/e2e/apimachinery/namespace.go index 9c39ee4fab8..87ea3dcfc96 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 c34ae9c7d35..50f097995fe 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/master/crd_test.go b/test/integration/master/crd_test.go index 80594d99827..47f664f6b9e 100644 --- a/test/integration/master/crd_test.go +++ b/test/integration/master/crd_test.go @@ -27,9 +27,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" - "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" @@ -96,9 +93,7 @@ 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() apiextensionsclient, err := apiextensionsclientset.NewForConfig(result.ClientConfig)