diff --git a/api/discovery/aggregated_v2.json b/api/discovery/aggregated_v2.json index 07f8e71bb9d..578d1cad979 100644 --- a/api/discovery/aggregated_v2.json +++ b/api/discovery/aggregated_v2.json @@ -1622,7 +1622,7 @@ ] } ], - "version": "v1alpha1" + "version": "v1alpha2" } ] }, diff --git a/api/discovery/apis.json b/api/discovery/apis.json index 3f5d84098ad..d0a43c851cf 100644 --- a/api/discovery/apis.json +++ b/api/discovery/apis.json @@ -240,8 +240,8 @@ "version": "v1" }, { - "groupVersion": "coordination.k8s.io/v1alpha1", - "version": "v1alpha1" + "groupVersion": "coordination.k8s.io/v1alpha2", + "version": "v1alpha2" } ] }, diff --git a/api/discovery/apis__coordination.k8s.io.json b/api/discovery/apis__coordination.k8s.io.json index 3a9946cd4f3..ad9ce7685e5 100644 --- a/api/discovery/apis__coordination.k8s.io.json +++ b/api/discovery/apis__coordination.k8s.io.json @@ -12,8 +12,8 @@ "version": "v1" }, { - "groupVersion": "coordination.k8s.io/v1alpha1", - "version": "v1alpha1" + "groupVersion": "coordination.k8s.io/v1alpha2", + "version": "v1alpha2" } ] } diff --git a/api/discovery/apis__coordination.k8s.io__v1alpha1.json b/api/discovery/apis__coordination.k8s.io__v1alpha2.json similarity index 80% rename from api/discovery/apis__coordination.k8s.io__v1alpha1.json rename to api/discovery/apis__coordination.k8s.io__v1alpha2.json index 9230b3f875e..d0e55aba0ed 100644 --- a/api/discovery/apis__coordination.k8s.io__v1alpha1.json +++ b/api/discovery/apis__coordination.k8s.io__v1alpha2.json @@ -1,6 +1,6 @@ { "apiVersion": "v1", - "groupVersion": "coordination.k8s.io/v1alpha1", + "groupVersion": "coordination.k8s.io/v1alpha2", "kind": "APIResourceList", "resources": [ { @@ -8,7 +8,7 @@ "name": "leasecandidates", "namespaced": true, "singularName": "leasecandidate", - "storageVersionHash": "VM2ILh8OBCI=", + "storageVersionHash": "RuOD9aJW3DI=", "verbs": [ "create", "delete", diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 01e5b24f1e6..71c6ab93a59 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -5331,7 +5331,7 @@ }, "type": "object" }, - "io.k8s.api.coordination.v1alpha1.LeaseCandidate": { + "io.k8s.api.coordination.v1alpha2.LeaseCandidate": { "description": "LeaseCandidate defines a candidate for a Lease object. Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.", "properties": { "apiVersion": { @@ -5347,7 +5347,7 @@ "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidateSpec", + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec", "description": "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, @@ -5356,11 +5356,11 @@ { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } ] }, - "io.k8s.api.coordination.v1alpha1.LeaseCandidateList": { + "io.k8s.api.coordination.v1alpha2.LeaseCandidateList": { "description": "LeaseCandidateList is a list of Lease objects.", "properties": { "apiVersion": { @@ -5370,7 +5370,7 @@ "items": { "description": "items is a list of schema objects.", "items": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" }, "type": "array" }, @@ -5391,15 +5391,15 @@ { "group": "coordination.k8s.io", "kind": "LeaseCandidateList", - "version": "v1alpha1" + "version": "v1alpha2" } ] }, - "io.k8s.api.coordination.v1alpha1.LeaseCandidateSpec": { + "io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec": { "description": "LeaseCandidateSpec is a specification of a Lease.", "properties": { "binaryVersion": { - "description": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required when strategy is \"OldestEmulationVersion\"", + "description": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.", "type": "string" }, "emulationVersion": { @@ -5414,22 +5414,19 @@ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime", "description": "PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime." }, - "preferredStrategies": { - "description": "PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election. The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated leader election to make a decision about the final election strategy. This follows as - If all clients have strategy X as the first element in this list, strategy X will be used. - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y\n will be used.\n- If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader\n election will not operate the Lease until resolved.\n(Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, "renewTime": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime", "description": "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates." + }, + "strategy": { + "description": "Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", + "type": "string" } }, "required": [ "leaseName", - "preferredStrategies" + "binaryVersion", + "strategy" ], "type": "object" }, @@ -18315,7 +18312,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -19067,7 +19064,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -56922,7 +56919,7 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/": { + "/apis/coordination.k8s.io/v1alpha2/": { "get": { "consumes": [ "application/json", @@ -56931,7 +56928,7 @@ "application/cbor" ], "description": "get available resources", - "operationId": "getCoordinationV1alpha1APIResources", + "operationId": "getCoordinationV1alpha2APIResources", "produces": [ "application/json", "application/yaml", @@ -56953,17 +56950,17 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ] } }, - "/apis/coordination.k8s.io/v1alpha1/leasecandidates": { + "/apis/coordination.k8s.io/v1alpha2/leasecandidates": { "get": { "consumes": [ "*/*" ], "description": "list or watch objects of kind LeaseCandidate", - "operationId": "listCoordinationV1alpha1LeaseCandidateForAllNamespaces", + "operationId": "listCoordinationV1alpha2LeaseCandidateForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -56977,7 +56974,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "401": { @@ -56988,13 +56985,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "parameters": [ @@ -57033,13 +57030,13 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates": { + "/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of LeaseCandidate", - "operationId": "deleteCoordinationV1alpha1CollectionNamespacedLeaseCandidate", + "operationId": "deleteCoordinationV1alpha2CollectionNamespacedLeaseCandidate", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -57109,13 +57106,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "get": { @@ -57123,7 +57120,7 @@ "*/*" ], "description": "list or watch objects of kind LeaseCandidate", - "operationId": "listCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "listCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -57169,7 +57166,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "401": { @@ -57180,13 +57177,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "parameters": [ @@ -57202,14 +57199,14 @@ "*/*" ], "description": "create a LeaseCandidate", - "operationId": "createCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "createCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, { @@ -57240,19 +57237,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "401": { @@ -57263,23 +57260,23 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } } }, - "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}": { + "/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete a LeaseCandidate", - "operationId": "deleteCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "deleteCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -57331,13 +57328,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "get": { @@ -57345,7 +57342,7 @@ "*/*" ], "description": "read the specified LeaseCandidate", - "operationId": "readCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "readCoordinationV1alpha2NamespacedLeaseCandidate", "produces": [ "application/json", "application/yaml", @@ -57356,7 +57353,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "401": { @@ -57367,13 +57364,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "parameters": [ @@ -57401,7 +57398,7 @@ "application/apply-patch+cbor" ], "description": "partially update the specified LeaseCandidate", - "operationId": "patchCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "patchCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -57437,13 +57434,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "401": { @@ -57454,13 +57451,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "put": { @@ -57468,14 +57465,14 @@ "*/*" ], "description": "replace the specified LeaseCandidate", - "operationId": "replaceCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "replaceCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, { @@ -57506,13 +57503,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "401": { @@ -57523,23 +57520,23 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } } }, - "/apis/coordination.k8s.io/v1alpha1/watch/leasecandidates": { + "/apis/coordination.k8s.io/v1alpha2/watch/leasecandidates": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchCoordinationV1alpha1LeaseCandidateListForAllNamespaces", + "operationId": "watchCoordinationV1alpha2LeaseCandidateListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -57564,13 +57561,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "parameters": [ @@ -57609,13 +57606,13 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/watch/namespaces/{namespace}/leasecandidates": { + "/apis/coordination.k8s.io/v1alpha2/watch/namespaces/{namespace}/leasecandidates": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchCoordinationV1alpha1NamespacedLeaseCandidateList", + "operationId": "watchCoordinationV1alpha2NamespacedLeaseCandidateList", "produces": [ "application/json", "application/yaml", @@ -57640,13 +57637,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "parameters": [ @@ -57688,13 +57685,13 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/watch/namespaces/{namespace}/leasecandidates/{name}": { + "/apis/coordination.k8s.io/v1alpha2/watch/namespaces/{namespace}/leasecandidates/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "watchCoordinationV1alpha2NamespacedLeaseCandidate", "produces": [ "application/json", "application/yaml", @@ -57719,13 +57716,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "parameters": [ diff --git a/api/openapi-spec/v3/api__v1_openapi.json b/api/openapi-spec/v3/api__v1_openapi.json index 3c01993688a..adce9ad6534 100644 --- a/api/openapi-spec/v3/api__v1_openapi.json +++ b/api/openapi-spec/v3/api__v1_openapi.json @@ -8974,7 +8974,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -9725,7 +9725,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json index e06cc73ec8d..991e10d0726 100644 --- a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json @@ -1450,7 +1450,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -2196,7 +2196,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json index 93300aedc9e..c5d1bb4cb04 100644 --- a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json @@ -814,7 +814,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1560,7 +1560,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json index a017a5fa000..69e6fe060b9 100644 --- a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json @@ -964,7 +964,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1710,7 +1710,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json index 454472b70cc..e140f7ad2a4 100644 --- a/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json @@ -1173,7 +1173,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1862,7 +1862,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json index f55fba97580..6608168a283 100644 --- a/api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json @@ -306,7 +306,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -995,7 +995,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__apps__v1_openapi.json b/api/openapi-spec/v3/apis__apps__v1_openapi.json index 489671bc86c..b52b3e525a3 100644 --- a/api/openapi-spec/v3/apis__apps__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apps__v1_openapi.json @@ -5674,7 +5674,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -6420,7 +6420,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json b/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json index 64169b4b10d..62b2c0bb359 100644 --- a/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json +++ b/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json @@ -499,7 +499,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1188,7 +1188,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json b/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json index 3cd30149158..33700788ec9 100644 --- a/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json +++ b/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json @@ -1151,7 +1151,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1897,7 +1897,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__batch__v1_openapi.json b/api/openapi-spec/v3/apis__batch__v1_openapi.json index 7ba0758b489..e5c36119bd0 100644 --- a/api/openapi-spec/v3/apis__batch__v1_openapi.json +++ b/api/openapi-spec/v3/apis__batch__v1_openapi.json @@ -4878,7 +4878,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -5624,7 +5624,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json index 7fafb24b998..ab4419bb996 100644 --- a/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json @@ -535,7 +535,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1224,7 +1224,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json index da623ce54e4..e39c7ce0a92 100644 --- a/api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json @@ -411,7 +411,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1100,7 +1100,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json index 3c9df0835e2..c7bab8df008 100644 --- a/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json @@ -434,7 +434,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1128,7 +1128,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha2_openapi.json similarity index 96% rename from api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha1_openapi.json rename to api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha2_openapi.json index c2850f3dbed..e89ef6a2ecb 100644 --- a/api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha2_openapi.json @@ -1,7 +1,7 @@ { "components": { "schemas": { - "io.k8s.api.coordination.v1alpha1.LeaseCandidate": { + "io.k8s.api.coordination.v1alpha2.LeaseCandidate": { "description": "LeaseCandidate defines a candidate for a Lease object. Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.", "properties": { "apiVersion": { @@ -24,7 +24,7 @@ "spec": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateSpec" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec" } ], "default": {}, @@ -36,11 +36,11 @@ { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } ] }, - "io.k8s.api.coordination.v1alpha1.LeaseCandidateList": { + "io.k8s.api.coordination.v1alpha2.LeaseCandidateList": { "description": "LeaseCandidateList is a list of Lease objects.", "properties": { "apiVersion": { @@ -52,7 +52,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } ], "default": {} @@ -81,15 +81,16 @@ { "group": "coordination.k8s.io", "kind": "LeaseCandidateList", - "version": "v1alpha1" + "version": "v1alpha2" } ] }, - "io.k8s.api.coordination.v1alpha1.LeaseCandidateSpec": { + "io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec": { "description": "LeaseCandidateSpec is a specification of a Lease.", "properties": { "binaryVersion": { - "description": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required when strategy is \"OldestEmulationVersion\"", + "default": "", + "description": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.", "type": "string" }, "emulationVersion": { @@ -109,15 +110,6 @@ ], "description": "PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime." }, - "preferredStrategies": { - "description": "PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election. The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated leader election to make a decision about the final election strategy. This follows as - If all clients have strategy X as the first element in this list, strategy X will be used. - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y\n will be used.\n- If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader\n election will not operate the Lease until resolved.\n(Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", - "items": { - "default": "", - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, "renewTime": { "allOf": [ { @@ -125,11 +117,16 @@ } ], "description": "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates." + }, + "strategy": { + "description": "Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", + "type": "string" } }, "required": [ "leaseName", - "preferredStrategies" + "binaryVersion", + "strategy" ], "type": "object" }, @@ -438,7 +435,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1132,7 +1129,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1316,10 +1313,10 @@ }, "openapi": "3.0.0", "paths": { - "/apis/coordination.k8s.io/v1alpha1/": { + "/apis/coordination.k8s.io/v1alpha2/": { "get": { "description": "get available resources", - "operationId": "getCoordinationV1alpha1APIResources", + "operationId": "getCoordinationV1alpha2APIResources", "responses": { "200": { "content": { @@ -1351,50 +1348,50 @@ } }, "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ] } }, - "/apis/coordination.k8s.io/v1alpha1/leasecandidates": { + "/apis/coordination.k8s.io/v1alpha2/leasecandidates": { "get": { "description": "list or watch objects of kind LeaseCandidate", - "operationId": "listCoordinationV1alpha1LeaseCandidateForAllNamespaces", + "operationId": "listCoordinationV1alpha2LeaseCandidateForAllNamespaces", "responses": { "200": { "content": { "application/cbor": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "application/cbor-seq": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } } }, @@ -1405,13 +1402,13 @@ } }, "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "parameters": [ @@ -1516,10 +1513,10 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates": { + "/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates": { "delete": { "description": "delete collection of LeaseCandidate", - "operationId": "deleteCoordinationV1alpha1CollectionNamespacedLeaseCandidate", + "operationId": "deleteCoordinationV1alpha2CollectionNamespacedLeaseCandidate", "parameters": [ { "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", @@ -1679,18 +1676,18 @@ } }, "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "get": { "description": "list or watch objects of kind LeaseCandidate", - "operationId": "listCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "listCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -1788,37 +1785,37 @@ "content": { "application/cbor": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "application/cbor-seq": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } } }, @@ -1829,13 +1826,13 @@ } }, "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "parameters": [ @@ -1861,7 +1858,7 @@ ], "post": { "description": "create a LeaseCandidate", - "operationId": "createCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "createCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -1895,7 +1892,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } } }, @@ -1906,22 +1903,22 @@ "content": { "application/cbor": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } } }, @@ -1931,22 +1928,22 @@ "content": { "application/cbor": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } } }, @@ -1956,22 +1953,22 @@ "content": { "application/cbor": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } } }, @@ -1982,20 +1979,20 @@ } }, "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } } }, - "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}": { + "/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}": { "delete": { "description": "delete a LeaseCandidate", - "operationId": "deleteCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "deleteCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -2108,39 +2105,39 @@ } }, "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "get": { "description": "read the specified LeaseCandidate", - "operationId": "readCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "readCoordinationV1alpha2NamespacedLeaseCandidate", "responses": { "200": { "content": { "application/cbor": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } } }, @@ -2151,13 +2148,13 @@ } }, "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "parameters": [ @@ -2193,7 +2190,7 @@ ], "patch": { "description": "partially update the specified LeaseCandidate", - "operationId": "patchCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "patchCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -2267,22 +2264,22 @@ "content": { "application/cbor": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } } }, @@ -2292,22 +2289,22 @@ "content": { "application/cbor": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } } }, @@ -2318,18 +2315,18 @@ } }, "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "put": { "description": "replace the specified LeaseCandidate", - "operationId": "replaceCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "replaceCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -2363,7 +2360,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } } }, @@ -2374,22 +2371,22 @@ "content": { "application/cbor": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } } }, @@ -2399,22 +2396,22 @@ "content": { "application/cbor": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/components/schemas/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } } }, @@ -2425,20 +2422,20 @@ } }, "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } } }, - "/apis/coordination.k8s.io/v1alpha1/watch/leasecandidates": { + "/apis/coordination.k8s.io/v1alpha2/watch/leasecandidates": { "get": { "description": "watch individual changes to a list of LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchCoordinationV1alpha1LeaseCandidateListForAllNamespaces", + "operationId": "watchCoordinationV1alpha2LeaseCandidateListForAllNamespaces", "responses": { "200": { "content": { @@ -2485,13 +2482,13 @@ } }, "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "parameters": [ @@ -2596,10 +2593,10 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/watch/namespaces/{namespace}/leasecandidates": { + "/apis/coordination.k8s.io/v1alpha2/watch/namespaces/{namespace}/leasecandidates": { "get": { "description": "watch individual changes to a list of LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchCoordinationV1alpha1NamespacedLeaseCandidateList", + "operationId": "watchCoordinationV1alpha2NamespacedLeaseCandidateList", "responses": { "200": { "content": { @@ -2646,13 +2643,13 @@ } }, "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "parameters": [ @@ -2767,10 +2764,10 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/watch/namespaces/{namespace}/leasecandidates/{name}": { + "/apis/coordination.k8s.io/v1alpha2/watch/namespaces/{namespace}/leasecandidates/{name}": { "get": { "description": "watch changes to an object of kind LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchCoordinationV1alpha1NamespacedLeaseCandidate", + "operationId": "watchCoordinationV1alpha2NamespacedLeaseCandidate", "responses": { "200": { "content": { @@ -2817,13 +2814,13 @@ } }, "tags": [ - "coordination_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } }, "parameters": [ diff --git a/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json index d332b9fbc00..85360ad92e8 100644 --- a/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json @@ -589,7 +589,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1278,7 +1278,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json index 2b557162027..0546a85a611 100644 --- a/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json @@ -544,7 +544,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1238,7 +1238,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json index 000a6540108..8cb4873bfca 100644 --- a/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json @@ -1035,7 +1035,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1724,7 +1724,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json index c11b6d346ca..9e9dc0a02c0 100644 --- a/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json @@ -525,7 +525,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1214,7 +1214,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json index 1c008d3b1d8..781febfc405 100644 --- a/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json @@ -1107,7 +1107,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1853,7 +1853,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json index 4ad3b5c7c11..9a66d596678 100644 --- a/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json @@ -611,7 +611,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1300,7 +1300,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json index 5d7c0744dc1..b5dceb2083c 100644 --- a/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json @@ -484,7 +484,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1173,7 +1173,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__policy__v1_openapi.json b/api/openapi-spec/v3/apis__policy__v1_openapi.json index 1019f7c9b3a..5d4bb689e87 100644 --- a/api/openapi-spec/v3/apis__policy__v1_openapi.json +++ b/api/openapi-spec/v3/apis__policy__v1_openapi.json @@ -546,7 +546,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1292,7 +1292,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json index b276851d581..2c4da21e77d 100644 --- a/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json @@ -819,7 +819,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1565,7 +1565,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json index 37ec1eb62e8..c9d9c65b425 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json @@ -1511,7 +1511,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -2200,7 +2200,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json index 35f423db35b..776e80bf6fd 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json @@ -1533,7 +1533,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -2222,7 +2222,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json index 7022d579828..aa63d91f8b8 100644 --- a/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json @@ -402,7 +402,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1091,7 +1091,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json index a006a1027d8..072d2520cc0 100644 --- a/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json @@ -2264,7 +2264,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -3010,7 +3010,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json index 145937708a2..efd606f6672 100644 --- a/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json @@ -397,7 +397,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1086,7 +1086,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json index 4e7f3936a26..df4109c01eb 100644 --- a/api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__storage.k8s.io__v1beta1_openapi.json @@ -397,7 +397,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1086,7 +1086,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/api/openapi-spec/v3/apis__storagemigration.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__storagemigration.k8s.io__v1alpha1_openapi.json index 62ba66d9982..0c27411fa05 100644 --- a/api/openapi-spec/v3/apis__storagemigration.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__storagemigration.k8s.io__v1alpha1_openapi.json @@ -509,7 +509,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -1198,7 +1198,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", diff --git a/pkg/apis/coordination/v1alpha2/zz_generated.conversion.go b/pkg/apis/coordination/v1alpha2/zz_generated.conversion.go new file mode 100644 index 00000000000..bb9b0a7b72e --- /dev/null +++ b/pkg/apis/coordination/v1alpha2/zz_generated.conversion.go @@ -0,0 +1,151 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + unsafe "unsafe" + + coordinationv1 "k8s.io/api/coordination/v1" + coordinationv1alpha2 "k8s.io/api/coordination/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + coordination "k8s.io/kubernetes/pkg/apis/coordination" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*coordinationv1alpha2.LeaseCandidate)(nil), (*coordination.LeaseCandidate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_LeaseCandidate_To_coordination_LeaseCandidate(a.(*coordinationv1alpha2.LeaseCandidate), b.(*coordination.LeaseCandidate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*coordination.LeaseCandidate)(nil), (*coordinationv1alpha2.LeaseCandidate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_coordination_LeaseCandidate_To_v1alpha2_LeaseCandidate(a.(*coordination.LeaseCandidate), b.(*coordinationv1alpha2.LeaseCandidate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*coordinationv1alpha2.LeaseCandidateList)(nil), (*coordination.LeaseCandidateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_LeaseCandidateList_To_coordination_LeaseCandidateList(a.(*coordinationv1alpha2.LeaseCandidateList), b.(*coordination.LeaseCandidateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*coordination.LeaseCandidateList)(nil), (*coordinationv1alpha2.LeaseCandidateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_coordination_LeaseCandidateList_To_v1alpha2_LeaseCandidateList(a.(*coordination.LeaseCandidateList), b.(*coordinationv1alpha2.LeaseCandidateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*coordinationv1alpha2.LeaseCandidateSpec)(nil), (*coordination.LeaseCandidateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_LeaseCandidateSpec_To_coordination_LeaseCandidateSpec(a.(*coordinationv1alpha2.LeaseCandidateSpec), b.(*coordination.LeaseCandidateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*coordination.LeaseCandidateSpec)(nil), (*coordinationv1alpha2.LeaseCandidateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_coordination_LeaseCandidateSpec_To_v1alpha2_LeaseCandidateSpec(a.(*coordination.LeaseCandidateSpec), b.(*coordinationv1alpha2.LeaseCandidateSpec), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha2_LeaseCandidate_To_coordination_LeaseCandidate(in *coordinationv1alpha2.LeaseCandidate, out *coordination.LeaseCandidate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha2_LeaseCandidateSpec_To_coordination_LeaseCandidateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha2_LeaseCandidate_To_coordination_LeaseCandidate is an autogenerated conversion function. +func Convert_v1alpha2_LeaseCandidate_To_coordination_LeaseCandidate(in *coordinationv1alpha2.LeaseCandidate, out *coordination.LeaseCandidate, s conversion.Scope) error { + return autoConvert_v1alpha2_LeaseCandidate_To_coordination_LeaseCandidate(in, out, s) +} + +func autoConvert_coordination_LeaseCandidate_To_v1alpha2_LeaseCandidate(in *coordination.LeaseCandidate, out *coordinationv1alpha2.LeaseCandidate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_coordination_LeaseCandidateSpec_To_v1alpha2_LeaseCandidateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_coordination_LeaseCandidate_To_v1alpha2_LeaseCandidate is an autogenerated conversion function. +func Convert_coordination_LeaseCandidate_To_v1alpha2_LeaseCandidate(in *coordination.LeaseCandidate, out *coordinationv1alpha2.LeaseCandidate, s conversion.Scope) error { + return autoConvert_coordination_LeaseCandidate_To_v1alpha2_LeaseCandidate(in, out, s) +} + +func autoConvert_v1alpha2_LeaseCandidateList_To_coordination_LeaseCandidateList(in *coordinationv1alpha2.LeaseCandidateList, out *coordination.LeaseCandidateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]coordination.LeaseCandidate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha2_LeaseCandidateList_To_coordination_LeaseCandidateList is an autogenerated conversion function. +func Convert_v1alpha2_LeaseCandidateList_To_coordination_LeaseCandidateList(in *coordinationv1alpha2.LeaseCandidateList, out *coordination.LeaseCandidateList, s conversion.Scope) error { + return autoConvert_v1alpha2_LeaseCandidateList_To_coordination_LeaseCandidateList(in, out, s) +} + +func autoConvert_coordination_LeaseCandidateList_To_v1alpha2_LeaseCandidateList(in *coordination.LeaseCandidateList, out *coordinationv1alpha2.LeaseCandidateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]coordinationv1alpha2.LeaseCandidate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_coordination_LeaseCandidateList_To_v1alpha2_LeaseCandidateList is an autogenerated conversion function. +func Convert_coordination_LeaseCandidateList_To_v1alpha2_LeaseCandidateList(in *coordination.LeaseCandidateList, out *coordinationv1alpha2.LeaseCandidateList, s conversion.Scope) error { + return autoConvert_coordination_LeaseCandidateList_To_v1alpha2_LeaseCandidateList(in, out, s) +} + +func autoConvert_v1alpha2_LeaseCandidateSpec_To_coordination_LeaseCandidateSpec(in *coordinationv1alpha2.LeaseCandidateSpec, out *coordination.LeaseCandidateSpec, s conversion.Scope) error { + out.LeaseName = in.LeaseName + out.PingTime = (*v1.MicroTime)(unsafe.Pointer(in.PingTime)) + out.RenewTime = (*v1.MicroTime)(unsafe.Pointer(in.RenewTime)) + out.BinaryVersion = in.BinaryVersion + out.EmulationVersion = in.EmulationVersion + out.Strategy = coordination.CoordinatedLeaseStrategy(in.Strategy) + return nil +} + +// Convert_v1alpha2_LeaseCandidateSpec_To_coordination_LeaseCandidateSpec is an autogenerated conversion function. +func Convert_v1alpha2_LeaseCandidateSpec_To_coordination_LeaseCandidateSpec(in *coordinationv1alpha2.LeaseCandidateSpec, out *coordination.LeaseCandidateSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_LeaseCandidateSpec_To_coordination_LeaseCandidateSpec(in, out, s) +} + +func autoConvert_coordination_LeaseCandidateSpec_To_v1alpha2_LeaseCandidateSpec(in *coordination.LeaseCandidateSpec, out *coordinationv1alpha2.LeaseCandidateSpec, s conversion.Scope) error { + out.LeaseName = in.LeaseName + out.PingTime = (*v1.MicroTime)(unsafe.Pointer(in.PingTime)) + out.RenewTime = (*v1.MicroTime)(unsafe.Pointer(in.RenewTime)) + out.BinaryVersion = in.BinaryVersion + out.EmulationVersion = in.EmulationVersion + out.Strategy = coordinationv1.CoordinatedLeaseStrategy(in.Strategy) + return nil +} + +// Convert_coordination_LeaseCandidateSpec_To_v1alpha2_LeaseCandidateSpec is an autogenerated conversion function. +func Convert_coordination_LeaseCandidateSpec_To_v1alpha2_LeaseCandidateSpec(in *coordination.LeaseCandidateSpec, out *coordinationv1alpha2.LeaseCandidateSpec, s conversion.Scope) error { + return autoConvert_coordination_LeaseCandidateSpec_To_v1alpha2_LeaseCandidateSpec(in, out, s) +} diff --git a/pkg/apis/coordination/v1alpha2/zz_generated.defaults.go b/pkg/apis/coordination/v1alpha2/zz_generated.defaults.go new file mode 100644 index 00000000000..7e0a05edc95 --- /dev/null +++ b/pkg/apis/coordination/v1alpha2/zz_generated.defaults.go @@ -0,0 +1,33 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/pkg/apis/coordination/zz_generated.deepcopy.go b/pkg/apis/coordination/zz_generated.deepcopy.go index fe8a3db6d74..a03604f5bed 100644 --- a/pkg/apis/coordination/zz_generated.deepcopy.go +++ b/pkg/apis/coordination/zz_generated.deepcopy.go @@ -123,11 +123,6 @@ func (in *LeaseCandidateSpec) DeepCopyInto(out *LeaseCandidateSpec) { in, out := &in.RenewTime, &out.RenewTime *out = (*in).DeepCopy() } - if in.PreferredStrategies != nil { - in, out := &in.PreferredStrategies, &out.PreferredStrategies - *out = make([]CoordinatedLeaseStrategy, len(*in)) - copy(*out, *in) - } return } diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 6e651ec3348..a9e2e2e5a11 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -385,9 +385,9 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/coordination/v1.Lease": schema_k8sio_api_coordination_v1_Lease(ref), "k8s.io/api/coordination/v1.LeaseList": schema_k8sio_api_coordination_v1_LeaseList(ref), "k8s.io/api/coordination/v1.LeaseSpec": schema_k8sio_api_coordination_v1_LeaseSpec(ref), - "k8s.io/api/coordination/v1alpha1.LeaseCandidate": schema_k8sio_api_coordination_v1alpha1_LeaseCandidate(ref), - "k8s.io/api/coordination/v1alpha1.LeaseCandidateList": schema_k8sio_api_coordination_v1alpha1_LeaseCandidateList(ref), - "k8s.io/api/coordination/v1alpha1.LeaseCandidateSpec": schema_k8sio_api_coordination_v1alpha1_LeaseCandidateSpec(ref), + "k8s.io/api/coordination/v1alpha2.LeaseCandidate": schema_k8sio_api_coordination_v1alpha2_LeaseCandidate(ref), + "k8s.io/api/coordination/v1alpha2.LeaseCandidateList": schema_k8sio_api_coordination_v1alpha2_LeaseCandidateList(ref), + "k8s.io/api/coordination/v1alpha2.LeaseCandidateSpec": schema_k8sio_api_coordination_v1alpha2_LeaseCandidateSpec(ref), "k8s.io/api/coordination/v1beta1.Lease": schema_k8sio_api_coordination_v1beta1_Lease(ref), "k8s.io/api/coordination/v1beta1.LeaseList": schema_k8sio_api_coordination_v1beta1_LeaseList(ref), "k8s.io/api/coordination/v1beta1.LeaseSpec": schema_k8sio_api_coordination_v1beta1_LeaseSpec(ref), @@ -19345,7 +19345,7 @@ func schema_k8sio_api_coordination_v1_LeaseSpec(ref common.ReferenceCallback) co } } -func schema_k8sio_api_coordination_v1alpha1_LeaseCandidate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_coordination_v1alpha2_LeaseCandidate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19377,18 +19377,18 @@ func schema_k8sio_api_coordination_v1alpha1_LeaseCandidate(ref common.ReferenceC SchemaProps: spec.SchemaProps{ Description: "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1alpha1.LeaseCandidateSpec"), + Ref: ref("k8s.io/api/coordination/v1alpha2.LeaseCandidateSpec"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1alpha1.LeaseCandidateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/coordination/v1alpha2.LeaseCandidateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_coordination_v1alpha1_LeaseCandidateList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_coordination_v1alpha2_LeaseCandidateList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19424,7 +19424,7 @@ func schema_k8sio_api_coordination_v1alpha1_LeaseCandidateList(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/coordination/v1alpha1.LeaseCandidate"), + Ref: ref("k8s.io/api/coordination/v1alpha2.LeaseCandidate"), }, }, }, @@ -19435,11 +19435,11 @@ func schema_k8sio_api_coordination_v1alpha1_LeaseCandidateList(ref common.Refere }, }, Dependencies: []string{ - "k8s.io/api/coordination/v1alpha1.LeaseCandidate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/coordination/v1alpha2.LeaseCandidate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_coordination_v1alpha1_LeaseCandidateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_coordination_v1alpha2_LeaseCandidateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -19468,7 +19468,8 @@ func schema_k8sio_api_coordination_v1alpha1_LeaseCandidateSpec(ref common.Refere }, "binaryVersion": { SchemaProps: spec.SchemaProps{ - Description: "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required when strategy is \"OldestEmulationVersion\"", + Description: "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -19480,28 +19481,15 @@ func schema_k8sio_api_coordination_v1alpha1_LeaseCandidateSpec(ref common.Refere Format: "", }, }, - "preferredStrategies": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, + "strategy": { SchemaProps: spec.SchemaProps{ - Description: "PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election. The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated leader election to make a decision about the final election strategy. This follows as - If all clients have strategy X as the first element in this list, strategy X will be used. - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y\n will be used.\n- If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader\n election will not operate the Lease until resolved.\n(Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", + Type: []string{"string"}, + Format: "", }, }, }, - Required: []string{"leaseName", "preferredStrategies"}, + Required: []string{"leaseName", "binaryVersion", "strategy"}, }, }, Dependencies: []string{ diff --git a/staging/src/k8s.io/api/coordination/v1alpha2/generated.pb.go b/staging/src/k8s.io/api/coordination/v1alpha2/generated.pb.go new file mode 100644 index 00000000000..85ceea1f258 --- /dev/null +++ b/staging/src/k8s.io/api/coordination/v1alpha2/generated.pb.go @@ -0,0 +1,1027 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/api/coordination/v1alpha2/generated.proto + +package v1alpha2 + +import ( + fmt "fmt" + + io "io" + + proto "github.com/gogo/protobuf/proto" + + k8s_io_api_coordination_v1 "k8s.io/api/coordination/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *LeaseCandidate) Reset() { *m = LeaseCandidate{} } +func (*LeaseCandidate) ProtoMessage() {} +func (*LeaseCandidate) Descriptor() ([]byte, []int) { + return fileDescriptor_c1ec5c989d262916, []int{0} +} +func (m *LeaseCandidate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LeaseCandidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *LeaseCandidate) XXX_Merge(src proto.Message) { + xxx_messageInfo_LeaseCandidate.Merge(m, src) +} +func (m *LeaseCandidate) XXX_Size() int { + return m.Size() +} +func (m *LeaseCandidate) XXX_DiscardUnknown() { + xxx_messageInfo_LeaseCandidate.DiscardUnknown(m) +} + +var xxx_messageInfo_LeaseCandidate proto.InternalMessageInfo + +func (m *LeaseCandidateList) Reset() { *m = LeaseCandidateList{} } +func (*LeaseCandidateList) ProtoMessage() {} +func (*LeaseCandidateList) Descriptor() ([]byte, []int) { + return fileDescriptor_c1ec5c989d262916, []int{1} +} +func (m *LeaseCandidateList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LeaseCandidateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *LeaseCandidateList) XXX_Merge(src proto.Message) { + xxx_messageInfo_LeaseCandidateList.Merge(m, src) +} +func (m *LeaseCandidateList) XXX_Size() int { + return m.Size() +} +func (m *LeaseCandidateList) XXX_DiscardUnknown() { + xxx_messageInfo_LeaseCandidateList.DiscardUnknown(m) +} + +var xxx_messageInfo_LeaseCandidateList proto.InternalMessageInfo + +func (m *LeaseCandidateSpec) Reset() { *m = LeaseCandidateSpec{} } +func (*LeaseCandidateSpec) ProtoMessage() {} +func (*LeaseCandidateSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_c1ec5c989d262916, []int{2} +} +func (m *LeaseCandidateSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LeaseCandidateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *LeaseCandidateSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_LeaseCandidateSpec.Merge(m, src) +} +func (m *LeaseCandidateSpec) XXX_Size() int { + return m.Size() +} +func (m *LeaseCandidateSpec) XXX_DiscardUnknown() { + xxx_messageInfo_LeaseCandidateSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_LeaseCandidateSpec proto.InternalMessageInfo + +func init() { + proto.RegisterType((*LeaseCandidate)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidate") + proto.RegisterType((*LeaseCandidateList)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidateList") + proto.RegisterType((*LeaseCandidateSpec)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidateSpec") +} + +func init() { + proto.RegisterFile("k8s.io/api/coordination/v1alpha2/generated.proto", fileDescriptor_c1ec5c989d262916) +} + +var fileDescriptor_c1ec5c989d262916 = []byte{ + // 555 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x8b, 0xd3, 0x4e, + 0x18, 0xc7, 0x9b, 0xdd, 0xf6, 0x47, 0x3b, 0xbf, 0xad, 0xd4, 0x01, 0x21, 0xf4, 0x90, 0x96, 0x9e, + 0x44, 0x70, 0x66, 0x77, 0x5d, 0x44, 0xf0, 0x96, 0xf5, 0x0f, 0x42, 0x57, 0x25, 0xab, 0x0b, 0xca, + 0x1e, 0x9c, 0x26, 0x8f, 0xe9, 0xd8, 0x26, 0x13, 0x92, 0xe9, 0x4a, 0x6f, 0xbe, 0x04, 0x5f, 0x56, + 0xf5, 0xb4, 0xc7, 0x3d, 0x15, 0x1b, 0xc1, 0x17, 0xe1, 0x49, 0x66, 0x9a, 0xf4, 0xaf, 0xa5, 0xc5, + 0x5b, 0xe7, 0x99, 0xe7, 0xf3, 0x99, 0xf9, 0x3e, 0x69, 0x82, 0x0e, 0x7b, 0x8f, 0x12, 0xc2, 0x05, + 0x65, 0x11, 0xa7, 0xae, 0x10, 0xb1, 0xc7, 0x43, 0x26, 0xb9, 0x08, 0xe9, 0xd5, 0x11, 0xeb, 0x47, + 0x5d, 0x76, 0x4c, 0x7d, 0x08, 0x21, 0x66, 0x12, 0x3c, 0x12, 0xc5, 0x42, 0x0a, 0xdc, 0x9c, 0x12, + 0x84, 0x45, 0x9c, 0x2c, 0x12, 0x24, 0x27, 0xea, 0xf7, 0x7d, 0x2e, 0xbb, 0x83, 0x0e, 0x71, 0x45, + 0x40, 0x7d, 0xe1, 0x0b, 0xaa, 0xc1, 0xce, 0xe0, 0xa3, 0x5e, 0xe9, 0x85, 0xfe, 0x35, 0x15, 0xd6, + 0xef, 0x6d, 0xbe, 0xc2, 0xea, 0xe1, 0xf5, 0x93, 0x79, 0x6f, 0xc0, 0xdc, 0x2e, 0x0f, 0x21, 0x1e, + 0xd2, 0xa8, 0xe7, 0xab, 0x42, 0x42, 0x03, 0x90, 0xec, 0x6f, 0x14, 0xdd, 0x44, 0xc5, 0x83, 0x50, + 0xf2, 0x00, 0xd6, 0x80, 0x87, 0xdb, 0x80, 0xc4, 0xed, 0x42, 0xc0, 0x56, 0xb9, 0xd6, 0x77, 0x03, + 0xdd, 0x6a, 0x03, 0x4b, 0xe0, 0x94, 0x85, 0x1e, 0xf7, 0x98, 0x04, 0xfc, 0x01, 0x95, 0xd5, 0xb5, + 0x3c, 0x26, 0x99, 0x69, 0x34, 0x8d, 0xbb, 0xff, 0x1f, 0x1f, 0x92, 0xf9, 0x04, 0x67, 0x76, 0x12, + 0xf5, 0x7c, 0x55, 0x48, 0x88, 0xea, 0x26, 0x57, 0x47, 0xe4, 0x55, 0xe7, 0x13, 0xb8, 0xf2, 0x0c, + 0x24, 0xb3, 0xf1, 0x68, 0xdc, 0x28, 0xa4, 0xe3, 0x06, 0x9a, 0xd7, 0x9c, 0x99, 0x15, 0x5f, 0xa0, + 0x62, 0x12, 0x81, 0x6b, 0xee, 0x69, 0xfb, 0x09, 0xd9, 0xf6, 0x7c, 0xc8, 0xf2, 0x0d, 0xcf, 0x23, + 0x70, 0xed, 0x83, 0xec, 0x84, 0xa2, 0x5a, 0x39, 0xda, 0xd7, 0xfa, 0x66, 0x20, 0xbc, 0xdc, 0xda, + 0xe6, 0x89, 0xc4, 0x97, 0x6b, 0x81, 0xc8, 0x6e, 0x81, 0x14, 0xad, 0xe3, 0xd4, 0xb2, 0xc3, 0xca, + 0x79, 0x65, 0x21, 0xcc, 0x5b, 0x54, 0xe2, 0x12, 0x82, 0xc4, 0xdc, 0x6b, 0xee, 0xaf, 0xcc, 0x6a, + 0xa7, 0x34, 0x76, 0x35, 0x93, 0x97, 0x5e, 0x28, 0x8d, 0x33, 0xb5, 0xb5, 0x7e, 0xed, 0xaf, 0x66, + 0x51, 0x41, 0x31, 0x45, 0x95, 0xbe, 0xaa, 0xbe, 0x64, 0x01, 0xe8, 0x30, 0x15, 0xfb, 0x76, 0xc6, + 0x57, 0xda, 0xf9, 0x86, 0x33, 0xef, 0xc1, 0xef, 0x50, 0x39, 0xe2, 0xa1, 0xff, 0x86, 0x07, 0x90, + 0xcd, 0x9b, 0xee, 0x16, 0xfe, 0x8c, 0xbb, 0xb1, 0x50, 0x98, 0x7d, 0xa0, 0x92, 0xbf, 0xce, 0x24, + 0xce, 0x4c, 0x87, 0x2f, 0x51, 0x25, 0x86, 0x10, 0x3e, 0x6b, 0xf7, 0xfe, 0xbf, 0xb9, 0xab, 0xea, + 0xe2, 0x4e, 0x6e, 0x71, 0xe6, 0x42, 0xfc, 0x18, 0x55, 0x3b, 0x3c, 0x64, 0xf1, 0xf0, 0x02, 0xe2, + 0x84, 0x8b, 0xd0, 0x2c, 0xea, 0xb4, 0x77, 0xb2, 0xb4, 0x55, 0x7b, 0x71, 0xd3, 0x59, 0xee, 0xc5, + 0x4f, 0x50, 0x0d, 0x82, 0x41, 0x5f, 0x0f, 0x3e, 0xe7, 0x4b, 0x9a, 0x37, 0x33, 0xbe, 0xf6, 0x74, + 0x65, 0xdf, 0x59, 0x23, 0xb0, 0x8b, 0xca, 0x89, 0x54, 0x6f, 0x8b, 0x3f, 0x34, 0xff, 0xd3, 0xf4, + 0xf3, 0xfc, 0x8f, 0x70, 0x9e, 0xd5, 0x7f, 0x8f, 0x1b, 0x0f, 0x36, 0x7f, 0x0d, 0xc8, 0x69, 0xbe, + 0x06, 0x4f, 0x3f, 0x9d, 0x1c, 0x73, 0x66, 0x62, 0xfb, 0xd9, 0x68, 0x62, 0x15, 0xae, 0x27, 0x56, + 0xe1, 0x66, 0x62, 0x15, 0xbe, 0xa4, 0x96, 0x31, 0x4a, 0x2d, 0xe3, 0x3a, 0xb5, 0x8c, 0x9b, 0xd4, + 0x32, 0x7e, 0xa4, 0x96, 0xf1, 0xf5, 0xa7, 0x55, 0x78, 0xdf, 0xdc, 0xf6, 0xd5, 0xfb, 0x13, 0x00, + 0x00, 0xff, 0xff, 0x7f, 0x15, 0x63, 0xd0, 0x18, 0x05, 0x00, 0x00, +} + +func (m *LeaseCandidate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LeaseCandidate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LeaseCandidate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *LeaseCandidateList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LeaseCandidateList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LeaseCandidateList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *LeaseCandidateSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LeaseCandidateSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LeaseCandidateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Strategy) + copy(dAtA[i:], m.Strategy) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Strategy))) + i-- + dAtA[i] = 0x32 + i -= len(m.EmulationVersion) + copy(dAtA[i:], m.EmulationVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.EmulationVersion))) + i-- + dAtA[i] = 0x2a + i -= len(m.BinaryVersion) + copy(dAtA[i:], m.BinaryVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.BinaryVersion))) + i-- + dAtA[i] = 0x22 + if m.RenewTime != nil { + { + size, err := m.RenewTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.PingTime != nil { + { + size, err := m.PingTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.LeaseName) + copy(dAtA[i:], m.LeaseName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.LeaseName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *LeaseCandidate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *LeaseCandidateList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *LeaseCandidateSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.LeaseName) + n += 1 + l + sovGenerated(uint64(l)) + if m.PingTime != nil { + l = m.PingTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.RenewTime != nil { + l = m.RenewTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.BinaryVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.EmulationVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Strategy) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *LeaseCandidate) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LeaseCandidate{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LeaseCandidateSpec", "LeaseCandidateSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *LeaseCandidateList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]LeaseCandidate{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "LeaseCandidate", "LeaseCandidate", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&LeaseCandidateList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *LeaseCandidateSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LeaseCandidateSpec{`, + `LeaseName:` + fmt.Sprintf("%v", this.LeaseName) + `,`, + `PingTime:` + strings.Replace(fmt.Sprintf("%v", this.PingTime), "MicroTime", "v1.MicroTime", 1) + `,`, + `RenewTime:` + strings.Replace(fmt.Sprintf("%v", this.RenewTime), "MicroTime", "v1.MicroTime", 1) + `,`, + `BinaryVersion:` + fmt.Sprintf("%v", this.BinaryVersion) + `,`, + `EmulationVersion:` + fmt.Sprintf("%v", this.EmulationVersion) + `,`, + `Strategy:` + fmt.Sprintf("%v", this.Strategy) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *LeaseCandidate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LeaseCandidate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseCandidate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaseCandidateList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LeaseCandidateList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseCandidateList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, LeaseCandidate{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaseCandidateSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LeaseCandidateSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseCandidateSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeaseName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LeaseName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PingTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PingTime == nil { + m.PingTime = &v1.MicroTime{} + } + if err := m.PingTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RenewTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RenewTime == nil { + m.RenewTime = &v1.MicroTime{} + } + if err := m.RenewTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BinaryVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EmulationVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EmulationVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Strategy = k8s_io_api_coordination_v1.CoordinatedLeaseStrategy(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") +) diff --git a/staging/src/k8s.io/api/coordination/v1alpha2/generated.proto b/staging/src/k8s.io/api/coordination/v1alpha2/generated.proto new file mode 100644 index 00000000000..7e56cd7f966 --- /dev/null +++ b/staging/src/k8s.io/api/coordination/v1alpha2/generated.proto @@ -0,0 +1,100 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = "proto2"; + +package k8s.io.api.coordination.v1alpha2; + +import "k8s.io/api/coordination/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "k8s.io/api/coordination/v1alpha2"; + +// LeaseCandidate defines a candidate for a Lease object. +// Candidates are created such that coordinated leader election will pick the best leader from the list of candidates. +message LeaseCandidate { + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // spec contains the specification of the Lease. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + optional LeaseCandidateSpec spec = 2; +} + +// LeaseCandidateList is a list of Lease objects. +message LeaseCandidateList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // items is a list of schema objects. + repeated LeaseCandidate items = 2; +} + +// LeaseCandidateSpec is a specification of a Lease. +message LeaseCandidateSpec { + // LeaseName is the name of the lease for which this candidate is contending. + // This field is immutable. + // +required + optional string leaseName = 1; + + // PingTime is the last time that the server has requested the LeaseCandidate + // to renew. It is only done during leader election to check if any + // LeaseCandidates have become ineligible. When PingTime is updated, the + // LeaseCandidate will respond by updating RenewTime. + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime pingTime = 2; + + // RenewTime is the time that the LeaseCandidate was last updated. + // Any time a Lease needs to do leader election, the PingTime field + // is updated to signal to the LeaseCandidate that they should update + // the RenewTime. + // Old LeaseCandidate objects are also garbage collected if it has been hours + // since the last renew. The PingTime field is updated regularly to prevent + // garbage collection for still active LeaseCandidates. + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime renewTime = 3; + + // BinaryVersion is the binary version. It must be in a semver format without leading `v`. + // This field is required. + // +required + optional string binaryVersion = 4; + + // EmulationVersion is the emulation version. It must be in a semver format without leading `v`. + // EmulationVersion must be less than or equal to BinaryVersion. + // This field is required when strategy is "OldestEmulationVersion" + // +optional + optional string emulationVersion = 5; + + // Strategy is the strategy that coordinated leader election will use for picking the leader. + // If multiple candidates for the same Lease return different strategies, the strategy provided + // by the candidate with the latest BinaryVersion will be used. If there is still conflict, + // this is a user error and coordinated leader election will not operate the Lease until resolved. + // (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled. + // +featureGate=CoordinatedLeaderElection + // +required + optional string strategy = 6; +} + diff --git a/staging/src/k8s.io/api/coordination/v1alpha2/types_swagger_doc_generated.go b/staging/src/k8s.io/api/coordination/v1alpha2/types_swagger_doc_generated.go new file mode 100644 index 00000000000..39534e6adb0 --- /dev/null +++ b/staging/src/k8s.io/api/coordination/v1alpha2/types_swagger_doc_generated.go @@ -0,0 +1,64 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha2 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-codegen.sh + +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_LeaseCandidate = map[string]string{ + "": "LeaseCandidate defines a candidate for a Lease object. Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.", + "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", +} + +func (LeaseCandidate) SwaggerDoc() map[string]string { + return map_LeaseCandidate +} + +var map_LeaseCandidateList = map[string]string{ + "": "LeaseCandidateList is a list of Lease objects.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "items is a list of schema objects.", +} + +func (LeaseCandidateList) SwaggerDoc() map[string]string { + return map_LeaseCandidateList +} + +var map_LeaseCandidateSpec = map[string]string{ + "": "LeaseCandidateSpec is a specification of a Lease.", + "leaseName": "LeaseName is the name of the lease for which this candidate is contending. This field is immutable.", + "pingTime": "PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.", + "renewTime": "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.", + "binaryVersion": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.", + "emulationVersion": "EmulationVersion is the emulation version. It must be in a semver format without leading `v`. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is \"OldestEmulationVersion\"", + "strategy": "Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", +} + +func (LeaseCandidateSpec) SwaggerDoc() map[string]string { + return map_LeaseCandidateSpec +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.deepcopy.go b/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.deepcopy.go new file mode 100644 index 00000000000..a2028479731 --- /dev/null +++ b/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.deepcopy.go @@ -0,0 +1,110 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LeaseCandidate) DeepCopyInto(out *LeaseCandidate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseCandidate. +func (in *LeaseCandidate) DeepCopy() *LeaseCandidate { + if in == nil { + return nil + } + out := new(LeaseCandidate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LeaseCandidate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LeaseCandidateList) DeepCopyInto(out *LeaseCandidateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]LeaseCandidate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseCandidateList. +func (in *LeaseCandidateList) DeepCopy() *LeaseCandidateList { + if in == nil { + return nil + } + out := new(LeaseCandidateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LeaseCandidateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LeaseCandidateSpec) DeepCopyInto(out *LeaseCandidateSpec) { + *out = *in + if in.PingTime != nil { + in, out := &in.PingTime, &out.PingTime + *out = (*in).DeepCopy() + } + if in.RenewTime != nil { + in, out := &in.RenewTime, &out.RenewTime + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseCandidateSpec. +func (in *LeaseCandidateSpec) DeepCopy() *LeaseCandidateSpec { + if in == nil { + return nil + } + out := new(LeaseCandidateSpec) + in.DeepCopyInto(out) + return out +} diff --git a/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.prerelease-lifecycle.go b/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..a99b9ab5bfd --- /dev/null +++ b/staging/src/k8s.io/api/coordination/v1alpha2/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,58 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1alpha2 + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *LeaseCandidate) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *LeaseCandidate) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *LeaseCandidate) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *LeaseCandidateList) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *LeaseCandidateList) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *LeaseCandidateList) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} diff --git a/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha1.LeaseCandidate.json b/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha1.LeaseCandidate.json deleted file mode 100644 index 17eb6a69816..00000000000 --- a/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha1.LeaseCandidate.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "kind": "LeaseCandidate", - "apiVersion": "coordination.k8s.io/v1alpha1", - "metadata": { - "name": "nameValue", - "generateName": "generateNameValue", - "namespace": "namespaceValue", - "selfLink": "selfLinkValue", - "uid": "uidValue", - "resourceVersion": "resourceVersionValue", - "generation": 7, - "creationTimestamp": "2008-01-01T01:01:01Z", - "deletionTimestamp": "2009-01-01T01:01:01Z", - "deletionGracePeriodSeconds": 10, - "labels": { - "labelsKey": "labelsValue" - }, - "annotations": { - "annotationsKey": "annotationsValue" - }, - "ownerReferences": [ - { - "apiVersion": "apiVersionValue", - "kind": "kindValue", - "name": "nameValue", - "uid": "uidValue", - "controller": true, - "blockOwnerDeletion": true - } - ], - "finalizers": [ - "finalizersValue" - ], - "managedFields": [ - { - "manager": "managerValue", - "operation": "operationValue", - "apiVersion": "apiVersionValue", - "time": "2004-01-01T01:01:01Z", - "fieldsType": "fieldsTypeValue", - "fieldsV1": {}, - "subresource": "subresourceValue" - } - ] - }, - "spec": { - "leaseName": "leaseNameValue", - "pingTime": "2002-01-01T01:01:01.000002Z", - "renewTime": "2003-01-01T01:01:01.000003Z", - "binaryVersion": "binaryVersionValue", - "emulationVersion": "emulationVersionValue", - "preferredStrategies": [ - "preferredStrategiesValue" - ] - } -} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha1.LeaseCandidate.pb b/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha1.LeaseCandidate.pb deleted file mode 100644 index 1d7cac6e2d4..00000000000 Binary files a/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha1.LeaseCandidate.pb and /dev/null differ diff --git a/staging/src/k8s.io/api/testdata/v1.31.0/coordination.k8s.io.v1alpha1.LeaseCandidate.json b/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha2.LeaseCandidate.json similarity index 92% rename from staging/src/k8s.io/api/testdata/v1.31.0/coordination.k8s.io.v1alpha1.LeaseCandidate.json rename to staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha2.LeaseCandidate.json index 17eb6a69816..22ac6bfb915 100644 --- a/staging/src/k8s.io/api/testdata/v1.31.0/coordination.k8s.io.v1alpha1.LeaseCandidate.json +++ b/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha2.LeaseCandidate.json @@ -1,6 +1,6 @@ { "kind": "LeaseCandidate", - "apiVersion": "coordination.k8s.io/v1alpha1", + "apiVersion": "coordination.k8s.io/v1alpha2", "metadata": { "name": "nameValue", "generateName": "generateNameValue", @@ -49,8 +49,6 @@ "renewTime": "2003-01-01T01:01:01.000003Z", "binaryVersion": "binaryVersionValue", "emulationVersion": "emulationVersionValue", - "preferredStrategies": [ - "preferredStrategiesValue" - ] + "strategy": "strategyValue" } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.31.0/coordination.k8s.io.v1alpha1.LeaseCandidate.pb b/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha2.LeaseCandidate.pb similarity index 77% rename from staging/src/k8s.io/api/testdata/v1.31.0/coordination.k8s.io.v1alpha1.LeaseCandidate.pb rename to staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha2.LeaseCandidate.pb index 1d7cac6e2d4..f092766664d 100644 Binary files a/staging/src/k8s.io/api/testdata/v1.31.0/coordination.k8s.io.v1alpha1.LeaseCandidate.pb and b/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha2.LeaseCandidate.pb differ diff --git a/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha1.LeaseCandidate.yaml b/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha2.LeaseCandidate.yaml similarity index 91% rename from staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha1.LeaseCandidate.yaml rename to staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha2.LeaseCandidate.yaml index 29e173a4a44..214791807d6 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha1.LeaseCandidate.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/coordination.k8s.io.v1alpha2.LeaseCandidate.yaml @@ -1,4 +1,4 @@ -apiVersion: coordination.k8s.io/v1alpha1 +apiVersion: coordination.k8s.io/v1alpha2 kind: LeaseCandidate metadata: annotations: @@ -37,6 +37,5 @@ spec: emulationVersion: emulationVersionValue leaseName: leaseNameValue pingTime: "2002-01-01T01:01:01.000002Z" - preferredStrategies: - - preferredStrategiesValue renewTime: "2003-01-01T01:01:01.000003Z" + strategy: strategyValue diff --git a/staging/src/k8s.io/api/testdata/v1.31.0/coordination.k8s.io.v1alpha1.LeaseCandidate.yaml b/staging/src/k8s.io/api/testdata/v1.31.0/coordination.k8s.io.v1alpha1.LeaseCandidate.yaml deleted file mode 100644 index 29e173a4a44..00000000000 --- a/staging/src/k8s.io/api/testdata/v1.31.0/coordination.k8s.io.v1alpha1.LeaseCandidate.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: coordination.k8s.io/v1alpha1 -kind: LeaseCandidate -metadata: - annotations: - annotationsKey: annotationsValue - creationTimestamp: "2008-01-01T01:01:01Z" - deletionGracePeriodSeconds: 10 - deletionTimestamp: "2009-01-01T01:01:01Z" - finalizers: - - finalizersValue - generateName: generateNameValue - generation: 7 - labels: - labelsKey: labelsValue - managedFields: - - apiVersion: apiVersionValue - fieldsType: fieldsTypeValue - fieldsV1: {} - manager: managerValue - operation: operationValue - subresource: subresourceValue - time: "2004-01-01T01:01:01Z" - name: nameValue - namespace: namespaceValue - ownerReferences: - - apiVersion: apiVersionValue - blockOwnerDeletion: true - controller: true - kind: kindValue - name: nameValue - uid: uidValue - resourceVersion: resourceVersionValue - selfLink: selfLinkValue - uid: uidValue -spec: - binaryVersion: binaryVersionValue - emulationVersion: emulationVersionValue - leaseName: leaseNameValue - pingTime: "2002-01-01T01:01:01.000002Z" - preferredStrategies: - - preferredStrategiesValue - renewTime: "2003-01-01T01:01:01.000003Z" diff --git a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha1/leasecandidate.go b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidate.go similarity index 96% rename from staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha1/leasecandidate.go rename to staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidate.go index d9693f3fe39..b2cc2338eac 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha1/leasecandidate.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidate.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha1 +package v1alpha2 import ( - coordinationv1alpha1 "k8s.io/api/coordination/v1alpha1" + coordinationv1alpha2 "k8s.io/api/coordination/v1alpha2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" @@ -42,7 +42,7 @@ func LeaseCandidate(name, namespace string) *LeaseCandidateApplyConfiguration { b.WithName(name) b.WithNamespace(namespace) b.WithKind("LeaseCandidate") - b.WithAPIVersion("coordination.k8s.io/v1alpha1") + b.WithAPIVersion("coordination.k8s.io/v1alpha2") return b } @@ -57,20 +57,20 @@ func LeaseCandidate(name, namespace string) *LeaseCandidateApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractLeaseCandidate(leaseCandidate *coordinationv1alpha1.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) { +func ExtractLeaseCandidate(leaseCandidate *coordinationv1alpha2.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) { return extractLeaseCandidate(leaseCandidate, fieldManager, "") } // ExtractLeaseCandidateStatus is the same as ExtractLeaseCandidate except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractLeaseCandidateStatus(leaseCandidate *coordinationv1alpha1.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) { +func ExtractLeaseCandidateStatus(leaseCandidate *coordinationv1alpha2.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) { return extractLeaseCandidate(leaseCandidate, fieldManager, "status") } -func extractLeaseCandidate(leaseCandidate *coordinationv1alpha1.LeaseCandidate, fieldManager string, subresource string) (*LeaseCandidateApplyConfiguration, error) { +func extractLeaseCandidate(leaseCandidate *coordinationv1alpha2.LeaseCandidate, fieldManager string, subresource string) (*LeaseCandidateApplyConfiguration, error) { b := &LeaseCandidateApplyConfiguration{} - err := managedfields.ExtractInto(leaseCandidate, internal.Parser().Type("io.k8s.api.coordination.v1alpha1.LeaseCandidate"), fieldManager, b, subresource) + err := managedfields.ExtractInto(leaseCandidate, internal.Parser().Type("io.k8s.api.coordination.v1alpha2.LeaseCandidate"), fieldManager, b, subresource) if err != nil { return nil, err } @@ -78,7 +78,7 @@ func extractLeaseCandidate(leaseCandidate *coordinationv1alpha1.LeaseCandidate, b.WithNamespace(leaseCandidate.Namespace) b.WithKind("LeaseCandidate") - b.WithAPIVersion("coordination.k8s.io/v1alpha1") + b.WithAPIVersion("coordination.k8s.io/v1alpha2") return b, nil } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha1/leasecandidatespec.go b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidatespec.go similarity index 75% rename from staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha1/leasecandidatespec.go rename to staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidatespec.go index 61d3dca10bc..f52aaab24be 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha1/leasecandidatespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/coordination/v1alpha2/leasecandidatespec.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha1 +package v1alpha2 import ( coordinationv1 "k8s.io/api/coordination/v1" @@ -26,12 +26,12 @@ import ( // LeaseCandidateSpecApplyConfiguration represents a declarative configuration of the LeaseCandidateSpec type for use // with apply. type LeaseCandidateSpecApplyConfiguration struct { - LeaseName *string `json:"leaseName,omitempty"` - PingTime *v1.MicroTime `json:"pingTime,omitempty"` - RenewTime *v1.MicroTime `json:"renewTime,omitempty"` - BinaryVersion *string `json:"binaryVersion,omitempty"` - EmulationVersion *string `json:"emulationVersion,omitempty"` - PreferredStrategies []coordinationv1.CoordinatedLeaseStrategy `json:"preferredStrategies,omitempty"` + LeaseName *string `json:"leaseName,omitempty"` + PingTime *v1.MicroTime `json:"pingTime,omitempty"` + RenewTime *v1.MicroTime `json:"renewTime,omitempty"` + BinaryVersion *string `json:"binaryVersion,omitempty"` + EmulationVersion *string `json:"emulationVersion,omitempty"` + Strategy *coordinationv1.CoordinatedLeaseStrategy `json:"strategy,omitempty"` } // LeaseCandidateSpecApplyConfiguration constructs a declarative configuration of the LeaseCandidateSpec type for use with @@ -80,12 +80,10 @@ func (b *LeaseCandidateSpecApplyConfiguration) WithEmulationVersion(value string return b } -// WithPreferredStrategies adds the given value to the PreferredStrategies field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the PreferredStrategies field. -func (b *LeaseCandidateSpecApplyConfiguration) WithPreferredStrategies(values ...coordinationv1.CoordinatedLeaseStrategy) *LeaseCandidateSpecApplyConfiguration { - for i := range values { - b.PreferredStrategies = append(b.PreferredStrategies, values[i]) - } +// WithStrategy sets the Strategy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Strategy field is set to the value of the last call. +func (b *LeaseCandidateSpecApplyConfiguration) WithStrategy(value coordinationv1.CoordinatedLeaseStrategy) *LeaseCandidateSpecApplyConfiguration { + b.Strategy = &value return b } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go index 5ad6b2a0155..6a3f688ca62 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -4471,7 +4471,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: strategy type: scalar: string -- name: io.k8s.api.coordination.v1alpha1.LeaseCandidate +- name: io.k8s.api.coordination.v1alpha2.LeaseCandidate map: fields: - name: apiVersion @@ -4486,14 +4486,15 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.coordination.v1alpha1.LeaseCandidateSpec + namedType: io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec default: {} -- name: io.k8s.api.coordination.v1alpha1.LeaseCandidateSpec +- name: io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec map: fields: - name: binaryVersion type: scalar: string + default: "" - name: emulationVersion type: scalar: string @@ -4504,15 +4505,12 @@ var schemaYAML = typed.YAMLObject(`types: - name: pingTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: preferredStrategies - type: - list: - elementType: - scalar: string - elementRelationship: atomic - name: renewTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime + - name: strategy + type: + scalar: string - name: io.k8s.api.coordination.v1beta1.Lease map: fields: diff --git a/staging/src/k8s.io/client-go/applyconfigurations/utils.go b/staging/src/k8s.io/client-go/applyconfigurations/utils.go index adece7a1345..afbabac9436 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/utils.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/utils.go @@ -36,7 +36,7 @@ import ( certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" coordinationv1 "k8s.io/api/coordination/v1" - coordinationv1alpha1 "k8s.io/api/coordination/v1alpha1" + v1alpha2 "k8s.io/api/coordination/v1alpha2" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" discoveryv1 "k8s.io/api/discovery/v1" @@ -89,7 +89,7 @@ import ( applyconfigurationscertificatesv1alpha1 "k8s.io/client-go/applyconfigurations/certificates/v1alpha1" applyconfigurationscertificatesv1beta1 "k8s.io/client-go/applyconfigurations/certificates/v1beta1" applyconfigurationscoordinationv1 "k8s.io/client-go/applyconfigurations/coordination/v1" - applyconfigurationscoordinationv1alpha1 "k8s.io/client-go/applyconfigurations/coordination/v1alpha1" + coordinationv1alpha2 "k8s.io/client-go/applyconfigurations/coordination/v1alpha2" applyconfigurationscoordinationv1beta1 "k8s.io/client-go/applyconfigurations/coordination/v1beta1" applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" applyconfigurationsdiscoveryv1 "k8s.io/client-go/applyconfigurations/discovery/v1" @@ -631,11 +631,11 @@ func ForKind(kind schema.GroupVersionKind) interface{} { case coordinationv1.SchemeGroupVersion.WithKind("LeaseSpec"): return &applyconfigurationscoordinationv1.LeaseSpecApplyConfiguration{} - // Group=coordination.k8s.io, Version=v1alpha1 - case coordinationv1alpha1.SchemeGroupVersion.WithKind("LeaseCandidate"): - return &applyconfigurationscoordinationv1alpha1.LeaseCandidateApplyConfiguration{} - case coordinationv1alpha1.SchemeGroupVersion.WithKind("LeaseCandidateSpec"): - return &applyconfigurationscoordinationv1alpha1.LeaseCandidateSpecApplyConfiguration{} + // Group=coordination.k8s.io, Version=v1alpha2 + case v1alpha2.SchemeGroupVersion.WithKind("LeaseCandidate"): + return &coordinationv1alpha2.LeaseCandidateApplyConfiguration{} + case v1alpha2.SchemeGroupVersion.WithKind("LeaseCandidateSpec"): + return &coordinationv1alpha2.LeaseCandidateSpecApplyConfiguration{} // Group=coordination.k8s.io, Version=v1beta1 case coordinationv1beta1.SchemeGroupVersion.WithKind("Lease"): diff --git a/staging/src/k8s.io/client-go/informers/coordination/interface.go b/staging/src/k8s.io/client-go/informers/coordination/interface.go index 026b4d94767..d5bde12ac4a 100644 --- a/staging/src/k8s.io/client-go/informers/coordination/interface.go +++ b/staging/src/k8s.io/client-go/informers/coordination/interface.go @@ -20,7 +20,7 @@ package coordination import ( v1 "k8s.io/client-go/informers/coordination/v1" - v1alpha1 "k8s.io/client-go/informers/coordination/v1alpha1" + v1alpha2 "k8s.io/client-go/informers/coordination/v1alpha2" v1beta1 "k8s.io/client-go/informers/coordination/v1beta1" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) @@ -29,8 +29,8 @@ import ( type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface + // V1alpha2 provides access to shared informers for resources in V1alpha2. + V1alpha2() v1alpha2.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface } @@ -51,9 +51,9 @@ func (g *group) V1() v1.Interface { return v1.New(g.factory, g.namespace, g.tweakListOptions) } -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +// V1alpha2 returns a new v1alpha2.Interface. +func (g *group) V1alpha2() v1alpha2.Interface { + return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions) } // V1beta1 returns a new v1beta1.Interface. diff --git a/staging/src/k8s.io/client-go/informers/coordination/v1alpha1/interface.go b/staging/src/k8s.io/client-go/informers/coordination/v1alpha2/interface.go similarity index 98% rename from staging/src/k8s.io/client-go/informers/coordination/v1alpha1/interface.go rename to staging/src/k8s.io/client-go/informers/coordination/v1alpha2/interface.go index 4058af28067..ba83768adec 100644 --- a/staging/src/k8s.io/client-go/informers/coordination/v1alpha1/interface.go +++ b/staging/src/k8s.io/client-go/informers/coordination/v1alpha2/interface.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1alpha2 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" diff --git a/staging/src/k8s.io/client-go/informers/coordination/v1alpha1/leasecandidate.go b/staging/src/k8s.io/client-go/informers/coordination/v1alpha2/leasecandidate.go similarity index 85% rename from staging/src/k8s.io/client-go/informers/coordination/v1alpha1/leasecandidate.go rename to staging/src/k8s.io/client-go/informers/coordination/v1alpha2/leasecandidate.go index 3bba83d5413..f38adf6524d 100644 --- a/staging/src/k8s.io/client-go/informers/coordination/v1alpha1/leasecandidate.go +++ b/staging/src/k8s.io/client-go/informers/coordination/v1alpha2/leasecandidate.go @@ -16,19 +16,19 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1alpha2 import ( context "context" time "time" - apicoordinationv1alpha1 "k8s.io/api/coordination/v1alpha1" + apicoordinationv1alpha2 "k8s.io/api/coordination/v1alpha2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" - coordinationv1alpha1 "k8s.io/client-go/listers/coordination/v1alpha1" + coordinationv1alpha2 "k8s.io/client-go/listers/coordination/v1alpha2" cache "k8s.io/client-go/tools/cache" ) @@ -36,7 +36,7 @@ import ( // LeaseCandidates. type LeaseCandidateInformer interface { Informer() cache.SharedIndexInformer - Lister() coordinationv1alpha1.LeaseCandidateLister + Lister() coordinationv1alpha2.LeaseCandidateLister } type leaseCandidateInformer struct { @@ -62,16 +62,16 @@ func NewFilteredLeaseCandidateInformer(client kubernetes.Interface, namespace st if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoordinationV1alpha1().LeaseCandidates(namespace).List(context.TODO(), options) + return client.CoordinationV1alpha2().LeaseCandidates(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoordinationV1alpha1().LeaseCandidates(namespace).Watch(context.TODO(), options) + return client.CoordinationV1alpha2().LeaseCandidates(namespace).Watch(context.TODO(), options) }, }, - &apicoordinationv1alpha1.LeaseCandidate{}, + &apicoordinationv1alpha2.LeaseCandidate{}, resyncPeriod, indexers, ) @@ -82,9 +82,9 @@ func (f *leaseCandidateInformer) defaultInformer(client kubernetes.Interface, re } func (f *leaseCandidateInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apicoordinationv1alpha1.LeaseCandidate{}, f.defaultInformer) + return f.factory.InformerFor(&apicoordinationv1alpha2.LeaseCandidate{}, f.defaultInformer) } -func (f *leaseCandidateInformer) Lister() coordinationv1alpha1.LeaseCandidateLister { - return coordinationv1alpha1.NewLeaseCandidateLister(f.Informer().GetIndexer()) +func (f *leaseCandidateInformer) Lister() coordinationv1alpha2.LeaseCandidateLister { + return coordinationv1alpha2.NewLeaseCandidateLister(f.Informer().GetIndexer()) } diff --git a/staging/src/k8s.io/client-go/informers/generic.go b/staging/src/k8s.io/client-go/informers/generic.go index 4324035d197..fd331686d5c 100644 --- a/staging/src/k8s.io/client-go/informers/generic.go +++ b/staging/src/k8s.io/client-go/informers/generic.go @@ -38,7 +38,7 @@ import ( certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" coordinationv1 "k8s.io/api/coordination/v1" - coordinationv1alpha1 "k8s.io/api/coordination/v1alpha1" + v1alpha2 "k8s.io/api/coordination/v1alpha2" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" discoveryv1 "k8s.io/api/discovery/v1" @@ -204,9 +204,9 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case coordinationv1.SchemeGroupVersion.WithResource("leases"): return &genericInformer{resource: resource.GroupResource(), informer: f.Coordination().V1().Leases().Informer()}, nil - // Group=coordination.k8s.io, Version=v1alpha1 - case coordinationv1alpha1.SchemeGroupVersion.WithResource("leasecandidates"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Coordination().V1alpha1().LeaseCandidates().Informer()}, nil + // Group=coordination.k8s.io, Version=v1alpha2 + case v1alpha2.SchemeGroupVersion.WithResource("leasecandidates"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Coordination().V1alpha2().LeaseCandidates().Informer()}, nil // Group=coordination.k8s.io, Version=v1beta1 case coordinationv1beta1.SchemeGroupVersion.WithResource("leases"): diff --git a/staging/src/k8s.io/client-go/kubernetes/clientset.go b/staging/src/k8s.io/client-go/kubernetes/clientset.go index d4a6dfc2f25..a6dbc23a9c9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/clientset.go +++ b/staging/src/k8s.io/client-go/kubernetes/clientset.go @@ -45,7 +45,7 @@ import ( certificatesv1alpha1 "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1" certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" - coordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" + coordinationv1alpha2 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha2" coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" discoveryv1 "k8s.io/client-go/kubernetes/typed/discovery/v1" @@ -104,7 +104,7 @@ type Interface interface { CertificatesV1() certificatesv1.CertificatesV1Interface CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface - CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface + CoordinationV1alpha2() coordinationv1alpha2.CoordinationV1alpha2Interface CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface CoordinationV1() coordinationv1.CoordinationV1Interface CoreV1() corev1.CoreV1Interface @@ -163,7 +163,7 @@ type Clientset struct { certificatesV1 *certificatesv1.CertificatesV1Client certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client certificatesV1alpha1 *certificatesv1alpha1.CertificatesV1alpha1Client - coordinationV1alpha1 *coordinationv1alpha1.CoordinationV1alpha1Client + coordinationV1alpha2 *coordinationv1alpha2.CoordinationV1alpha2Client coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client coordinationV1 *coordinationv1.CoordinationV1Client coreV1 *corev1.CoreV1Client @@ -303,9 +303,9 @@ func (c *Clientset) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1al return c.certificatesV1alpha1 } -// CoordinationV1alpha1 retrieves the CoordinationV1alpha1Client -func (c *Clientset) CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface { - return c.coordinationV1alpha1 +// CoordinationV1alpha2 retrieves the CoordinationV1alpha2Client +func (c *Clientset) CoordinationV1alpha2() coordinationv1alpha2.CoordinationV1alpha2Interface { + return c.coordinationV1alpha2 } // CoordinationV1beta1 retrieves the CoordinationV1beta1Client @@ -596,7 +596,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - cs.coordinationV1alpha1, err = coordinationv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.coordinationV1alpha2, err = coordinationv1alpha2.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -770,7 +770,7 @@ func New(c rest.Interface) *Clientset { cs.certificatesV1 = certificatesv1.New(c) cs.certificatesV1beta1 = certificatesv1beta1.New(c) cs.certificatesV1alpha1 = certificatesv1alpha1.New(c) - cs.coordinationV1alpha1 = coordinationv1alpha1.New(c) + cs.coordinationV1alpha2 = coordinationv1alpha2.New(c) cs.coordinationV1beta1 = coordinationv1beta1.New(c) cs.coordinationV1 = coordinationv1.New(c) cs.coreV1 = corev1.New(c) diff --git a/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go b/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go index 04459f23fe7..6b583818b64 100644 --- a/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go +++ b/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go @@ -69,8 +69,8 @@ import ( fakecertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake" coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" fakecoordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1/fake" - coordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" - fakecoordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/fake" + coordinationv1alpha2 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha2" + fakecoordinationv1alpha2 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake" coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" fakecoordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -327,9 +327,9 @@ func (c *Clientset) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1al return &fakecertificatesv1alpha1.FakeCertificatesV1alpha1{Fake: &c.Fake} } -// CoordinationV1alpha1 retrieves the CoordinationV1alpha1Client -func (c *Clientset) CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface { - return &fakecoordinationv1alpha1.FakeCoordinationV1alpha1{Fake: &c.Fake} +// CoordinationV1alpha2 retrieves the CoordinationV1alpha2Client +func (c *Clientset) CoordinationV1alpha2() coordinationv1alpha2.CoordinationV1alpha2Interface { + return &fakecoordinationv1alpha2.FakeCoordinationV1alpha2{Fake: &c.Fake} } // CoordinationV1beta1 retrieves the CoordinationV1beta1Client diff --git a/staging/src/k8s.io/client-go/kubernetes/fake/register.go b/staging/src/k8s.io/client-go/kubernetes/fake/register.go index 2d0ca5c09d5..849b1ac9003 100644 --- a/staging/src/k8s.io/client-go/kubernetes/fake/register.go +++ b/staging/src/k8s.io/client-go/kubernetes/fake/register.go @@ -41,7 +41,7 @@ import ( certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" coordinationv1 "k8s.io/api/coordination/v1" - coordinationv1alpha1 "k8s.io/api/coordination/v1alpha1" + coordinationv1alpha2 "k8s.io/api/coordination/v1alpha2" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" discoveryv1 "k8s.io/api/discovery/v1" @@ -105,7 +105,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ certificatesv1.AddToScheme, certificatesv1beta1.AddToScheme, certificatesv1alpha1.AddToScheme, - coordinationv1alpha1.AddToScheme, + coordinationv1alpha2.AddToScheme, coordinationv1beta1.AddToScheme, coordinationv1.AddToScheme, corev1.AddToScheme, diff --git a/staging/src/k8s.io/client-go/kubernetes/scheme/register.go b/staging/src/k8s.io/client-go/kubernetes/scheme/register.go index f48c2032506..a9a5d8eb7d0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/scheme/register.go +++ b/staging/src/k8s.io/client-go/kubernetes/scheme/register.go @@ -41,7 +41,7 @@ import ( certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" coordinationv1 "k8s.io/api/coordination/v1" - coordinationv1alpha1 "k8s.io/api/coordination/v1alpha1" + coordinationv1alpha2 "k8s.io/api/coordination/v1alpha2" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" discoveryv1 "k8s.io/api/discovery/v1" @@ -105,7 +105,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ certificatesv1.AddToScheme, certificatesv1beta1.AddToScheme, certificatesv1alpha1.AddToScheme, - coordinationv1alpha1.AddToScheme, + coordinationv1alpha2.AddToScheme, coordinationv1beta1.AddToScheme, coordinationv1.AddToScheme, corev1.AddToScheme, diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/coordination_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/coordination_client.go similarity index 70% rename from staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/coordination_client.go rename to staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/coordination_client.go index 6be36e296ec..4c286d46320 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/coordination_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/coordination_client.go @@ -16,34 +16,34 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1alpha2 import ( http "net/http" - coordinationv1alpha1 "k8s.io/api/coordination/v1alpha1" + coordinationv1alpha2 "k8s.io/api/coordination/v1alpha2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) -type CoordinationV1alpha1Interface interface { +type CoordinationV1alpha2Interface interface { RESTClient() rest.Interface LeaseCandidatesGetter } -// CoordinationV1alpha1Client is used to interact with features provided by the coordination.k8s.io group. -type CoordinationV1alpha1Client struct { +// CoordinationV1alpha2Client is used to interact with features provided by the coordination.k8s.io group. +type CoordinationV1alpha2Client struct { restClient rest.Interface } -func (c *CoordinationV1alpha1Client) LeaseCandidates(namespace string) LeaseCandidateInterface { +func (c *CoordinationV1alpha2Client) LeaseCandidates(namespace string) LeaseCandidateInterface { return newLeaseCandidates(c, namespace) } -// NewForConfig creates a new CoordinationV1alpha1Client for the given config. +// NewForConfig creates a new CoordinationV1alpha2Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*CoordinationV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*CoordinationV1alpha2Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -55,9 +55,9 @@ func NewForConfig(c *rest.Config) (*CoordinationV1alpha1Client, error) { return NewForConfigAndClient(&config, httpClient) } -// NewForConfigAndClient creates a new CoordinationV1alpha1Client for the given config and http client. +// NewForConfigAndClient creates a new CoordinationV1alpha2Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CoordinationV1alpha1Client, error) { +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CoordinationV1alpha2Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -66,12 +66,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CoordinationV1alpha if err != nil { return nil, err } - return &CoordinationV1alpha1Client{client}, nil + return &CoordinationV1alpha2Client{client}, nil } -// NewForConfigOrDie creates a new CoordinationV1alpha1Client for the given config and +// NewForConfigOrDie creates a new CoordinationV1alpha2Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CoordinationV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *CoordinationV1alpha2Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -79,13 +79,13 @@ func NewForConfigOrDie(c *rest.Config) *CoordinationV1alpha1Client { return client } -// New creates a new CoordinationV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *CoordinationV1alpha1Client { - return &CoordinationV1alpha1Client{c} +// New creates a new CoordinationV1alpha2Client for the given RESTClient. +func New(c rest.Interface) *CoordinationV1alpha2Client { + return &CoordinationV1alpha2Client{c} } func setConfigDefaults(config *rest.Config) error { - gv := coordinationv1alpha1.SchemeGroupVersion + gv := coordinationv1alpha2.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() @@ -99,7 +99,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CoordinationV1alpha1Client) RESTClient() rest.Interface { +func (c *CoordinationV1alpha2Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/doc.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/doc.go similarity index 97% rename from staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/doc.go rename to staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/doc.go index df51baa4d4c..baaf2d98537 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/doc.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/doc.go @@ -17,4 +17,4 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. -package v1alpha1 +package v1alpha2 diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/fake/doc.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/doc.go similarity index 100% rename from staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/fake/doc.go rename to staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/doc.go diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/fake/fake_coordination_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/fake_coordination_client.go similarity index 77% rename from staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/fake/fake_coordination_client.go rename to staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/fake_coordination_client.go index 2e7d4be2684..8afa034faad 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/fake/fake_coordination_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/fake_coordination_client.go @@ -19,22 +19,22 @@ limitations under the License. package fake import ( - v1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" + v1alpha2 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha2" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeCoordinationV1alpha1 struct { +type FakeCoordinationV1alpha2 struct { *testing.Fake } -func (c *FakeCoordinationV1alpha1) LeaseCandidates(namespace string) v1alpha1.LeaseCandidateInterface { +func (c *FakeCoordinationV1alpha2) LeaseCandidates(namespace string) v1alpha2.LeaseCandidateInterface { return &FakeLeaseCandidates{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCoordinationV1alpha1) RESTClient() rest.Interface { +func (c *FakeCoordinationV1alpha2) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/fake/fake_leasecandidate.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/fake_leasecandidate.go similarity index 75% rename from staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/fake/fake_leasecandidate.go rename to staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/fake_leasecandidate.go index 9c5ecb9d518..967755d256b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/fake/fake_leasecandidate.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/fake/fake_leasecandidate.go @@ -23,40 +23,40 @@ import ( json "encoding/json" fmt "fmt" - v1alpha1 "k8s.io/api/coordination/v1alpha1" + v1alpha2 "k8s.io/api/coordination/v1alpha2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - coordinationv1alpha1 "k8s.io/client-go/applyconfigurations/coordination/v1alpha1" + coordinationv1alpha2 "k8s.io/client-go/applyconfigurations/coordination/v1alpha2" testing "k8s.io/client-go/testing" ) // FakeLeaseCandidates implements LeaseCandidateInterface type FakeLeaseCandidates struct { - Fake *FakeCoordinationV1alpha1 + Fake *FakeCoordinationV1alpha2 ns string } -var leasecandidatesResource = v1alpha1.SchemeGroupVersion.WithResource("leasecandidates") +var leasecandidatesResource = v1alpha2.SchemeGroupVersion.WithResource("leasecandidates") -var leasecandidatesKind = v1alpha1.SchemeGroupVersion.WithKind("LeaseCandidate") +var leasecandidatesKind = v1alpha2.SchemeGroupVersion.WithKind("LeaseCandidate") // Get takes name of the leaseCandidate, and returns the corresponding leaseCandidate object, and an error if there is any. -func (c *FakeLeaseCandidates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.LeaseCandidate, err error) { - emptyResult := &v1alpha1.LeaseCandidate{} +func (c *FakeLeaseCandidates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.LeaseCandidate, err error) { + emptyResult := &v1alpha2.LeaseCandidate{} obj, err := c.Fake. Invokes(testing.NewGetActionWithOptions(leasecandidatesResource, c.ns, name, options), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha1.LeaseCandidate), err + return obj.(*v1alpha2.LeaseCandidate), err } // List takes label and field selectors, and returns the list of LeaseCandidates that match those selectors. -func (c *FakeLeaseCandidates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.LeaseCandidateList, err error) { - emptyResult := &v1alpha1.LeaseCandidateList{} +func (c *FakeLeaseCandidates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.LeaseCandidateList, err error) { + emptyResult := &v1alpha2.LeaseCandidateList{} obj, err := c.Fake. Invokes(testing.NewListActionWithOptions(leasecandidatesResource, leasecandidatesKind, c.ns, opts), emptyResult) @@ -68,8 +68,8 @@ func (c *FakeLeaseCandidates) List(ctx context.Context, opts v1.ListOptions) (re if label == nil { label = labels.Everything() } - list := &v1alpha1.LeaseCandidateList{ListMeta: obj.(*v1alpha1.LeaseCandidateList).ListMeta} - for _, item := range obj.(*v1alpha1.LeaseCandidateList).Items { + list := &v1alpha2.LeaseCandidateList{ListMeta: obj.(*v1alpha2.LeaseCandidateList).ListMeta} + for _, item := range obj.(*v1alpha2.LeaseCandidateList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -85,33 +85,33 @@ func (c *FakeLeaseCandidates) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a leaseCandidate and creates it. Returns the server's representation of the leaseCandidate, and an error, if there is any. -func (c *FakeLeaseCandidates) Create(ctx context.Context, leaseCandidate *v1alpha1.LeaseCandidate, opts v1.CreateOptions) (result *v1alpha1.LeaseCandidate, err error) { - emptyResult := &v1alpha1.LeaseCandidate{} +func (c *FakeLeaseCandidates) Create(ctx context.Context, leaseCandidate *v1alpha2.LeaseCandidate, opts v1.CreateOptions) (result *v1alpha2.LeaseCandidate, err error) { + emptyResult := &v1alpha2.LeaseCandidate{} obj, err := c.Fake. Invokes(testing.NewCreateActionWithOptions(leasecandidatesResource, c.ns, leaseCandidate, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha1.LeaseCandidate), err + return obj.(*v1alpha2.LeaseCandidate), err } // Update takes the representation of a leaseCandidate and updates it. Returns the server's representation of the leaseCandidate, and an error, if there is any. -func (c *FakeLeaseCandidates) Update(ctx context.Context, leaseCandidate *v1alpha1.LeaseCandidate, opts v1.UpdateOptions) (result *v1alpha1.LeaseCandidate, err error) { - emptyResult := &v1alpha1.LeaseCandidate{} +func (c *FakeLeaseCandidates) Update(ctx context.Context, leaseCandidate *v1alpha2.LeaseCandidate, opts v1.UpdateOptions) (result *v1alpha2.LeaseCandidate, err error) { + emptyResult := &v1alpha2.LeaseCandidate{} obj, err := c.Fake. Invokes(testing.NewUpdateActionWithOptions(leasecandidatesResource, c.ns, leaseCandidate, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha1.LeaseCandidate), err + return obj.(*v1alpha2.LeaseCandidate), err } // Delete takes name of the leaseCandidate and deletes it. Returns an error if one occurs. func (c *FakeLeaseCandidates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(leasecandidatesResource, c.ns, name, opts), &v1alpha1.LeaseCandidate{}) + Invokes(testing.NewDeleteActionWithOptions(leasecandidatesResource, c.ns, name, opts), &v1alpha2.LeaseCandidate{}) return err } @@ -120,24 +120,24 @@ func (c *FakeLeaseCandidates) Delete(ctx context.Context, name string, opts v1.D func (c *FakeLeaseCandidates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewDeleteCollectionActionWithOptions(leasecandidatesResource, c.ns, opts, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha1.LeaseCandidateList{}) + _, err := c.Fake.Invokes(action, &v1alpha2.LeaseCandidateList{}) return err } // Patch applies the patch and returns the patched leaseCandidate. -func (c *FakeLeaseCandidates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.LeaseCandidate, err error) { - emptyResult := &v1alpha1.LeaseCandidate{} +func (c *FakeLeaseCandidates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.LeaseCandidate, err error) { + emptyResult := &v1alpha2.LeaseCandidate{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(leasecandidatesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha1.LeaseCandidate), err + return obj.(*v1alpha2.LeaseCandidate), err } // Apply takes the given apply declarative configuration, applies it and returns the applied leaseCandidate. -func (c *FakeLeaseCandidates) Apply(ctx context.Context, leaseCandidate *coordinationv1alpha1.LeaseCandidateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.LeaseCandidate, err error) { +func (c *FakeLeaseCandidates) Apply(ctx context.Context, leaseCandidate *coordinationv1alpha2.LeaseCandidateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.LeaseCandidate, err error) { if leaseCandidate == nil { return nil, fmt.Errorf("leaseCandidate provided to Apply must not be nil") } @@ -149,12 +149,12 @@ func (c *FakeLeaseCandidates) Apply(ctx context.Context, leaseCandidate *coordin if name == nil { return nil, fmt.Errorf("leaseCandidate.Name must be provided to Apply") } - emptyResult := &v1alpha1.LeaseCandidate{} + emptyResult := &v1alpha2.LeaseCandidate{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(leasecandidatesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha1.LeaseCandidate), err + return obj.(*v1alpha2.LeaseCandidate), err } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/generated_expansion.go similarity index 97% rename from staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go rename to staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/generated_expansion.go index 2dc2f30cfc4..52af4786c75 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/generated_expansion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/generated_expansion.go @@ -16,6 +16,6 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1alpha2 type LeaseCandidateExpansion interface{} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/leasecandidate.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/leasecandidate.go similarity index 63% rename from staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/leasecandidate.go rename to staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/leasecandidate.go index e91abc5fee8..c994a8893a6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha1/leasecandidate.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1alpha2/leasecandidate.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1alpha2 import ( context "context" - coordinationv1alpha1 "k8s.io/api/coordination/v1alpha1" + coordinationv1alpha2 "k8s.io/api/coordination/v1alpha2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - applyconfigurationscoordinationv1alpha1 "k8s.io/client-go/applyconfigurations/coordination/v1alpha1" + applyconfigurationscoordinationv1alpha2 "k8s.io/client-go/applyconfigurations/coordination/v1alpha2" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) @@ -38,34 +38,34 @@ type LeaseCandidatesGetter interface { // LeaseCandidateInterface has methods to work with LeaseCandidate resources. type LeaseCandidateInterface interface { - Create(ctx context.Context, leaseCandidate *coordinationv1alpha1.LeaseCandidate, opts v1.CreateOptions) (*coordinationv1alpha1.LeaseCandidate, error) - Update(ctx context.Context, leaseCandidate *coordinationv1alpha1.LeaseCandidate, opts v1.UpdateOptions) (*coordinationv1alpha1.LeaseCandidate, error) + Create(ctx context.Context, leaseCandidate *coordinationv1alpha2.LeaseCandidate, opts v1.CreateOptions) (*coordinationv1alpha2.LeaseCandidate, error) + Update(ctx context.Context, leaseCandidate *coordinationv1alpha2.LeaseCandidate, opts v1.UpdateOptions) (*coordinationv1alpha2.LeaseCandidate, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*coordinationv1alpha1.LeaseCandidate, error) - List(ctx context.Context, opts v1.ListOptions) (*coordinationv1alpha1.LeaseCandidateList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*coordinationv1alpha2.LeaseCandidate, error) + List(ctx context.Context, opts v1.ListOptions) (*coordinationv1alpha2.LeaseCandidateList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *coordinationv1alpha1.LeaseCandidate, err error) - Apply(ctx context.Context, leaseCandidate *applyconfigurationscoordinationv1alpha1.LeaseCandidateApplyConfiguration, opts v1.ApplyOptions) (result *coordinationv1alpha1.LeaseCandidate, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *coordinationv1alpha2.LeaseCandidate, err error) + Apply(ctx context.Context, leaseCandidate *applyconfigurationscoordinationv1alpha2.LeaseCandidateApplyConfiguration, opts v1.ApplyOptions) (result *coordinationv1alpha2.LeaseCandidate, err error) LeaseCandidateExpansion } // leaseCandidates implements LeaseCandidateInterface type leaseCandidates struct { - *gentype.ClientWithListAndApply[*coordinationv1alpha1.LeaseCandidate, *coordinationv1alpha1.LeaseCandidateList, *applyconfigurationscoordinationv1alpha1.LeaseCandidateApplyConfiguration] + *gentype.ClientWithListAndApply[*coordinationv1alpha2.LeaseCandidate, *coordinationv1alpha2.LeaseCandidateList, *applyconfigurationscoordinationv1alpha2.LeaseCandidateApplyConfiguration] } // newLeaseCandidates returns a LeaseCandidates -func newLeaseCandidates(c *CoordinationV1alpha1Client, namespace string) *leaseCandidates { +func newLeaseCandidates(c *CoordinationV1alpha2Client, namespace string) *leaseCandidates { return &leaseCandidates{ - gentype.NewClientWithListAndApply[*coordinationv1alpha1.LeaseCandidate, *coordinationv1alpha1.LeaseCandidateList, *applyconfigurationscoordinationv1alpha1.LeaseCandidateApplyConfiguration]( + gentype.NewClientWithListAndApply[*coordinationv1alpha2.LeaseCandidate, *coordinationv1alpha2.LeaseCandidateList, *applyconfigurationscoordinationv1alpha2.LeaseCandidateApplyConfiguration]( "leasecandidates", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *coordinationv1alpha1.LeaseCandidate { return &coordinationv1alpha1.LeaseCandidate{} }, - func() *coordinationv1alpha1.LeaseCandidateList { return &coordinationv1alpha1.LeaseCandidateList{} }, - gentype.PrefersProtobuf[*coordinationv1alpha1.LeaseCandidate](), + func() *coordinationv1alpha2.LeaseCandidate { return &coordinationv1alpha2.LeaseCandidate{} }, + func() *coordinationv1alpha2.LeaseCandidateList { return &coordinationv1alpha2.LeaseCandidateList{} }, + gentype.PrefersProtobuf[*coordinationv1alpha2.LeaseCandidate](), ), } } diff --git a/staging/src/k8s.io/client-go/listers/coordination/v1alpha1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/coordination/v1alpha2/expansion_generated.go similarity index 98% rename from staging/src/k8s.io/client-go/listers/coordination/v1alpha1/expansion_generated.go rename to staging/src/k8s.io/client-go/listers/coordination/v1alpha2/expansion_generated.go index 233bda975b4..f22e7d48335 100644 --- a/staging/src/k8s.io/client-go/listers/coordination/v1alpha1/expansion_generated.go +++ b/staging/src/k8s.io/client-go/listers/coordination/v1alpha2/expansion_generated.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1alpha2 // LeaseCandidateListerExpansion allows custom methods to be added to // LeaseCandidateLister. diff --git a/staging/src/k8s.io/client-go/listers/coordination/v1alpha1/leasecandidate.go b/staging/src/k8s.io/client-go/listers/coordination/v1alpha2/leasecandidate.go similarity index 80% rename from staging/src/k8s.io/client-go/listers/coordination/v1alpha1/leasecandidate.go rename to staging/src/k8s.io/client-go/listers/coordination/v1alpha2/leasecandidate.go index bbca087a8de..26a3be4761c 100644 --- a/staging/src/k8s.io/client-go/listers/coordination/v1alpha1/leasecandidate.go +++ b/staging/src/k8s.io/client-go/listers/coordination/v1alpha2/leasecandidate.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1alpha2 import ( - coordinationv1alpha1 "k8s.io/api/coordination/v1alpha1" + coordinationv1alpha2 "k8s.io/api/coordination/v1alpha2" labels "k8s.io/apimachinery/pkg/labels" listers "k8s.io/client-go/listers" cache "k8s.io/client-go/tools/cache" @@ -30,7 +30,7 @@ import ( type LeaseCandidateLister interface { // List lists all LeaseCandidates in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*coordinationv1alpha1.LeaseCandidate, err error) + List(selector labels.Selector) (ret []*coordinationv1alpha2.LeaseCandidate, err error) // LeaseCandidates returns an object that can list and get LeaseCandidates. LeaseCandidates(namespace string) LeaseCandidateNamespaceLister LeaseCandidateListerExpansion @@ -38,17 +38,17 @@ type LeaseCandidateLister interface { // leaseCandidateLister implements the LeaseCandidateLister interface. type leaseCandidateLister struct { - listers.ResourceIndexer[*coordinationv1alpha1.LeaseCandidate] + listers.ResourceIndexer[*coordinationv1alpha2.LeaseCandidate] } // NewLeaseCandidateLister returns a new LeaseCandidateLister. func NewLeaseCandidateLister(indexer cache.Indexer) LeaseCandidateLister { - return &leaseCandidateLister{listers.New[*coordinationv1alpha1.LeaseCandidate](indexer, coordinationv1alpha1.Resource("leasecandidate"))} + return &leaseCandidateLister{listers.New[*coordinationv1alpha2.LeaseCandidate](indexer, coordinationv1alpha2.Resource("leasecandidate"))} } // LeaseCandidates returns an object that can list and get LeaseCandidates. func (s *leaseCandidateLister) LeaseCandidates(namespace string) LeaseCandidateNamespaceLister { - return leaseCandidateNamespaceLister{listers.NewNamespaced[*coordinationv1alpha1.LeaseCandidate](s.ResourceIndexer, namespace)} + return leaseCandidateNamespaceLister{listers.NewNamespaced[*coordinationv1alpha2.LeaseCandidate](s.ResourceIndexer, namespace)} } // LeaseCandidateNamespaceLister helps list and get LeaseCandidates. @@ -56,15 +56,15 @@ func (s *leaseCandidateLister) LeaseCandidates(namespace string) LeaseCandidateN type LeaseCandidateNamespaceLister interface { // List lists all LeaseCandidates in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*coordinationv1alpha1.LeaseCandidate, err error) + List(selector labels.Selector) (ret []*coordinationv1alpha2.LeaseCandidate, err error) // Get retrieves the LeaseCandidate from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*coordinationv1alpha1.LeaseCandidate, error) + Get(name string) (*coordinationv1alpha2.LeaseCandidate, error) LeaseCandidateNamespaceListerExpansion } // leaseCandidateNamespaceLister implements the LeaseCandidateNamespaceLister // interface. type leaseCandidateNamespaceLister struct { - listers.ResourceIndexer[*coordinationv1alpha1.LeaseCandidate] + listers.ResourceIndexer[*coordinationv1alpha2.LeaseCandidate] }