Skip to content

Commit e87de64

Browse files
committed
Update CRD with description
1 parent 6153db6 commit e87de64

4 files changed

+319
-9
lines changed

install/0000_50_machine-api-operator_02_machine.crd.yaml

Lines changed: 110 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apiVersion: apiextensions.k8s.io/v1beta1
22
kind: CustomResourceDefinition
33
metadata:
4+
creationTimestamp: null
45
labels:
56
controller-tools.k8s.io: "1.0"
67
name: machines.cluster.k8s.io
@@ -40,72 +41,180 @@ spec:
4041
openAPIV3Schema:
4142
properties:
4243
apiVersion:
44+
description: 'APIVersion defines the versioned schema of this representation
45+
of an object. Servers should convert recognized schemas to the latest
46+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
4347
type: string
4448
kind:
49+
description: 'Kind is a string value representing the REST resource this
50+
object represents. Servers may infer this from the endpoint the client
51+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
4552
type: string
4653
metadata:
4754
type: object
4855
spec:
49-
type: object
5056
properties:
5157
configSource:
58+
description: To populate in the associated Node for dynamic kubelet
59+
config. This field already exists in Node, so any updates to it in
60+
the Machine spec will be automatically copied to the linked NodeRef
61+
from the status. The rest of dynamic kubelet config support should
62+
then work as-is.
5263
type: object
5364
metadata:
65+
description: This ObjectMeta will autopopulate the Node created. Use
66+
this to indicate what labels, annotations, name prefix, etc., should
67+
be used when creating the Node.
5468
type: object
5569
providerSpec:
70+
description: Provider-specific configuration to use during node creation.
5671
properties:
5772
value:
73+
description: Value is an inlined, serialized representation of the
74+
resource configuration. It is recommended that providers maintain
75+
their own versioned API types that should be serialized/deserialized
76+
from this field, akin to component config.
5877
type: object
5978
valueFrom:
79+
description: Source for the provider configuration. Cannot be used
80+
if value is not empty.
6081
properties:
6182
machineClass:
83+
description: The machine class from which the provider config
84+
should be sourced.
6285
properties:
6386
provider:
87+
description: Provider is the name of the cloud-provider
88+
which MachineClass is intended for.
6489
type: string
6590
type: object
6691
type: object
6792
type: object
6893
taints:
94+
description: The full, authoritative list of taints to apply to the
95+
corresponding Node. This list will overwrite any modifications made
96+
to the Node on an ongoing basis.
6997
items:
7098
type: object
7199
type: array
72100
versions:
101+
description: Versions of key software to use. This field is optional
102+
at cluster creation time, and omitting the field indicates that the
103+
cluster installation tool should select defaults for the user. These
104+
defaults may differ based on the cluster installer, but the tool should
105+
populate the values it uses when persisting Machine objects. A Machine
106+
spec missing this field at runtime is invalid.
73107
properties:
74108
controlPlane:
109+
description: Semantic version of the Kubernetes control plane to
110+
run. This should only be populated when the machine is a master.
75111
type: string
76112
kubelet:
113+
description: Semantic version of kubelet to run
77114
type: string
78115
required:
79116
- kubelet
80117
type: object
81118
required:
82119
- providerSpec
120+
type: object
83121
status:
84122
properties:
85123
addresses:
124+
description: Addresses is a list of addresses assigned to the machine.
125+
Queried from cloud provider, if available.
86126
items:
87127
type: object
88128
type: array
89129
conditions:
130+
description: 'List of conditions synced from the node conditions of
131+
the corresponding node-object. Machine-controller is responsible for
132+
keeping conditions up-to-date. MachineSet controller will be taking
133+
these conditions as a signal to decide if machine is healthy or needs
134+
to be replaced. Refer: https://kubernetes.io/docs/concepts/architecture/nodes/#condition'
90135
items:
91136
type: object
92137
type: array
93138
errorMessage:
94139
type: string
95140
errorReason:
141+
description: In the event that there is a terminal problem reconciling
142+
the Machine, both ErrorReason and ErrorMessage will be set. ErrorReason
143+
will be populated with a succinct value suitable for machine interpretation,
144+
while ErrorMessage will contain a more verbose string suitable for
145+
logging and human consumption. These fields should not be set for
146+
transitive errors that a controller faces that are expected to be
147+
fixed automatically over time (like service outages), but instead
148+
indicate that something is fundamentally wrong with the Machine's
149+
spec or the configuration of the controller, and that manual intervention
150+
is required. Examples of terminal errors would be invalid combinations
151+
of settings in the spec, values that are unsupported by the controller,
152+
or the responsible controller itself being critically misconfigured. Any
153+
transient errors that occur during the reconciliation of Machines
154+
can be added as events to the Machine object and/or logged in the
155+
controller's output.
96156
type: string
157+
lastOperation:
158+
description: LastOperation describes the last-operation performed by
159+
the machine-controller. This API should be useful as a history in
160+
terms of the latest operation performed on the specific machine. It
161+
should also convey the state of the latest-operation for example if
162+
it is still on-going, failed or completed successfully.
163+
properties:
164+
description:
165+
description: Description is the human-readable description of the
166+
last operation.
167+
type: string
168+
lastUpdated:
169+
description: LastUpdateTime is the timestamp at which LastOperation
170+
API was last-updated.
171+
format: date-time
172+
type: string
173+
state:
174+
description: State is the current status of the last performed operation.
175+
E.g. Processing, Failed, Successful etc
176+
type: string
177+
type:
178+
description: Type is the type of operation which was last performed.
179+
E.g. Create, Delete, Update etc
180+
type: string
181+
type: object
97182
lastUpdated:
183+
description: When was this status last observed
98184
format: date-time
99185
type: string
100186
nodeRef:
187+
description: If the corresponding Node exists, this will point to its
188+
object.
101189
type: object
190+
phase:
191+
description: Phase represents the current phase of machine actuation.
192+
E.g. Pending, Running, Terminating, Failed etc.
193+
type: string
102194
providerStatus:
195+
description: Provider-specific status. It is recommended that providers
196+
maintain their own versioned API types that should be serialized/deserialized
197+
from this field.
103198
type: object
104199
versions:
200+
description: 'The current versions of software on the corresponding
201+
Node (if it exists). This is provided for a few reasons: 1) It is
202+
more convenient than checking the NodeRef, traversing it to the
203+
Node, and finding the appropriate field in Node.Status.NodeInfo (which
204+
uses different field names and formatting). 2) It removes some of
205+
the dependency on the structure of the Node, so that if the structure
206+
of Node.Status.NodeInfo changes, only machine controllers need
207+
to be updated, rather than every client of the Machines API. 3)
208+
There is no other simple way to check the ControlPlane version.
209+
A client would have to connect directly to the apiserver running
210+
on the target node in order to find out its version.'
105211
properties:
106212
controlPlane:
213+
description: Semantic version of the Kubernetes control plane to
214+
run. This should only be populated when the machine is a master.
107215
type: string
108216
kubelet:
217+
description: Semantic version of kubelet to run
109218
type: string
110219
required:
111220
- kubelet

