From 919e7abe0f560a62d055fafbc3855a7cabbcf6ee Mon Sep 17 00:00:00 2001 From: Jefftree Date: Tue, 23 Jul 2024 23:42:57 +0000 Subject: [PATCH] update codegen and openapi --- api/openapi-spec/swagger.json | 2 +- .../v3/apis__coordination.k8s.io__v1alpha1_openapi.json | 2 +- pkg/generated/openapi/zz_generated.openapi.go | 2 +- .../src/k8s.io/api/coordination/v1alpha1/generated.proto | 7 ++----- .../coordination/v1alpha1/types_swagger_doc_generated.go | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index e93fbbde69d..ed0410aa5f6 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -5535,7 +5535,7 @@ "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 [X] and another candidate has [Y, X], Y supersedes X and strategy Y\n will be used.\n- If a candidate has [X, Y] and another candidate has [Y, X], this is a user error and leader\n election will not operate the Lease until resolved.\n- In general: [A1, A2, ..., An] > [B1, B2, ..., Bm] if the latter is a sub-sequence of the former, and hence\n A1 is chosen. For more than two candidates, one must be the maximum of all candidates. Otherwise, this is a user\n error and leader election will not operate the Lease until resolved.\n(Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", + "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" }, diff --git a/api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha1_openapi.json index d4943a4ba3b..b9f161dcfd9 100644 --- a/api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__coordination.k8s.io__v1alpha1_openapi.json @@ -110,7 +110,7 @@ "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 [X] and another candidate has [Y, X], Y supersedes X and strategy Y\n will be used.\n- If a candidate has [X, Y] and another candidate has [Y, X], this is a user error and leader\n election will not operate the Lease until resolved.\n- In general: [A1, A2, ..., An] > [B1, B2, ..., Bm] if the latter is a sub-sequence of the former, and hence\n A1 is chosen. For more than two candidates, one must be the maximum of all candidates. Otherwise, this is a user\n error and leader election will not operate the Lease until resolved.\n(Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", + "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" diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index c47f8fc1287..1541f2b3111 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -19043,7 +19043,7 @@ func schema_k8sio_api_coordination_v1alpha1_LeaseCandidateSpec(ref common.Refere }, }, 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 [X] and another candidate has [Y, X], Y supersedes X and strategy Y\n will be used.\n- If a candidate has [X, Y] and another candidate has [Y, X], this is a user error and leader\n election will not operate the Lease until resolved.\n- In general: [A1, A2, ..., An] > [B1, B2, ..., Bm] if the latter is a sub-sequence of the former, and hence\n A1 is chosen. For more than two candidates, one must be the maximum of all candidates. Otherwise, this is a user\n error and leader election will not operate the Lease until resolved.\n(Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", + 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{ diff --git a/staging/src/k8s.io/api/coordination/v1alpha1/generated.proto b/staging/src/k8s.io/api/coordination/v1alpha1/generated.proto index 9868bebfb39..57895ad569d 100644 --- a/staging/src/k8s.io/api/coordination/v1alpha1/generated.proto +++ b/staging/src/k8s.io/api/coordination/v1alpha1/generated.proto @@ -92,13 +92,10 @@ message LeaseCandidateSpec { // 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 [X] and another candidate has [Y, X], Y supersedes X and strategy Y + // - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y // will be used. - // - If a candidate has [X, Y] and another candidate has [Y, X], this is a user error and leader + // - If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader // election will not operate the Lease until resolved. - // - In general: [A1, A2, ..., An] > [B1, B2, ..., Bm] if the latter is a sub-sequence of the former, and hence - // A1 is chosen. For more than two candidates, one must be the maximum of all candidates. Otherwise, this is a user - // error and leader election will not operate the Lease until resolved. // (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled. // +featureGate=CoordinatedLeaderElection // +listType=atomic diff --git a/staging/src/k8s.io/api/coordination/v1alpha1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/coordination/v1alpha1/types_swagger_doc_generated.go index 33bb96fc92d..0e52809c8ca 100644 --- a/staging/src/k8s.io/api/coordination/v1alpha1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/coordination/v1alpha1/types_swagger_doc_generated.go @@ -54,7 +54,7 @@ var map_LeaseCandidateSpec = map[string]string{ "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 when strategy is \"OldestEmulationVersion\"", "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\"", - "preferredStrategies": "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 [X] and another candidate has [Y, X], Y supersedes X and strategy Y\n will be used.\n- If a candidate has [X, Y] and another candidate has [Y, X], this is a user error and leader\n election will not operate the Lease until resolved.\n- In general: [A1, A2, ..., An] > [B1, B2, ..., Bm] if the latter is a sub-sequence of the former, and hence\n A1 is chosen. For more than two candidates, one must be the maximum of all candidates. Otherwise, this is a user\n error and leader election will not operate the Lease until resolved.\n(Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", + "preferredStrategies": "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.", } func (LeaseCandidateSpec) SwaggerDoc() map[string]string {