Skip to content

Commit

Permalink
Adding new schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
Yann Hamon committed Jul 27, 2024
1 parent b5d36d0 commit c7a46bf
Show file tree
Hide file tree
Showing 68 changed files with 4,817 additions and 40 deletions.
130 changes: 128 additions & 2 deletions master-local/_definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5579,11 +5579,11 @@
"description": "acquireTime is a time when the current lease was acquired."
},
"holderIdentity": {
"description": "holderIdentity contains the identity of the holder of a current lease.",
"description": "holderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.",
"type": "string"
},
"leaseDurationSeconds": {
"description": "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed renewTime.",
"description": "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measured against the time of last observed renewTime.",
"format": "int32",
"type": "integer"
},
Expand All @@ -5592,11 +5592,127 @@
"format": "int32",
"type": "integer"
},
"preferredHolder": {
"description": "PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. This field can only be set if Strategy is also set.",
"type": "string"
},
"renewTime": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime",
"description": "renewTime is a time when the current holder of a lease has last updated the lease."
},
"strategy": {
"description": "Strategy indicates the strategy for picking the leader for coordinated leader election. If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.",
"type": "string"
}
},
"type": "object"
},
"io.k8s.api.coordination.v1alpha1.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": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string",
"enum": [
"LeaseCandidate"
]
},
"metadata": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta",
"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",
"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"
}
},
"type": "object",
"x-kubernetes-group-version-kind": [
{
"group": "coordination.k8s.io",
"kind": "LeaseCandidate",
"version": "v1alpha1"
}
]
},
"io.k8s.api.coordination.v1alpha1.LeaseCandidateList": {
"description": "LeaseCandidateList is a list of Lease objects.",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"items": {
"description": "items is a list of schema objects.",
"items": {
"$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate"
},
"type": "array"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string",
"enum": [
"LeaseCandidateList"
]
},
"metadata": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta",
"description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"
}
},
"required": [
"items"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{
"group": "coordination.k8s.io",
"kind": "LeaseCandidateList",
"version": "v1alpha1"
}
]
},
"io.k8s.api.coordination.v1alpha1.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\"",
"type": "string"
},
"emulationVersion": {
"description": "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\"",
"type": "string"
},
"leaseName": {
"description": "LeaseName is the name of the lease for which this candidate is contending. This field is immutable.",
"type": "string"
},
"pingTime": {
"$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."
}
},
"required": [
"leaseName",
"preferredStrategies"
],
"type": "object"
},
"io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource": {
Expand Down Expand Up @@ -18598,6 +18714,11 @@
"kind": "DeleteOptions",
"version": "v1"
},
{
"group": "coordination.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{
"group": "coordination.k8s.io",
"kind": "DeleteOptions",
Expand Down Expand Up @@ -19343,6 +19464,11 @@
"kind": "WatchEvent",
"version": "v1"
},
{
"group": "coordination.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{
"group": "coordination.k8s.io",
"kind": "WatchEvent",
Expand Down
9 changes: 9 additions & 0 deletions master-local/all.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,15 @@
{
"$ref": "_definitions.json#/definitions/io.k8s.api.coordination.v1.LeaseSpec"
},
{
"$ref": "_definitions.json#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate"
},
{
"$ref": "_definitions.json#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidateList"
},
{
"$ref": "_definitions.json#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidateSpec"
},
{
"$ref": "_definitions.json#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource"
},
Expand Down
6 changes: 6 additions & 0 deletions master-local/deleteoptions-meta-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"certificates.k8s.io/v1alpha1",
"certificates.k8s.io/v1beta1",
"coordination.k8s.io/v1",
"coordination.k8s.io/v1alpha1",
"coordination.k8s.io/v1beta1",
"discovery.k8s.io/v1",
"discovery.k8s.io/v1beta1",
Expand Down Expand Up @@ -262,6 +263,11 @@
"kind": "DeleteOptions",
"version": "v1"
},
{
"group": "coordination.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{
"group": "coordination.k8s.io",
"kind": "DeleteOptions",
Expand Down
5 changes: 5 additions & 0 deletions master-local/deleteoptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@
"kind": "DeleteOptions",
"version": "v1"
},
{
"group": "coordination.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{
"group": "coordination.k8s.io",
"kind": "DeleteOptions",
Expand Down
42 changes: 42 additions & 0 deletions master-local/leasecandidate-coordination-v1alpha1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"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": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": [
"string",
"null"
],
"enum": [
"coordination.k8s.io/v1alpha1"
]
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": [
"string",
"null"
],
"enum": [
"LeaseCandidate"
]
},
"metadata": {
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta",
"description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"
},
"spec": {
"$ref": "_definitions.json#/definitions/io.k8s.api.coordination.v1alpha1.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"
}
},
"type": "object",
"x-kubernetes-group-version-kind": [
{
"group": "coordination.k8s.io",
"kind": "LeaseCandidate",
"version": "v1alpha1"
}
],
"$schema": "http://json-schema.org/schema#"
}
39 changes: 39 additions & 0 deletions master-local/leasecandidate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"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": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": [
"string",
"null"
]
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": [
"string",
"null"
],
"enum": [
"LeaseCandidate"
]
},
"metadata": {
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta",
"description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"
},
"spec": {
"$ref": "_definitions.json#/definitions/io.k8s.api.coordination.v1alpha1.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"
}
},
"type": "object",
"x-kubernetes-group-version-kind": [
{
"group": "coordination.k8s.io",
"kind": "LeaseCandidate",
"version": "v1alpha1"
}
],
"$schema": "http://json-schema.org/schema#"
}
51 changes: 51 additions & 0 deletions master-local/leasecandidatelist-coordination-v1alpha1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"description": "LeaseCandidateList is a list of Lease objects.",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": [
"string",
"null"
],
"enum": [
"coordination.k8s.io/v1alpha1"
]
},
"items": {
"description": "items is a list of schema objects.",
"items": {
"$ref": "_definitions.json#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate"
},
"type": [
"array",
"null"
]
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": [
"string",
"null"
],
"enum": [
"LeaseCandidateList"
]
},
"metadata": {
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta",
"description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"
}
},
"required": [
"items"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{
"group": "coordination.k8s.io",
"kind": "LeaseCandidateList",
"version": "v1alpha1"
}
],
"$schema": "http://json-schema.org/schema#"
}
Loading

0 comments on commit c7a46bf

Please sign in to comment.