bug fix for baremetal operator
[icn.git] / deploy / metal3 / scripts / bmo / crds / metal3.io_baremetalhosts_crd.yaml
1 apiVersion: apiextensions.k8s.io/v1beta1
2 kind: CustomResourceDefinition
3 metadata:
4   name: baremetalhosts.metal3.io
5 spec:
6   additionalPrinterColumns:
7   - JSONPath: .status.operationalStatus
8     description: Operational status
9     name: Status
10     type: string
11   - JSONPath: .status.provisioning.state
12     description: Provisioning status
13     name: Provisioning Status
14     type: string
15   - JSONPath: .spec.consumerRef.name
16     description: Consumer using this host
17     name: Consumer
18     type: string
19   - JSONPath: .spec.bmc.address
20     description: Address of management controller
21     name: BMC
22     type: string
23   - JSONPath: .status.hardwareProfile
24     description: The type of hardware detected
25     name: Hardware Profile
26     type: string
27   - JSONPath: .spec.online
28     description: Whether the host is online or not
29     name: Online
30     type: string
31   - JSONPath: .status.errorMessage
32     description: Most recent error
33     name: Error
34     type: string
35   group: metal3.io
36   names:
37     kind: BareMetalHost
38     listKind: BareMetalHostList
39     plural: baremetalhosts
40     shortNames:
41     - bmh
42     - bmhost
43     singular: baremetalhost
44   scope: Namespaced
45   subresources:
46     status: {}
47   validation:
48     openAPIV3Schema:
49       description: BareMetalHost is the Schema for the baremetalhosts API
50       properties:
51         apiVersion:
52           description: 'APIVersion defines the versioned schema of this representation
53             of an object. Servers should convert recognized schemas to the latest
54             internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
55           type: string
56         kind:
57           description: 'Kind is a string value representing the REST resource this
58             object represents. Servers may infer this from the endpoint the client
59             submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
60           type: string
61         metadata:
62           type: object
63         spec:
64           description: BareMetalHostSpec defines the desired state of BareMetalHost
65           properties:
66             bmc:
67               description: How do we connect to the BMC?
68               properties:
69                 address:
70                   description: Address holds the URL for accessing the controller
71                     on the network.
72                   type: string
73                 credentialsName:
74                   description: The name of the secret containing the BMC credentials
75                     (requires keys "username" and "password").
76                   type: string
77                 disableCertificateVerification:
78                   description: DisableCertificateVerification disables verification
79                     of server certificates when using HTTPS to connect to the BMC.
80                     This is required when the server certificate is self-signed, but
81                     is insecure because it allows a man-in-the-middle to intercept
82                     the connection.
83                   type: boolean
84               required:
85               - address
86               - credentialsName
87               type: object
88             bootMACAddress:
89               description: Which MAC address will PXE boot? This is optional for some
90                 types, but required for libvirt VMs driven by vbmc.
91               pattern: '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'
92               type: string
93             consumerRef:
94               description: ConsumerRef can be used to store information about something
95                 that is using a host. When it is not empty, the host is considered
96                 "in use".
97               properties:
98                 apiVersion:
99                   description: API version of the referent.
100                   type: string
101                 fieldPath:
102                   description: 'If referring to a piece of an object instead of an
103                     entire object, this string should contain a valid JSON/Go field
104                     access statement, such as desiredState.manifest.containers[2].
105                     For example, if the object reference is to a container within
106                     a pod, this would take on a value like: "spec.containers{name}"
107                     (where "name" refers to the name of the container that triggered
108                     the event) or if no container name is specified "spec.containers[2]"
109                     (container with index 2 in this pod). This syntax is chosen only
110                     to have some well-defined way of referencing a part of an object.
111                     TODO: this design is not final and this field is subject to change
112                     in the future.'
113                   type: string
114                 kind:
115                   description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
116                   type: string
117                 name:
118                   description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
119                   type: string
120                 namespace:
121                   description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
122                   type: string
123                 resourceVersion:
124                   description: 'Specific resourceVersion to which this reference is
125                     made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
126                   type: string
127                 uid:
128                   description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
129                   type: string
130               type: object
131             description:
132               description: Description is a human-entered text used to help identify
133                 the host
134               type: string
135             externallyProvisioned:
136               description: ExternallyProvisioned means something else is managing
137                 the image running on the host and the operator should only manage
138                 the power status and hardware inventory inspection. If the Image field
139                 is filled in, this field is ignored.
140               type: boolean
141             hardwareProfile:
142               description: What is the name of the hardware profile for this host?
143                 It should only be necessary to set this when inspection cannot automatically
144                 determine the profile.
145               type: string
146             image:
147               description: Image holds the details of the image to be provisioned.
148               properties:
149                 checksum:
150                   description: Checksum is the checksum for the image.
151                   type: string
152                 url:
153                   description: URL is a location of an image to deploy.
154                   type: string
155               required:
156               - checksum
157               - url
158               type: object
159             networkData:
160               description: NetworkData holds the reference to the Secret containing
161                 content of network_data.json which is passed to Config Drive
162               properties:
163                 name:
164                   description: Name is unique within a namespace to reference a secret
165                     resource.
166                   type: string
167                 namespace:
168                   description: Namespace defines the space within which the secret
169                     name must be unique.
170                   type: string
171               type: object
172             online:
173               description: Should the server be online?
174               type: boolean
175             taints:
176               description: Taints is the full, authoritative list of taints to apply
177                 to the corresponding Machine. This list will overwrite any modifications
178                 made to the Machine on an ongoing basis.
179               items:
180                 description: The node this Taint is attached to has the "effect" on
181                   any pod that does not tolerate the Taint.
182                 properties:
183                   effect:
184                     description: Required. The effect of the taint on pods that do
185                       not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule
186                       and NoExecute.
187                     type: string
188                   key:
189                     description: Required. The taint key to be applied to a node.
190                     type: string
191                   timeAdded:
192                     description: TimeAdded represents the time at which the taint
193                       was added. It is only written for NoExecute taints.
194                     format: date-time
195                     type: string
196                   value:
197                     description: Required. The taint value corresponding to the taint
198                       key.
199                     type: string
200                 required:
201                 - effect
202                 - key
203                 type: object
204               type: array
205             userData:
206               description: UserData holds the reference to the Secret containing the
207                 user data to be passed to the host before it boots.
208               properties:
209                 name:
210                   description: Name is unique within a namespace to reference a secret
211                     resource.
212                   type: string
213                 namespace:
214                   description: Namespace defines the space within which the secret
215                     name must be unique.
216                   type: string
217               type: object
218           required:
219           - online
220           type: object
221         status:
222           description: BareMetalHostStatus defines the observed state of BareMetalHost
223           properties:
224             errorMessage:
225               description: the last error message reported by the provisioning subsystem
226               type: string
227             errorType:
228               description: ErrorType indicates the type of failure encountered when
229                 the OperationalStatus is OperationalStatusError
230               enum:
231               - registration error
232               - inspection error
233               - provisioning error
234               - power management error
235               type: string
236             goodCredentials:
237               description: the last credentials we were able to validate as working
238               properties:
239                 credentials:
240                   description: SecretReference represents a Secret Reference. It has
241                     enough information to retrieve secret in any namespace
242                   properties:
243                     name:
244                       description: Name is unique within a namespace to reference
245                         a secret resource.
246                       type: string
247                     namespace:
248                       description: Namespace defines the space within which the secret
249                         name must be unique.
250                       type: string
251                   type: object
252                 credentialsVersion:
253                   type: string
254               type: object
255             hardware:
256               description: The hardware discovered to exist on the host.
257               properties:
258                 cpu:
259                   description: CPU describes one processor on the host.
260                   properties:
261                     arch:
262                       type: string
263                     clockMegahertz:
264                       description: ClockSpeed is a clock speed in MHz
265                     count:
266                       type: integer
267                     flags:
268                       items:
269                         type: string
270                       type: array
271                     model:
272                       type: string
273                   required:
274                   - arch
275                   - clockMegahertz
276                   - count
277                   - flags
278                   - model
279                   type: object
280                 firmware:
281                   description: Firmware describes the firmware on the host.
282                   properties:
283                     bios:
284                       description: The BIOS for this firmware
285                       properties:
286                         date:
287                           description: The release/build date for this BIOS
288                           type: string
289                         vendor:
290                           description: The vendor name for this BIOS
291                           type: string
292                         version:
293                           description: The version of the BIOS
294                           type: string
295                       required:
296                       - date
297                       - vendor
298                       - version
299                       type: object
300                   required:
301                   - bios
302                   type: object
303                 hostname:
304                   type: string
305                 nics:
306                   items:
307                     description: NIC describes one network interface on the host.
308                     properties:
309                       ip:
310                         description: The IP address of the device
311                         type: string
312                       mac:
313                         description: The device MAC addr
314                         pattern: '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'
315                         type: string
316                       model:
317                         description: The name of the model, e.g. "virt-io"
318                         type: string
319                       name:
320                         description: The name of the NIC, e.g. "nic-1"
321                         type: string
322                       pxe:
323                         description: Whether the NIC is PXE Bootable
324                         type: boolean
325                       speedGbps:
326                         description: The speed of the device
327                         type: integer
328                       vlanId:
329                         description: The untagged VLAN ID
330                         format: int32
331                         type: integer
332                       vlans:
333                         description: The VLANs available
334                         items:
335                           description: VLAN represents the name and ID of a VLAN
336                           properties:
337                             id:
338                               description: VLANID is a 12-bit 802.1Q VLAN identifier
339                               format: int32
340                               type: integer
341                             name:
342                               type: string
343                           required:
344                           - id
345                           type: object
346                         type: array
347                     required:
348                     - ip
349                     - mac
350                     - model
351                     - name
352                     - pxe
353                     - speedGbps
354                     - vlanId
355                     type: object
356                   type: array
357                 ramMebibytes:
358                   type: integer
359                 storage:
360                   items:
361                     description: Storage describes one storage device (disk, SSD,
362                       etc.) on the host.
363                     properties:
364                       hctl:
365                         description: The SCSI location of the device
366                         type: string
367                       model:
368                         description: Hardware model
369                         type: string
370                       name:
371                         description: A name for the disk, e.g. "disk 1 (boot)"
372                         type: string
373                       rotational:
374                         description: Whether this disk represents rotational storage
375                         type: boolean
376                       serialNumber:
377                         description: The serial number of the device
378                         type: string
379                       sizeBytes:
380                         description: The size of the disk in Bytes
381                         format: int64
382                         type: integer
383                       vendor:
384                         description: The name of the vendor of the device
385                         type: string
386                       wwn:
387                         description: The WWN of the device
388                         type: string
389                       wwnVendorExtension:
390                         description: The WWN Vendor extension of the device
391                         type: string
392                       wwnWithExtension:
393                         description: The WWN with the extension
394                         type: string
395                     required:
396                     - name
397                     - rotational
398                     - serialNumber
399                     - sizeBytes
400                     type: object
401                   type: array
402                 systemVendor:
403                   description: HardwareSystemVendor stores details about the whole
404                     hardware system.
405                   properties:
406                     manufacturer:
407                       type: string
408                     productName:
409                       type: string
410                     serialNumber:
411                       type: string
412                   required:
413                   - manufacturer
414                   - productName
415                   - serialNumber
416                   type: object
417               required:
418               - cpu
419               - firmware
420               - hostname
421               - nics
422               - ramMebibytes
423               - storage
424               - systemVendor
425               type: object
426             hardwareProfile:
427               description: The name of the profile matching the hardware details.
428               type: string
429             lastUpdated:
430               description: LastUpdated identifies when this status was last observed.
431               format: date-time
432               type: string
433             operationHistory:
434               description: OperationHistory holds information about operations performed
435                 on this host.
436               properties:
437                 deprovision:
438                   description: OperationMetric contains metadata about an operation
439                     (inspection, provisioning, etc.) used for tracking metrics.
440                   properties:
441                     end:
442                       format: date-time
443                       nullable: true
444                       type: string
445                     start:
446                       format: date-time
447                       nullable: true
448                       type: string
449                   type: object
450                 inspect:
451                   description: OperationMetric contains metadata about an operation
452                     (inspection, provisioning, etc.) used for tracking metrics.
453                   properties:
454                     end:
455                       format: date-time
456                       nullable: true
457                       type: string
458                     start:
459                       format: date-time
460                       nullable: true
461                       type: string
462                   type: object
463                 provision:
464                   description: OperationMetric contains metadata about an operation
465                     (inspection, provisioning, etc.) used for tracking metrics.
466                   properties:
467                     end:
468                       format: date-time
469                       nullable: true
470                       type: string
471                     start:
472                       format: date-time
473                       nullable: true
474                       type: string
475                   type: object
476                 register:
477                   description: OperationMetric contains metadata about an operation
478                     (inspection, provisioning, etc.) used for tracking metrics.
479                   properties:
480                     end:
481                       format: date-time
482                       nullable: true
483                       type: string
484                     start:
485                       format: date-time
486                       nullable: true
487                       type: string
488                   type: object
489               type: object
490             operationalStatus:
491               description: OperationalStatus holds the status of the host
492               enum:
493               - ""
494               - OK
495               - discovered
496               - error
497               type: string
498             poweredOn:
499               description: indicator for whether or not the host is powered on
500               type: boolean
501             provisioning:
502               description: Information tracked by the provisioner.
503               properties:
504                 ID:
505                   description: The machine's UUID from the underlying provisioning
506                     tool
507                   type: string
508                 image:
509                   description: Image holds the details of the last image successfully
510                     provisioned to the host.
511                   properties:
512                     checksum:
513                       description: Checksum is the checksum for the image.
514                       type: string
515                     url:
516                       description: URL is a location of an image to deploy.
517                       type: string
518                   required:
519                   - checksum
520                   - url
521                   type: object
522                 state:
523                   description: An indiciator for what the provisioner is doing with
524                     the host.
525                   type: string
526               required:
527               - ID
528               - state
529               type: object
530             triedCredentials:
531               description: the last credentials we sent to the provisioning backend
532               properties:
533                 credentials:
534                   description: SecretReference represents a Secret Reference. It has
535                     enough information to retrieve secret in any namespace
536                   properties:
537                     name:
538                       description: Name is unique within a namespace to reference
539                         a secret resource.
540                       type: string
541                     namespace:
542                       description: Namespace defines the space within which the secret
543                         name must be unique.
544                       type: string
545                   type: object
546                 credentialsVersion:
547                   type: string
548               type: object
549           required:
550           - errorMessage
551           - hardwareProfile
552           - operationHistory
553           - operationalStatus
554           - poweredOn
555           - provisioning
556           type: object
557       type: object
558   version: v1alpha1
559   versions:
560   - name: v1alpha1
561     served: true
562     storage: true