install/0000_50_machine-api-operator_03_machineset.crd.yaml

Lines changed: 84 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apiVersion: apiextensions.k8s.io/v1beta1
22
kind: CustomResourceDefinition
33
metadata:
4+
creationTimestamp: null
45
labels:
56
controller-tools.k8s.io: "1.0"
67
name: machinesets.cluster.k8s.io
@@ -20,83 +21,163 @@ spec:
2021
openAPIV3Schema:
2122
properties:
2223
apiVersion:
24+
description: 'APIVersion defines the versioned schema of this representation
25+
of an object. Servers should convert recognized schemas to the latest
26+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
2327
type: string
2428
kind:
29+
description: 'Kind is a string value representing the REST resource this
30+
object represents. Servers may infer this from the endpoint the client
31+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
2532
type: string
2633
metadata:
2734
type: object
2835
spec:
29-
type: object
3036
properties:
3137
minReadySeconds:
38+
description: MinReadySeconds is the minimum number of seconds for which
39+
a newly created machine should be ready. Defaults to 0 (machine will
40+
be considered available as soon as it is ready)
3241
format: int32
3342
type: integer
3443
replicas:
44+
description: Replicas is the number of desired replicas. This is a pointer
45+
to distinguish between explicit zero and unspecified. Defaults to
46+
1.
3547
format: int32
3648
type: integer
3749
selector:
50+
description: 'Selector is a label query over machines that should match
51+
the replica count. Label keys and values that must match in order
52+
to be controlled by this MachineSet. It must match the machine template''s
53+
labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors'
3854
type: object
3955
template:
40-
type: object
56+
description: Template is the object that describes the machine that
57+
will be created if insufficient replicas are detected.
4158
properties:
4259
metadata:
60+
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
4361
type: object
4462
spec:
45-
type: object
63+
description: 'Specification of the desired behavior of the machine.
64+
More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status'
4665
properties:
4766
configSource:
67+
description: To populate in the associated Node for dynamic
68+
kubelet config. This field already exists in Node, so any
69+
updates to it in the Machine spec will be automatically copied
70+
to the linked NodeRef from the status. The rest of dynamic
71+
kubelet config support should then work as-is.
4872
type: object
4973
metadata:
74+
description: This ObjectMeta will autopopulate the Node created.
75+
Use this to indicate what labels, annotations, name prefix,
76+
etc., should be used when creating the Node.
5077
type: object
5178
providerSpec:
79+
description: Provider-specific configuration to use during node
80+
creation.
5281
properties:
5382
value:
83+
description: Value is an inlined, serialized representation
84+
of the resource configuration. It is recommended that
85+
providers maintain their own versioned API types that
86+
should be serialized/deserialized from this field, akin
87+
to component config.
5488
type: object
5589
valueFrom:
90+
description: Source for the provider configuration. Cannot
91+
be used if value is not empty.
5692
properties:
5793
machineClass:
94+
description: The machine class from which the provider
95+
config should be sourced.
5896
properties:
5997
provider:
98+
description: Provider is the name of the cloud-provider
99+
which MachineClass is intended for.
60100
type: string
61101
type: object
62102
type: object
63103
type: object
64104
taints:
105+
description: The full, authoritative list of taints to apply
106+
to the corresponding Node. This list will overwrite any modifications
107+
made to the Node on an ongoing basis.
65108
items:
66109
type: object
67110
type: array
68111
versions:
112+
description: Versions of key software to use. This field is
113+
optional at cluster creation time, and omitting the field
114+
indicates that the cluster installation tool should select
115+
defaults for the user. These defaults may differ based on
116+
the cluster installer, but the tool should populate the values
117+
it uses when persisting Machine objects. A Machine spec missing
118+
this field at runtime is invalid.
69119
properties:
70120
controlPlane:
121+
description: Semantic version of the Kubernetes control
122+
plane to run. This should only be populated when the machine
123+
is a master.
71124
type: string
72125
kubelet:
126+
description: Semantic version of kubelet to run
73127
type: string
74128
required:
75129
- kubelet
76130
type: object
77131
required:
78132
- providerSpec
133+
type: object
134+
type: object
79135
required:
80136
- selector
137+
type: object
81138
status:
82139
properties:
83140
availableReplicas:
141+
description: The number of available replicas (ready for at least minReadySeconds)
142+
for this MachineSet.
84143
format: int32
85144
type: integer
86145
errorMessage:
87146
type: string
88147
errorReason:
148+
description: In the event that there is a terminal problem reconciling
149+
the replicas, both ErrorReason and ErrorMessage will be set. ErrorReason
150+
will be populated with a succinct value suitable for machine interpretation,
151+
while ErrorMessage will contain a more verbose string suitable for
152+
logging and human consumption. These fields should not be set for
153+
transitive errors that a controller faces that are expected to be
154+
fixed automatically over time (like service outages), but instead
155+
indicate that something is fundamentally wrong with the MachineTemplate's
156+
spec or the configuration of the machine controller, and that manual
157+
intervention is required. Examples of terminal errors would be invalid
158+
combinations of settings in the spec, values that are unsupported
159+
by the machine controller, or the responsible machine controller itself
160+
being critically misconfigured. Any transient errors that occur during
161+
the reconciliation of Machines can be added as events to the MachineSet
162+
object and/or logged in the controller's output.
89163
type: string
90164
fullyLabeledReplicas:
165+
description: The number of replicas that have labels matching the labels
166+
of the machine template of the MachineSet.
91167
format: int32
92168
type: integer
93169
observedGeneration:
170+
description: ObservedGeneration reflects the generation of the most
171+
recently observed MachineSet.
94172
format: int64
95173
type: integer
96174
readyReplicas:
175+
description: The number of ready replicas for this MachineSet. A machine
176+
is considered ready when the node has been created and is "Ready".
97177
format: int32
98178
type: integer
99179
replicas:
180+
description: Replicas is the most recently observed number of replicas.
100181
format: int32
101182
type: integer
102183
required:

0 commit comments

Comments
 (0)