· 6 years ago · Mar 24, 2020, 08:48 PM
1code:
2
3if err := yaml.Unmarshal([]byte(entry), &obj); err != nil {
4 panic(fmt.Errorf("%v, this was data : \n%s", err, entry))
5 }
6
7
8
9
10
11output:
12
13
14panic: error converting YAML to JSON: yaml: line 88: did not find expected key, this was data :
15apiVersion: apiextensions.k8s.io/v1beta1
16kind: CustomResourceDefinition
17metadata:
18 labels:
19 kubevirt.io: ""
20 name: virtualmachines.kubevirt.io
21spec:
22 additionalPrinterColumns:
23 - JSONPath: .metadata.creationTimestamp
24 name: Age
25 type: date
26 - JSONPath: .spec.running
27 name: Running
28 type: boolean
29 - JSONPath: .spec.volumes[0].name
30 description: Primary Volume
31 name: Volume
32 type: string
33 - JSONPath: .status.created
34 name: Created
35 priority: 1
36 type: boolean
37 group: kubevirt.io
38 names:
39 categories:
40 - all
41 kind: VirtualMachine
42 plural: virtualmachines
43 shortNames:
44 - vm
45 - vms
46 singular: virtualmachine
47 preserveUnknownFields: false
48 scope: Namespaced
49 validation:
50 openAPIV3Schema:
51 description: VirtualMachine handles the VirtualMachines that are not running
52 or are in a stopped state The VirtualMachine contains the template to create
53 the VirtualMachineInstance. It also mirrors the running state of the created
54 VirtualMachineInstance in its status.
55 properties:
56 apiVersion:
57 description: 'APIVersion defines the versioned schema of this representation
58 of an object. Servers should convert recognized schemas to the latest
59 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
60 type: string
61 kind:
62 description: 'Kind is a string value representing the REST resource this
63 object represents. Servers may infer this from the endpoint the client
64 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
65 type: string
66 metadata:
67 type: object
68 spec:
69 description: Spec contains the specification of VirtualMachineInstance created
70 properties:
71 dataVolumeTemplates:
72 description: dataVolumeTemplates is a list of dataVolumes that the VirtualMachineInstance
73 template can reference. DataVolumes in this list are dynamically created
74 for the VirtualMachine and are tied to the VirtualMachine's life-cycle.
75 items:
76 description: DataVolume provides a representation of our data volume
77 properties:
78 apiVersion:
79 description: 'APIVersion defines the versioned schema of this
80 representation of an object. Servers should convert recognized
81 schemas to the latest internal value, and may reject unrecognized
82 values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
83 type: string
84 kind:
85 description: 'Kind is a string value representing the REST resource
86 this object represents. Servers may infer this from the endpoint
87 the client submits requests to. Cannot be updated. In CamelCase.
88 More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
89 type: string
90 metadata:
91 type: object
92 spec:
93 description: DataVolumeSpec defines our specification for a DataVolume
94 type
95 properties:
96 contentType:
97 description: 'DataVolumeContentType options: "kubevirt", "archive"
98 type: string
99 pvc:
100 description: PVC is a pointer to the PVC Spec we want to use
101 properties:
102 accessModes:
103 description: 'AccessModes contains the desired access
104 modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
105 items:
106 type: string
107 type: array
108 dataSource:
109 description: This field requires the VolumeSnapshotDataSource
110 alpha feature gate to be enabled and currently VolumeSnapshot
111 is the only supported data source. If the provisioner
112 can support VolumeSnapshot data source, it will create
113 a new volume and data will be restored to the volume
114 at the same time. If the provisioner does not support
115 VolumeSnapshot data source, volume will not be created
116 and the failure will be reported as an event. In the
117 future, we plan to support more data source types and
118 the behavior of the provisioner may change.
119 properties:
120 apiGroup:
121 description: APIGroup is the group for the resource
122 being referenced. If APIGroup is not specified,
123 the specified Kind must be in the core API group.
124 For any other third-party types, APIGroup is required.
125 type: string
126 kind:
127 description: Kind is the type of resource being referenced
128 type: string
129 name:
130 description: Name is the name of resource being referenced
131 type: string
132 required:
133 - kind
134 - name
135 type: object
136 resources:
137 description: 'Resources represents the minimum resources
138 the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
139 properties:
140 limits:
141 additionalProperties:
142 type: string
143 description: 'Limits describes the maximum amount
144 of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
145 type: object
146 requests:
147 additionalProperties:
148 type: string
149 description: 'Requests describes the minimum amount
150 of compute resources required. If Requests is omitted
151 for a container, it defaults to Limits if that is
152 explicitly specified, otherwise to an implementation-defined
153 value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
154 type: object
155 type: object
156 selector:
157 description: A label query over volumes to consider for
158 binding.
159 properties:
160 matchExpressions:
161 description: matchExpressions is a list of label selector
162 requirements. The requirements are ANDed.
163 items:
164 description: A label selector requirement is a selector
165 that contains values, a key, and an operator that
166 relates the key and values.
167 properties:
168 key:
169 description: key is the label key that the selector
170 applies to.
171 type: string
172 operator:
173 description: operator represents a key's relationship
174 to a set of values. Valid operators are In,
175 NotIn, Exists and DoesNotExist.
176 type: string
177 values:
178 description: values is an array of string values.
179 If the operator is In or NotIn, the values
180 array must be non-empty. If the operator is
181 Exists or DoesNotExist, the values array must
182 be empty. This array is replaced during a
183 strategic merge patch.
184 items:
185 type: string
186 type: array
187 required:
188 - key
189 - operator
190 type: object
191 type: array
192 matchLabels:
193 additionalProperties:
194 type: string
195 description: matchLabels is a map of {key,value} pairs.
196 A single {key,value} in the matchLabels map is equivalent
197 to an element of matchExpressions, whose key field
198 is "key", the operator is "In", and the values array
199 contains only "value". The requirements are ANDed.
200 type: object
201 type: object
202 storageClassName:
203 description: 'Name of the StorageClass required by the
204 claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
205 type: string
206 volumeMode:
207 description: volumeMode defines what type of volume is
208 required by the claim. Value of Filesystem is implied
209 when not included in claim spec. This is a beta feature.
210 type: string
211 volumeName:
212 description: VolumeName is the binding reference to the
213 PersistentVolume backing this claim.
214 type: string
215 type: object
216 source:
217 description: Source is the src of the data for the requested
218 DataVolume
219 properties:
220 blank:
221 description: DataVolumeBlankImage provides the parameters
222 to create a new raw blank image for the PVC
223 type: object
224 http:
225 description: DataVolumeSourceHTTP provides the parameters
226 to create a Data Volume from an HTTP source
227 properties:
228 certConfigMap:
229 description: CertConfigMap provides a reference to
230 the Registry certs
231 type: string
232 secretRef:
233 description: SecretRef provides the secret reference
234 needed to access the HTTP source
235 type: string
236 url:
237 description: URL is the URL of the http source
238 type: string
239 type: object
240 pvc:
241 description: DataVolumeSourcePVC provides the parameters
242 to create a Data Volume from an existing PVC
243 properties:
244 name:
245 type: string
246 namespace:
247 type: string
248 type: object
249 registry:
250 description: DataVolumeSourceRegistry provides the parameters
251 to create a Data Volume from an registry source
252 properties:
253 certConfigMap:
254 description: CertConfigMap provides a reference to
255 the Registry certs
256 type: string
257 secretRef:
258 description: SecretRef provides the secret reference
259 needed to access the Registry source
260 type: string
261 url:
262 description: URL is the url of the Registry source
263 type: string
264 type: object
265 s3:
266 description: DataVolumeSourceS3 provides the parameters
267 to create a Data Volume from an S3 source
268 properties:
269 secretRef:
270 description: SecretRef provides the secret reference
271 needed to access the S3 source
272 type: string
273 url:
274 description: URL is the url of the S3 source
275 type: string
276 type: object
277 upload:
278 description: DataVolumeSourceUpload provides the parameters
279 to create a Data Volume by uploading the source
280 type: object
281 type: object
282 required:
283 - pvc
284 - source
285 type: object
286 status:
287 description: DataVolumeStatus provides the parameters to store
288 the phase of the Data Volume
289 properties:
290 phase:
291 description: Phase is the current phase of the data volume
292 type: string
293 progress:
294 description: DataVolumeProgress is the current progress of
295 the DataVolume transfer operation. Value between 0 and 100
296 inclusive
297 type: string
298 type: object
299 required:
300 - spec
301 type: object
302 type: array
303 runStrategy:
304 description: Running state indicates the requested running state of
305 the VirtualMachineInstance mutually exclusive with Running
306 type: string
307 running:
308 description: Running controls whether the associatied VirtualMachineInstance
309 is created or not Mutually exclusive with RunStrategy
310 type: boolean
311 template:
312 description: Template is the direct specification of VirtualMachineInstance
313 properties:
314 metadata:
315 type: object
316 spec:
317 description: VirtualMachineInstance Spec contains the VirtualMachineInstance
318 specification.
319 properties:
320 affinity:
321 description: If affinity is specifies, obey all the affinity
322 rules
323 properties:
324 nodeAffinity:
325 description: Describes node affinity scheduling rules for
326 the pod.
327 properties:
328 preferredDuringSchedulingIgnoredDuringExecution:
329 description: The scheduler will prefer to schedule pods
330 to nodes that satisfy the affinity expressions specified
331 by this field, but it may choose a node that violates
332 one or more of the expressions. The node that is most
333 preferred is the one with the greatest sum of weights,
334 i.e. for each node that meets all of the scheduling
335 requirements (resource request, requiredDuringScheduling
336 affinity expressions, etc.), compute a sum by iterating
337 through the elements of this field and adding "weight"
338 to the sum if the node matches the corresponding matchExpressions;
339 the node(s) with the highest sum are the most preferred.
340 items:
341 description: An empty preferred scheduling term matches
342 all objects with implicit weight 0 (i.e. it's a
343 no-op). A null preferred scheduling term matches
344 no objects (i.e. is also a no-op).
345 properties:
346 preference:
347 description: A node selector term, associated
348 with the corresponding weight.
349 properties:
350 matchExpressions:
351 description: A list of node selector requirements
352 by node's labels.
353 items:
354 description: A node selector requirement
355 is a selector that contains values, a
356 key, and an operator that relates the
357 key and values.
358 properties:
359 key:
360 description: The label key that the
361 selector applies to.
362 type: string
363 operator:
364 description: Represents a key's relationship
365 to a set of values. Valid operators
366 are In, NotIn, Exists, DoesNotExist.
367 Gt, and Lt.
368 type: string
369 values:
370 description: An array of string values.
371 If the operator is In or NotIn, the
372 values array must be non-empty. If
373 the operator is Exists or DoesNotExist,
374 the values array must be empty. If
375 the operator is Gt or Lt, the values
376 array must have a single element,
377 which will be interpreted as an integer.
378 This array is replaced during a strategic
379 merge patch.
380 items:
381 type: string
382 type: array
383 required:
384 - key
385 - operator
386 type: object
387 type: array
388 matchFields:
389 description: A list of node selector requirements
390 by node's fields.
391 items:
392 description: A node selector requirement
393 is a selector that contains values, a
394 key, and an operator that relates the
395 key and values.
396 properties:
397 key:
398 description: The label key that the
399 selector applies to.
400 type: string
401 operator:
402 description: Represents a key's relationship
403 to a set of values. Valid operators
404 are In, NotIn, Exists, DoesNotExist.
405 Gt, and Lt.
406 type: string
407 values:
408 description: An array of string values.
409 If the operator is In or NotIn, the
410 values array must be non-empty. If
411 the operator is Exists or DoesNotExist,
412 the values array must be empty. If
413 the operator is Gt or Lt, the values
414 array must have a single element,
415 which will be interpreted as an integer.
416 This array is replaced during a strategic
417 merge patch.
418 items:
419 type: string
420 type: array
421 required:
422 - key
423 - operator
424 type: object
425 type: array
426 type: object
427 weight:
428 description: Weight associated with matching the
429 corresponding nodeSelectorTerm, in the range
430 1-100.
431 format: int32
432 type: integer
433 required:
434 - preference
435 - weight
436 type: object
437 type: array
438 requiredDuringSchedulingIgnoredDuringExecution:
439 description: If the affinity requirements specified
440 by this field are not met at scheduling time, the
441 pod will not be scheduled onto the node. If the affinity
442 requirements specified by this field cease to be met
443 at some point during pod execution (e.g. due to an
444 update), the system may or may not try to eventually
445 evict the pod from its node.
446 properties:
447 nodeSelectorTerms:
448 description: Required. A list of node selector terms.
449 The terms are ORed.
450 items:
451 description: A null or empty node selector term
452 matches no objects. The requirements of them
453 are ANDed. The TopologySelectorTerm type implements
454 a subset of the NodeSelectorTerm.
455 properties:
456 matchExpressions:
457 description: A list of node selector requirements
458 by node's labels.
459 items:
460 description: A node selector requirement
461 is a selector that contains values, a
462 key, and an operator that relates the
463 key and values.
464 properties:
465 key:
466 description: The label key that the
467 selector applies to.
468 type: string
469 operator:
470 description: Represents a key's relationship
471 to a set of values. Valid operators
472 are In, NotIn, Exists, DoesNotExist.
473 Gt, and Lt.
474 type: string
475 values:
476 description: An array of string values.
477 If the operator is In or NotIn, the
478 values array must be non-empty. If
479 the operator is Exists or DoesNotExist,
480 the values array must be empty. If
481 the operator is Gt or Lt, the values
482 array must have a single element,
483 which will be interpreted as an integer.
484 This array is replaced during a strategic
485 merge patch.
486 items:
487 type: string
488 type: array
489 required:
490 - key
491 - operator
492 type: object
493 type: array
494 matchFields:
495 description: A list of node selector requirements
496 by node's fields.
497 items:
498 description: A node selector requirement
499 is a selector that contains values, a
500 key, and an operator that relates the
501 key and values.
502 properties:
503 key:
504 description: The label key that the
505 selector applies to.
506 type: string
507 operator:
508 description: Represents a key's relationship
509 to a set of values. Valid operators
510 are In, NotIn, Exists, DoesNotExist.
511 Gt, and Lt.
512 type: string
513 values:
514 description: An array of string values.
515 If the operator is In or NotIn, the
516 values array must be non-empty. If
517 the operator is Exists or DoesNotExist,
518 the values array must be empty. If
519 the operator is Gt or Lt, the values
520 array must have a single element,
521 which will be interpreted as an integer.
522 This array is replaced during a strategic
523 merge patch.
524 items:
525 type: string
526 type: array
527 required:
528 - key
529 - operator
530 type: object
531 type: array
532 type: object
533 type: array
534 required:
535 - nodeSelectorTerms
536 type: object
537 type: object
538 podAffinity:
539 description: Describes pod affinity scheduling rules (e.g.
540 co-locate this pod in the same node, zone, etc. as some
541 other pod(s)).
542 properties:
543 preferredDuringSchedulingIgnoredDuringExecution:
544 description: The scheduler will prefer to schedule pods
545 to nodes that satisfy the affinity expressions specified
546 by this field, but it may choose a node that violates
547 one or more of the expressions. The node that is most
548 preferred is the one with the greatest sum of weights,
549 i.e. for each node that meets all of the scheduling
550 requirements (resource request, requiredDuringScheduling
551 affinity expressions, etc.), compute a sum by iterating
552 through the elements of this field and adding "weight"
553 to the sum if the node has pods which matches the
554 corresponding podAffinityTerm; the node(s) with the
555 highest sum are the most preferred.
556 items:
557 description: The weights of all of the matched WeightedPodAffinityTerm
558 fields are added per-node to find the most preferred
559 node(s)
560 properties:
561 podAffinityTerm:
562 description: Required. A pod affinity term, associated
563 with the corresponding weight.
564 properties:
565 labelSelector:
566 description: A label query over a set of resources,
567 in this case pods.
568 properties:
569 matchExpressions:
570 description: matchExpressions is a list
571 of label selector requirements. The
572 requirements are ANDed.
573 items:
574 description: A label selector requirement
575 is a selector that contains values,
576 a key, and an operator that relates
577 the key and values.
578 properties:
579 key:
580 description: key is the label key
581 that the selector applies to.
582 type: string
583 operator:
584 description: operator represents
585 a key's relationship to a set
586 of values. Valid operators are
587 In, NotIn, Exists and DoesNotExist.
588 type: string
589 values:
590 description: values is an array
591 of string values. If the operator
592 is In or NotIn, the values array
593 must be non-empty. If the operator
594 is Exists or DoesNotExist, the
595 values array must be empty. This
596 array is replaced during a strategic
597 merge patch.
598 items:
599 type: string
600 type: array
601 required:
602 - key
603 - operator
604 type: object
605 type: array
606 matchLabels:
607 additionalProperties:
608 type: string
609 description: matchLabels is a map of {key,value}
610 pairs. A single {key,value} in the matchLabels
611 map is equivalent to an element of matchExpressions,
612 whose key field is "key", the operator
613 is "In", and the values array contains
614 only "value". The requirements are ANDed.
615 type: object
616 type: object
617 namespaces:
618 description: namespaces specifies which namespaces
619 the labelSelector applies to (matches against);
620 null or empty list means "this pod's namespace"
621 items:
622 type: string
623 type: array
624 topologyKey:
625 description: This pod should be co-located
626 (affinity) or not co-located (anti-affinity)
627 with the pods matching the labelSelector
628 in the specified namespaces, where co-located
629 is defined as running on a node whose value
630 of the label with key topologyKey matches
631 that of any node on which any of the selected
632 pods is running. Empty topologyKey is not
633 allowed.
634 type: string
635 required:
636 - topologyKey
637 type: object
638 weight:
639 description: weight associated with matching the
640 corresponding podAffinityTerm, in the range
641 1-100.
642 format: int32
643 type: integer
644 required:
645 - podAffinityTerm
646 - weight
647 type: object
648 type: array
649 requiredDuringSchedulingIgnoredDuringExecution:
650 description: If the affinity requirements specified
651 by this field are not met at scheduling time, the
652 pod will not be scheduled onto the node. If the affinity
653 requirements specified by this field cease to be met
654 at some point during pod execution (e.g. due to a
655 pod label update), the system may or may not try to
656 eventually evict the pod from its node. When there
657 are multiple elements, the lists of nodes corresponding
658 to each podAffinityTerm are intersected, i.e. all
659 terms must be satisfied.
660 items:
661 description: Defines a set of pods (namely those matching
662 the labelSelector relative to the given namespace(s))
663 that this pod should be co-located (affinity) or
664 not co-located (anti-affinity) with, where co-located
665 is defined as running on a node whose value of the
666 label with key <topologyKey> matches that of any
667 node on which a pod of the set of pods is running
668 properties:
669 labelSelector:
670 description: A label query over a set of resources,
671 in this case pods.
672 properties:
673 matchExpressions:
674 description: matchExpressions is a list of
675 label selector requirements. The requirements
676 are ANDed.
677 items:
678 description: A label selector requirement
679 is a selector that contains values, a
680 key, and an operator that relates the
681 key and values.
682 properties:
683 key:
684 description: key is the label key that
685 the selector applies to.
686 type: string
687 operator:
688 description: operator represents a key's
689 relationship to a set of values. Valid
690 operators are In, NotIn, Exists and
691 DoesNotExist.
692 type: string
693 values:
694 description: values is an array of string
695 values. If the operator is In or NotIn,
696 the values array must be non-empty.
697 If the operator is Exists or DoesNotExist,
698 the values array must be empty. This
699 array is replaced during a strategic
700 merge patch.
701 items:
702 type: string
703 type: array
704 required:
705 - key
706 - operator
707 type: object
708 type: array
709 matchLabels:
710 additionalProperties:
711 type: string
712 description: matchLabels is a map of {key,value}
713 pairs. A single {key,value} in the matchLabels
714 map is equivalent to an element of matchExpressions,
715 whose key field is "key", the operator is
716 "In", and the values array contains only
717 "value". The requirements are ANDed.
718 type: object
719 type: object
720 namespaces:
721 description: namespaces specifies which namespaces
722 the labelSelector applies to (matches against);
723 null or empty list means "this pod's namespace"
724 items:
725 type: string
726 type: array
727 topologyKey:
728 description: This pod should be co-located (affinity)
729 or not co-located (anti-affinity) with the pods
730 matching the labelSelector in the specified
731 namespaces, where co-located is defined as running
732 on a node whose value of the label with key
733 topologyKey matches that of any node on which
734 any of the selected pods is running. Empty topologyKey
735 is not allowed.
736 type: string
737 required:
738 - topologyKey
739 type: object
740 type: array
741 type: object
742 podAntiAffinity:
743 description: Describes pod anti-affinity scheduling rules
744 (e.g. avoid putting this pod in the same node, zone, etc.
745 as some other pod(s)).
746 properties:
747 preferredDuringSchedulingIgnoredDuringExecution:
748 description: The scheduler will prefer to schedule pods
749 to nodes that satisfy the anti-affinity expressions
750 specified by this field, but it may choose a node
751 that violates one or more of the expressions. The
752 node that is most preferred is the one with the greatest
753 sum of weights, i.e. for each node that meets all
754 of the scheduling requirements (resource request,
755 requiredDuringScheduling anti-affinity expressions,
756 etc.), compute a sum by iterating through the elements
757 of this field and adding "weight" to the sum if the
758 node has pods which matches the corresponding podAffinityTerm;
759 the node(s) with the highest sum are the most preferred.
760 items:
761 description: The weights of all of the matched WeightedPodAffinityTerm
762 fields are added per-node to find the most preferred
763 node(s)
764 properties:
765 podAffinityTerm:
766 description: Required. A pod affinity term, associated
767 with the corresponding weight.
768 properties:
769 labelSelector:
770 description: A label query over a set of resources,
771 in this case pods.
772 properties:
773 matchExpressions:
774 description: matchExpressions is a list
775 of label selector requirements. The
776 requirements are ANDed.
777 items:
778 description: A label selector requirement
779 is a selector that contains values,
780 a key, and an operator that relates
781 the key and values.
782 properties:
783 key:
784 description: key is the label key
785 that the selector applies to.
786 type: string
787 operator:
788 description: operator represents
789 a key's relationship to a set
790 of values. Valid operators are
791 In, NotIn, Exists and DoesNotExist.
792 type: string
793 values:
794 description: values is an array
795 of string values. If the operator
796 is In or NotIn, the values array
797 must be non-empty. If the operator
798 is Exists or DoesNotExist, the
799 values array must be empty. This
800 array is replaced during a strategic
801 merge patch.
802 items:
803 type: string
804 type: array
805 required:
806 - key
807 - operator
808 type: object
809 type: array
810 matchLabels:
811 additionalProperties:
812 type: string
813 description: matchLabels is a map of {key,value}
814 pairs. A single {key,value} in the matchLabels
815 map is equivalent to an element of matchExpressions,
816 whose key field is "key", the operator
817 is "In", and the values array contains
818 only "value". The requirements are ANDed.
819 type: object
820 type: object
821 namespaces:
822 description: namespaces specifies which namespaces
823 the labelSelector applies to (matches against);
824 null or empty list means "this pod's namespace"
825 items:
826 type: string
827 type: array
828 topologyKey:
829 description: This pod should be co-located
830 (affinity) or not co-located (anti-affinity)
831 with the pods matching the labelSelector
832 in the specified namespaces, where co-located
833 is defined as running on a node whose value
834 of the label with key topologyKey matches
835 that of any node on which any of the selected
836 pods is running. Empty topologyKey is not
837 allowed.
838 type: string
839 required:
840 - topologyKey
841 type: object
842 weight:
843 description: weight associated with matching the
844 corresponding podAffinityTerm, in the range
845 1-100.
846 format: int32
847 type: integer
848 required:
849 - podAffinityTerm
850 - weight
851 type: object
852 type: array
853 requiredDuringSchedulingIgnoredDuringExecution:
854 description: If the anti-affinity requirements specified
855 by this field are not met at scheduling time, the
856 pod will not be scheduled onto the node. If the anti-affinity
857 requirements specified by this field cease to be met
858 at some point during pod execution (e.g. due to a
859 pod label update), the system may or may not try to
860 eventually evict the pod from its node. When there
861 are multiple elements, the lists of nodes corresponding
862 to each podAffinityTerm are intersected, i.e. all
863 terms must be satisfied.
864 items:
865 description: Defines a set of pods (namely those matching
866 the labelSelector relative to the given namespace(s))
867 that this pod should be co-located (affinity) or
868 not co-located (anti-affinity) with, where co-located
869 is defined as running on a node whose value of the
870 label with key <topologyKey> matches that of any
871 node on which a pod of the set of pods is running
872 properties:
873 labelSelector:
874 description: A label query over a set of resources,
875 in this case pods.
876 properties:
877 matchExpressions:
878 description: matchExpressions is a list of
879 label selector requirements. The requirements
880 are ANDed.
881 items:
882 description: A label selector requirement
883 is a selector that contains values, a
884 key, and an operator that relates the
885 key and values.
886 properties:
887 key:
888 description: key is the label key that
889 the selector applies to.
890 type: string
891 operator:
892 description: operator represents a key's
893 relationship to a set of values. Valid
894 operators are In, NotIn, Exists and
895 DoesNotExist.
896 type: string
897 values:
898 description: values is an array of string
899 values. If the operator is In or NotIn,
900 the values array must be non-empty.
901 If the operator is Exists or DoesNotExist,
902 the values array must be empty. This
903 array is replaced during a strategic
904 merge patch.
905 items:
906 type: string
907 type: array
908 required:
909 - key
910 - operator
911 type: object
912 type: array
913 matchLabels:
914 additionalProperties:
915 type: string
916 description: matchLabels is a map of {key,value}
917 pairs. A single {key,value} in the matchLabels
918 map is equivalent to an element of matchExpressions,
919 whose key field is "key", the operator is
920 "In", and the values array contains only
921 "value". The requirements are ANDed.
922 type: object
923 type: object
924 namespaces:
925 description: namespaces specifies which namespaces
926 the labelSelector applies to (matches against);
927 null or empty list means "this pod's namespace"
928 items:
929 type: string
930 type: array
931 topologyKey:
932 description: This pod should be co-located (affinity)
933 or not co-located (anti-affinity) with the pods
934 matching the labelSelector in the specified
935 namespaces, where co-located is defined as running
936 on a node whose value of the label with key
937 topologyKey matches that of any node on which
938 any of the selected pods is running. Empty topologyKey
939 is not allowed.
940 type: string
941 required:
942 - topologyKey
943 type: object
944 type: array
945 type: object
946 type: object
947 dnsConfig:
948 description: Specifies the DNS parameters of a pod. Parameters
949 specified here will be merged to the generated DNS configuration
950 based on DNSPolicy.
951 properties:
952 nameservers:
953 description: A list of DNS name server IP addresses. This
954 will be appended to the base nameservers generated from
955 DNSPolicy. Duplicated nameservers will be removed.
956 items:
957 type: string
958 type: array
959 options:
960 description: A list of DNS resolver options. This will be
961 merged with the base options generated from DNSPolicy.
962 Duplicated entries will be removed. Resolution options
963 given in Options will override those that appear in the
964 base DNSPolicy.
965 items:
966 description: PodDNSConfigOption defines DNS resolver options
967 of a pod.
968 properties:
969 name:
970 description: Required.
971 type: string
972 value:
973 type: string
974 type: object
975 type: array
976 searches:
977 description: A list of DNS search domains for host-name
978 lookup. This will be appended to the base search paths
979 generated from DNSPolicy. Duplicated search paths will
980 be removed.
981 items:
982 type: string
983 type: array
984 type: object
985 dnsPolicy:
986 description: Set DNS policy for the pod. Defaults to "ClusterFirst".
987 Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst',
988 'Default' or 'None'. DNS parameters given in DNSConfig will
989 be merged with the policy selected with DNSPolicy. To have
990 DNS options set along with hostNetwork, you have to specify
991 DNS policy explicitly to 'ClusterFirstWithHostNet'.
992 type: string
993 domain:
994 description: Specification of the desired behavior of the VirtualMachineInstance
995 on the host.
996 properties:
997 chassis:
998 description: Chassis specifies the chassis info passed to
999 the domain.
1000 properties:
1001 asset:
1002 type: string
1003 manufacturer:
1004 type: string
1005 serial:
1006 type: string
1007 sku:
1008 type: string
1009 version:
1010 type: string
1011 type: object
1012 clock:
1013 description: Clock sets the clock and timers of the vmi.
1014 properties:
1015 hpet:
1016 description: HPET (High Precision Event Timer) - multiple
1017 timers with periodic interrupts.
1018 properties:
1019 present:
1020 description: Enabled set to false makes sure that
1021 the machine type or a preset can't add the timer.
1022 Defaults to true.
1023 type: boolean
1024 tickPolicy:
1025 description: TickPolicy determines what happens
1026 when QEMU misses a deadline for injecting a tick
1027 to the guest. One of "delay", "catchup", "merge",
1028 "discard".
1029 type: string
1030 type: object
1031 hyperv:
1032 description: Hyperv (Hypervclock) - lets guests read
1033 the host’s wall clock time (paravirtualized). For
1034 windows guests.
1035 properties:
1036 present:
1037 description: Enabled set to false makes sure that
1038 the machine type or a preset can't add the timer.
1039 Defaults to true.
1040 type: boolean
1041 type: object
1042 kvm:
1043 description: "KVM \t(KVM clock) - lets guests read the
1044 host’s wall clock time (paravirtualized). For linux
1045 guests."
1046 properties:
1047 present:
1048 description: Enabled set to false makes sure that
1049 the machine type or a preset can't add the timer.
1050 Defaults to true.
1051 type: boolean
1052 type: object
1053 pit:
1054 description: PIT (Programmable Interval Timer) - a timer
1055 with periodic interrupts.
1056 properties:
1057 present:
1058 description: Enabled set to false makes sure that
1059 the machine type or a preset can't add the timer.
1060 Defaults to true.
1061 type: boolean
1062 tickPolicy:
1063 description: TickPolicy determines what happens
1064 when QEMU misses a deadline for injecting a tick
1065 to the guest. One of "delay", "catchup", "discard".
1066 type: string
1067 type: object
1068 rtc:
1069 description: RTC (Real Time Clock) - a continuously
1070 running timer with periodic interrupts.
1071 properties:
1072 present:
1073 description: Enabled set to false makes sure that
1074 the machine type or a preset can't add the timer.
1075 Defaults to true.
1076 type: boolean
1077 tickPolicy:
1078 description: TickPolicy determines what happens
1079 when QEMU misses a deadline for injecting a tick
1080 to the guest. One of "delay", "catchup".
1081 type: string
1082 track:
1083 description: Track the guest or the wall clock.
1084 type: string
1085 type: object
1086 timezone:
1087 description: Timezone sets the guest clock to the specified
1088 timezone. Zone name follows the TZ environment variable
1089 format (e.g. 'America/New_York').
1090 type: string
1091 utc:
1092 description: UTC sets the guest clock to UTC on each
1093 boot. If an offset is specified, guest changes to
1094 the clock will be kept during reboots and are not
1095 reset.
1096 properties:
1097 offsetSeconds:
1098 description: OffsetSeconds specifies an offset in
1099 seconds, relative to UTC. If set, guest changes
1100 to the clock will be kept during reboots and not
1101 reset.
1102 type: integer
1103 type: object
1104 type: object
1105 cpu:
1106 description: CPU allow specified the detailed CPU topology
1107 inside the vmi.
1108 properties:
1109 cores:
1110 description: Cores specifies the number of cores inside
1111 the vmi. Must be a value greater or equal 1.
1112 format: int32
1113 type: integer
1114 dedicatedCpuPlacement:
1115 description: DedicatedCPUPlacement requests the scheduler
1116 to place the VirtualMachineInstance on a node with
1117 enough dedicated pCPUs and pin the vCPUs to it.
1118 type: boolean
1119 features:
1120 description: Features specifies the CPU features list
1121 inside the VMI.
1122 items:
1123 description: CPUFeature allows specifying a CPU feature.
1124 properties:
1125 name:
1126 description: Name of the CPU feature
1127 type: string
1128 policy:
1129 description: 'Policy is the CPU feature attribute
1130 which can have the following attributes: force -
1131 The virtual CPU will claim the feature is supported
1132 regardless of it being supported by host CPU.
1133 require - Guest creation will fail unless the
1134 feature is supported by the host CPU or the
1135 hypervisor is able to emulate it. optional -
1136 The feature will be supported by virtual CPU
1137 if and only if it is supported by host CPU.
1138 disable - The feature will not be supported
1139 by virtual CPU. forbid - Guest creation will
1140 fail if the feature is supported by host CPU.
1141 Defaults to require'
1142 type: string
1143 type: object
1144 type: array
1145 isolateEmulatorThread:
1146 description: IsolateEmulatorThread requests one more
1147 dedicated pCPU to be allocated for the VMI to place
1148 the emulator thread on it.
1149 type: boolean
1150 model:
1151 description: Model specifies the CPU model inside the
1152 VMI. List of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map.
1153 It is possible to specify special cases like "host-passthrough"
1154 to get the same CPU as the node and "host-model" to
1155 get CPU closest to the node one. Defaults to host-model.
1156 type: string
1157 sockets:
1158 description: Sockets specifies the number of sockets
1159 inside the vmi. Must be a value greater or equal 1.
1160 format: int32
1161 type: integer
1162 threads:
1163 description: Threads specifies the number of threads
1164 inside the vmi. Must be a value greater or equal 1.
1165 format: int32
1166 type: integer
1167 type: object
1168 devices:
1169 description: Devices allows adding disks, network interfaces,
1170 ...
1171 properties:
1172 autoattachGraphicsDevice:
1173 description: Whether to attach the default graphics
1174 device or not. VNC will not be available if set to
1175 false. Defaults to true.
1176 type: boolean
1177 autoattachPodInterface:
1178 description: Whether to attach a pod network interface.
1179 Defaults to true.
1180 type: boolean
1181 autoattachSerialConsole:
1182 description: Whether to attach the default serial console
1183 or not. Serial console access will not be available
1184 if set to false. Defaults to true.
1185 type: boolean
1186 blockMultiQueue:
1187 description: Whether or not to enable virtio multi-queue
1188 for block devices
1189 type: boolean
1190 disks:
1191 description: Disks describes disks, cdroms, floppy and
1192 luns which are connected to the vmi.
1193 items:
1194 properties:
1195 bootOrder:
1196 description: BootOrder is an integer value > 0,
1197 used to determine ordering of boot devices.
1198 Lower values take precedence. Each disk or interface
1199 that has a boot order must have a unique value.
1200 Disks without a boot order are not tried if
1201 a disk with a boot order exists.
1202 type: integer
1203 cache:
1204 description: Cache specifies which kvm disk cache
1205 mode should be used.
1206 type: string
1207 cdrom:
1208 description: Attach a volume as a cdrom to the
1209 vmi.
1210 properties:
1211 bus:
1212 description: 'Bus indicates the type of disk
1213 device to emulate. supported values: virtio,
1214 sata, scsi.'
1215 type: string
1216 readonly:
1217 description: ReadOnly. Defaults to true.
1218 type: boolean
1219 tray:
1220 description: Tray indicates if the tray of
1221 the device is open or closed. Allowed values
1222 are "open" and "closed". Defaults to closed.
1223 type: string
1224 type: object
1225 dedicatedIOThread:
1226 description: dedicatedIOThread indicates this
1227 disk should have an exclusive IO Thread. Enabling
1228 this implies useIOThreads = true. Defaults to
1229 false.
1230 type: boolean
1231 disk:
1232 description: Attach a volume as a disk to the
1233 vmi.
1234 properties:
1235 bus:
1236 description: 'Bus indicates the type of disk
1237 device to emulate. supported values: virtio,
1238 sata, scsi.'
1239 type: string
1240 pciAddress:
1241 description: 'If specified, the virtual disk
1242 will be placed on the guests pci address
1243 with the specifed PCI address. For example:
1244 0000:81:01.10'
1245 type: string
1246 readonly:
1247 description: ReadOnly. Defaults to false.
1248 type: boolean
1249 type: object
1250 floppy:
1251 description: Attach a volume as a floppy to the
1252 vmi.
1253 properties:
1254 readonly:
1255 description: ReadOnly. Defaults to false.
1256 type: boolean
1257 tray:
1258 description: Tray indicates if the tray of
1259 the device is open or closed. Allowed values
1260 are "open" and "closed". Defaults to closed.
1261 type: string
1262 type: object
1263 lun:
1264 description: Attach a volume as a LUN to the vmi.
1265 properties:
1266 bus:
1267 description: 'Bus indicates the type of disk
1268 device to emulate. supported values: virtio,
1269 sata, scsi.'
1270 type: string
1271 readonly:
1272 description: ReadOnly. Defaults to false.
1273 type: boolean
1274 type: object
1275 name:
1276 description: Name is the device name
1277 type: string
1278 serial:
1279 description: Serial provides the ability to specify
1280 a serial number for the disk device.
1281 type: string
1282 type: object
1283 type: array
1284 gpus:
1285 description: Whether to attach a GPU device to the vmi.
1286 items:
1287 properties:
1288 deviceName:
1289 type: string
1290 name:
1291 description: Name of the GPU device as exposed
1292 by a device plugin
1293 type: string
1294 type: object
1295 type: array
1296 inputs:
1297 description: Inputs describe input devices
1298 items:
1299 properties:
1300 bus:
1301 description: 'Bus indicates the bus of input device
1302 to emulate. Supported values: virtio, usb.'
1303 type: string
1304 name:
1305 description: Name is the device name
1306 type: string
1307 type:
1308 description: 'Type indicated the type of input
1309 device. Supported values: tablet.'
1310 type: string
1311 type: object
1312 type: array
1313 interfaces:
1314 description: Interfaces describe network interfaces
1315 which are added to the vmi.
1316 items:
1317 properties:
1318 bootOrder:
1319 description: BootOrder is an integer value > 0,
1320 used to determine ordering of boot devices.
1321 Lower values take precedence. Each interface
1322 or disk that has a boot order must have a unique
1323 value. Interfaces without a boot order are not
1324 tried.
1325 type: integer
1326 bridge:
1327 type: object
1328 dhcpOptions:
1329 description: If specified the network interface
1330 will pass additional DHCP options to the VMI
1331 properties:
1332 bootFileName:
1333 description: If specified will pass option
1334 67 to interface's DHCP server
1335 type: string
1336 ntpServers:
1337 description: If specified will pass the configured
1338 NTP server to the VM via DHCP option 042.
1339 items:
1340 type: string
1341 type: array
1342 privateOptions:
1343 description: 'If specified will pass extra
1344 DHCP options for private use, range: 224-254'
1345 items:
1346 description: DHCPExtraOptions defines Extra
1347 DHCP options for a VM.
1348 properties:
1349 option:
1350 description: Option is an Integer value
1351 from 224-254 Required.
1352 type: integer
1353 value:
1354 description: Value is a String value
1355 for the Option provided Required.
1356 type: string
1357 type: object
1358 type: array
1359 tftpServerName:
1360 description: If specified will pass option
1361 66 to interface's DHCP server
1362 type: string
1363 type: object
1364 macAddress:
1365 description: 'Interface MAC address. For example:
1366 de:ad:00:00:be:af or DE-AD-00-00-BE-AF.'
1367 type: string
1368 masquerade:
1369 type: object
1370 model:
1371 description: 'Interface model. One of: e1000,
1372 e1000e, ne2k_pci, pcnet, rtl8139, virtio. Defaults
1373 to virtio. TODO:(ihar) switch to enums once
1374 opengen-api supports them. See: https://github.com/kubernetes/kube-openapi/issues/51'
1375 type: string
1376 name:
1377 description: Logical name of the interface as
1378 well as a reference to the associated networks.
1379 Must match the Name of a Network.
1380 type: string
1381 pciAddress:
1382 description: 'If specified, the virtual network
1383 interface will be placed on the guests pci address
1384 with the specifed PCI address. For example:
1385 0000:81:01.10'
1386 type: string
1387 ports:
1388 description: List of ports to be forwarded to
1389 the virtual machine.
1390 items:
1391 description: Port repesents a port to expose
1392 from the virtual machine. Default protocol
1393 TCP. The port field is mandatory
1394 properties:
1395 name:
1396 description: If specified, this must be
1397 an IANA_SVC_NAME and unique within the
1398 pod. Each named port in a pod must have
1399 a unique name. Name for the port that
1400 can be referred to by services.
1401 type: string
1402 port:
1403 description: Number of port to expose for
1404 the virtual machine. This must be a valid
1405 port number, 0 < x < 65536.
1406 format: int32
1407 type: integer
1408 protocol:
1409 description: Protocol for port. Must be
1410 UDP or TCP. Defaults to "TCP".
1411 type: string
1412 type: object
1413 type: array
1414 slirp:
1415 type: object
1416 sriov:
1417 type: object
1418 type: object
1419 type: array
1420 networkInterfaceMultiqueue:
1421 description: If specified, virtual network interfaces
1422 configured with a virtio bus will also enable the
1423 vhost multiqueue feature
1424 type: boolean
1425 rng:
1426 description: Whether to have random number generator
1427 from host
1428 type: object
1429 watchdog:
1430 description: Watchdog describes a watchdog device which
1431 can be added to the vmi.
1432 properties:
1433 i6300esb:
1434 description: i6300esb watchdog device.
1435 properties:
1436 action:
1437 description: The action to take. Valid values
1438 are poweroff, reset, shutdown. Defaults to
1439 reset.
1440 type: string
1441 type: object
1442 name:
1443 description: Name of the watchdog.
1444 type: string
1445 type: object
1446 type: object
1447 features:
1448 description: Features like acpi, apic, hyperv, smm.
1449 properties:
1450 acpi:
1451 description: ACPI enables/disables ACPI insidejsondata
1452 guest. Defaults to enabled.
1453 properties:
1454 enabled:
1455 description: Enabled determines if the feature should
1456 be enabled or disabled on the guest. Defaults
1457 to true.
1458 type: boolean
1459 type: object
1460 apic:
1461 description: Defaults to the machine type setting.
1462 properties:
1463 enabled:
1464 description: Enabled determines if the feature should
1465 be enabled or disabled on the guest. Defaults
1466 to true.
1467 type: boolean
1468 endOfInterrupt:
1469 description: EndOfInterrupt enables the end of interrupt
1470 notification in the guest. Defaults to false.
1471 type: boolean
1472 type: object
1473 hyperv:
1474 description: Defaults to the machine type setting.
1475 properties:
1476 evmcs:
1477 description: EVMCS Speeds up L2 vmexits, but disables
1478 other virtualization features. Requires vapic.
1479 Defaults to the machine type setting.
1480 properties:
1481 enabled:
1482 description: Enabled determines if the feature
1483 should be enabled or disabled on the guest.
1484 Defaults to true.
1485 type: boolean
1486 type: object
1487 frequencies:
1488 description: Frequencies improves the TSC clock
1489 source handling for Hyper-V on KVM. Defaults to
1490 the machine type setting.
1491 properties:
1492 enabled:
1493 description: Enabled determines if the feature
1494 should be enabled or disabled on the guest.
1495 Defaults to true.
1496 type: boolean
1497 type: object
1498 ipi:
1499 description: IPI improves performances in overcommited
1500 environments. Requires vpindex. Defaults to the
1501 machine type setting.
1502 properties:
1503 enabled:
1504 description: Enabled determines if the feature
1505 should be enabled or disabled on the guest.
1506 Defaults to true.
1507 type: boolean
1508 type: object
1509 reenlightenment:
1510 description: Reenlightenment enables the notifications
1511 on TSC frequency changes. Defaults to the machine
1512 type setting.
1513 properties:
1514 enabled:
1515 description: Enabled determines if the feature
1516 should be enabled or disabled on the guest.
1517 Defaults to true.
1518 type: boolean
1519 type: object
1520 relaxed:
1521 description: Relaxed instructs the guest OS to disable
1522 watchdog timeouts. Defaults to the machine type
1523 setting.
1524 properties:
1525 enabled:
1526 description: Enabled determines if the feature
1527 should be enabled or disabled on the guest.
1528 Defaults to true.
1529 type: boolean
1530 type: object
1531 reset:
1532 description: Reset enables Hyperv reboot/reset for
1533 the vmi. Requires synic. Defaults to the machine
1534 type setting.
1535 properties:
1536 enabled:
1537 description: Enabled determines if the feature
1538 should be enabled or disabled on the guest.
1539 Defaults to true.
1540 type: boolean
1541 type: object
1542 runtime:
1543 description: Runtime improves the time accounting
1544 to improve scheduling in the guest. Defaults to
1545 the machine type setting.
1546 properties:
1547 enabled:
1548 description: Enabled determines if the feature
1549 should be enabled or disabled on the guest.
1550 Defaults to true.
1551 type: boolean
1552 type: object
1553 spinlocks:
1554 description: Spinlocks allows to configure the spinlock
1555 retry attempts.
1556 properties:
1557 enabled:
1558 description: Enabled determines if the feature
1559 should be enabled or disabled on the guest.
1560 Defaults to true.
1561 type: boolean
1562 spinlocks:
1563 description: Retries indicates the number of
1564 retries. Must be a value greater or equal
1565 4096. Defaults to 4096.
1566 format: int32
1567 type: integer
1568 type: object
1569 synic:
1570 description: SyNIC enables the Synthetic Interrupt
1571 Controller. Defaults to the machine type setting.
1572 properties:
1573 enabled:
1574 description: Enabled determines if the feature
1575 should be enabled or disabled on the guest.
1576 Defaults to true.
1577 type: boolean
1578 type: object
1579 synictimer:
1580 description: SyNICTimer enables Synthetic Interrupt
1581 Controller Timers, reducing CPU load. Defaults
1582 to the machine type setting.
1583 properties:
1584 enabled:
1585 description: Enabled determines if the feature
1586 should be enabled or disabled on the guest.
1587 Defaults to true.
1588 type: boolean
1589 type: object
1590 tlbflush:
1591 description: TLBFlush improves performances in overcommited
1592 environments. Requires vpindex. Defaults to the
1593 machine type setting.
1594 properties:
1595 enabled:
1596 description: Enabled determines if the feature
1597 should be enabled or disabled on the guest.
1598 Defaults to true.
1599 type: boolean
1600 type: object
1601 vapic:
1602 description: VAPIC improves the paravirtualized
1603 handling of interrupts. Defaults to the machine
1604 type setting.
1605 properties:
1606 enabled:
1607 description: Enabled determines if the feature
1608 should be enabled or disabled on the guest.
1609 Defaults to true.
1610 type: boolean
1611 type: object
1612 vendorid:
1613 description: VendorID allows setting the hypervisor
1614 vendor id. Defaults to the machine type setting.
1615 properties:
1616 enabled:
1617 description: Enabled determines if the feature
1618 should be enabled or disabled on the guest.
1619 Defaults to true.
1620 type: boolean
1621 vendorid:
1622 description: VendorID sets the hypervisor vendor
1623 id, visible to the vmi. String up to twelve
1624 characters.
1625 type: string
1626 type: object
1627 vpindex:
1628 description: VPIndex enables the Virtual Processor
1629 Index to help windows identifying virtual processors.
1630 Defaults to the machine type setting.
1631 properties:
1632 enabled:
1633 description: Enabled determines if the feature
1634 should be enabled or disabled on the guest.
1635 Defaults to true.
1636 type: boolean
1637 type: object
1638 type: object
1639 smm:
1640 description: SMM enables/disables System Management
1641 Mode. TSEG not yet implemented.
1642 properties:
1643 enabled:
1644 description: Enabled determines if the feature should
1645 be enabled or disabled on the guest. Defaults
1646 to true.
1647 type: boolean
1648 type: object
1649 type: object
1650 firmware:
1651 description: Firmware.
1652 properties:
1653 bootloader:
1654 description: Settings to control the bootloader that
1655 is used.
1656 properties:
1657 bios:
1658 description: If set (default), BIOS will be used.
1659 type: object
1660 efi:
1661 description: If set, EFI will be used instead of
1662 BIOS.
1663 type: object
1664 type: object
1665 serial:
1666 description: The system-serial-number in SMBIOS
1667 type: string
1668 uuid:
1669 description: UUID reported by the vmi bios. Defaults
1670 to a random generated uid.
1671 type: string
1672 type: object
1673 ioThreadsPolicy:
1674 description: 'Controls whether or not disks will share IOThreads.
1675 Omitting IOThreadsPolicy disables use of IOThreads. One
1676 of: shared, auto'
1677 type: string
1678 machine:
1679 description: Machine type.
1680 properties:
1681 type:
1682 description: QEMU machine type is the actual chipset
1683 of the VirtualMachineInstance.
1684 type: string
1685 type: object
1686 memory:
1687 description: Memory allow specifying the VMI memory features.
1688 properties:
1689 guest:
1690 description: Guest allows to specifying the amount of
1691 memory which is visible inside the Guest OS. The Guest
1692 must lie between Requests and Limits from the resources
1693 section. Defaults to the requested memory in the resources
1694 section if not specified.
1695 type: string
1696 hugepages:
1697 description: Hugepages allow to use hugepages for the
1698 VirtualMachineInstance instead of regular memory.
1699 properties:
1700 pageSize:
1701 description: PageSize specifies the hugepage size,
1702 for x86_64 architecture valid values are 1Gi and
1703 2Mi.
1704 type: string
1705 type: object
1706 type: object
1707 resources:
1708 description: Resources describes the Compute Resources required
1709 by this vmi.
1710 properties:
1711 limits:
1712 additionalProperties:
1713 type: string
1714 description: Limits describes the maximum amount of
1715 compute resources allowed. Valid resource keys are
1716 "memory" and "cpu".
1717 type: object
1718 overcommitGuestOverhead:
1719 description: Don't ask the scheduler to take the guest-management
1720 overhead into account. Instead put the overhead only
1721 into the container's memory limit. This can lead to
1722 crashes if all memory is in use on a node. Defaults
1723 to false.
1724 type: boolean
1725 requests:
1726 additionalProperties:
1727 type: string
1728 description: Requests is a description of the initial
1729 vmi resources. Valid resource keys are "memory" and
1730 "cpu".
1731 type: object
1732 type: object
1733 type: object
1734 evictionStrategy:
1735 description: EvictionStrategy can be set to "LiveMigrate" if
1736 the VirtualMachineInstance should be migrated instead of shut-off
1737 in case of a node drain.
1738 type: string
1739 hostname:
1740 description: Specifies the hostname of the vmi If not specified,
1741 the hostname will be set to the name of the vmi, if dhcp or
1742 cloud-init is configured properly.
1743 type: string
1744 livenessProbe:
1745 description: 'Periodic probe of VirtualMachineInstance liveness.
1746 VirtualmachineInstances will be stopped if the probe fails.
1747 Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
1748 properties:
1749 failureThreshold:
1750 description: Minimum consecutive failures for the probe
1751 to be considered failed after having succeeded. Defaults
1752 to 3. Minimum value is 1.
1753 format: int32
1754 type: integer
1755 httpGet:
1756 description: HTTPGet specifies the http request to perform.
1757 properties:
1758 host:
1759 description: Host name to connect to, defaults to the
1760 pod IP. You probably want to set "Host" in httpHeaders
1761 instead.
1762 type: string
1763 httpHeaders:
1764 description: Custom headers to set in the request. HTTP
1765 allows repeated headers.
1766 items:
1767 description: HTTPHeader describes a custom header
1768 to be used in HTTP probes
1769 properties:
1770 name:
1771 description: The header field name
1772 type: string
1773 value:
1774 description: The header field value
1775 type: string
1776 required:
1777 - name
1778 - value
1779 type: object
1780 type: array
1781 path:
1782 description: Path to access on the HTTP server.
1783 type: string
1784 port:
1785 description: Name or number of the port to access on
1786 the container. Number must be in the range 1 to 65535.
1787 Name must be an IANA_SVC_NAME.
1788 x-kubernetes-int-or-string: true
1789 scheme:
1790 description: Scheme to use for connecting to the host.
1791 Defaults to HTTP.
1792 type: string
1793 required:
1794 - port
1795 type: object
1796 initialDelaySeconds:
1797 description: 'Number of seconds after the VirtualMachineInstance
1798 has started before liveness probes are initiated. More
1799 info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
1800 format: int32
1801 type: integer
1802 periodSeconds:
1803 description: How often (in seconds) to perform the probe.
1804 Default to 10 seconds. Minimum value is 1.
1805 format: int32
1806 type: integer
1807 successThreshold:
1808 description: Minimum consecutive successes for the probe
1809 to be considered successful after having failed. Defaults
1810 to 1. Must be 1 for liveness. Minimum value is 1.
1811 format: int32
1812 type: integer
1813 tcpSocket:
1814 description: 'TCPSocket specifies an action involving a
1815 TCP port. TCP hooks not yet supported TODO: implement
1816 a realistic TCP lifecycle hook'
1817 properties:
1818 host:
1819 description: 'Optional: Host name to connect to, defaults
1820 to the pod IP.'
1821 type: string
1822 port:
1823 description: Number or name of the port to access on
1824 the container. Number must be in the range 1 to 65535.
1825 Name must be an IANA_SVC_NAME.
1826 x-kubernetes-int-or-string: true
1827 required:
1828 - port
1829 type: object
1830 timeoutSeconds:
1831 description: 'Number of seconds after which the probe times
1832 out. Defaults to 1 second. Minimum value is 1. More info:
1833 https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
1834 format: int32
1835 type: integer
1836 type: object
1837 networks:
1838 description: List of networks that can be attached to a vm's
1839 virtual interface.
1840 items:
1841 description: Network represents a network type and a resource
1842 that should be connected to the vm.
1843 properties:
1844 genie:
1845 description: Represents the genie cni network.
1846 properties:
1847 networkName:
1848 description: References the CNI plugin name.
1849 type: string
1850 type: object
1851 multus:
1852 description: Represents the multus cni network.
1853 properties:
1854 default:
1855 description: Select the default network and add it
1856 to the multus-cni.io/default-network annotation.
1857 type: boolean
1858 networkName:
1859 description: 'References to a NetworkAttachmentDefinition
1860 CRD object. Format: <networkName>, <namespace>/<networkName>.
1861 If namespace is not specified, VMI namespace is
1862 assumed.'
1863 type: string
1864 type: object
1865 name:
1866 description: 'Network name. Must be a DNS_LABEL and unique
1867 within the vm. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
1868 type: string
1869 pod:
1870 description: Represents the stock pod network interface.
1871 properties:
1872 vmNetworkCIDR:
1873 description: CIDR for vm network. Default 10.0.2.0/24
1874 if not specified.
1875 type: string
1876 type: object
1877 type: object
1878 type: array
1879 nodeSelector:
1880 additionalProperties:
1881 type: string
1882 description: 'NodeSelector is a selector which must be true
1883 for the vmi to fit on a node. Selector which must match a
1884 node''s labels for the vmi to be scheduled on that node. More
1885 info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/'
1886 type: object
1887 priorityClassName:
1888 description: If specified, indicates the pod's priority. If
1889 not specified, the pod priority will be default or zero if
1890 there is no default.
1891 type: string
1892 readinessProbe:
1893 description: 'Periodic probe of VirtualMachineInstance service
1894 readiness. VirtualmachineInstances will be removed from service
1895 endpoints if the probe fails. Cannot be updated. More info:
1896 https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
1897 properties:
1898 failureThreshold:
1899 description: Minimum consecutive failures for the probe
1900 to be considered failed after having succeeded. Defaults
1901 to 3. Minimum value is 1.
1902 format: int32
1903 type: integer
1904 httpGet:
1905 description: HTTPGet specifies the http request to perform.
1906 properties:
1907 host:
1908 description: Host name to connect to, defaults to the
1909 pod IP. You probably want to set "Host" in httpHeaders
1910 instead.
1911 type: string
1912 httpHeaders:
1913 description: Custom headers to set in the request. HTTP
1914 allows repeated headers.
1915 items:
1916 description: HTTPHeader describes a custom header
1917 to be used in HTTP probes
1918 properties:
1919 name:
1920 description: The header field name
1921 type: string
1922 value:
1923 description: The header field value
1924 type: string
1925 required:
1926 - name
1927 - value
1928 type: object
1929 type: array
1930 path:
1931 description: Path to access on the HTTP server.
1932 type: string
1933 port:
1934 description: Name or number of the port to access on
1935 the container. Number must be in the range 1 to 65535.
1936 Name must be an IANA_SVC_NAME.
1937 x-kubernetes-int-or-string: true
1938 scheme:
1939 description: Scheme to use for connecting to the host.
1940 Defaults to HTTP.
1941 type: string
1942 required:
1943 - port
1944 type: object
1945 initialDelaySeconds:
1946 description: 'Number of seconds after the VirtualMachineInstance
1947 has started before liveness probes are initiated. More
1948 info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
1949 format: int32
1950 type: integer
1951 periodSeconds:
1952 description: How often (in seconds) to perform the probe.
1953 Default to 10 seconds. Minimum value is 1.
1954 format: int32
1955 type: integer
1956 successThreshold:
1957 description: Minimum consecutive successes for the probe
1958 to be considered successful after having failed. Defaults
1959 to 1. Must be 1 for liveness. Minimum value is 1.
1960 format: int32
1961 type: integer
1962 tcpSocket:
1963 description: 'TCPSocket specifies an action involving a
1964 TCP port. TCP hooks not yet supported TODO: implement
1965 a realistic TCP lifecycle hook'
1966 properties:
1967 host:
1968 description: 'Optional: Host name to connect to, defaults
1969 to the pod IP.'
1970 type: string
1971 port:
1972 description: Number or name of the port to access on
1973 the container. Number must be in the range 1 to 65535.
1974 Name must be an IANA_SVC_NAME.
1975 x-kubernetes-int-or-string: true
1976 required:
1977 - port
1978 type: object
1979 timeoutSeconds:
1980 description: 'Number of seconds after which the probe times
1981 out. Defaults to 1 second. Minimum value is 1. More info:
1982 https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
1983 format: int32
1984 type: integer
1985 type: object
1986 subdomain:
1987 description: If specified, the fully qualified vmi hostname
1988 will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster
1989 domain>". If not specified, the vmi will not have a domainname
1990 at all. The DNS entry will resolve to the vmi, no matter if
1991 the vmi itself can pick up a hostname.
1992 type: string
1993 terminationGracePeriodSeconds:
1994 description: Grace period observed after signalling a VirtualMachineInstance
1995 to stop after which the VirtualMachineInstance is force terminated.
1996 format: int64
1997 type: integer
1998 tolerations:
1999 description: If toleration is specified, obey all the toleration
2000 rules.
2001 items:
2002 description: The pod this Toleration is attached to tolerates
2003 any taint that matches the triple <key,value,effect> using
2004 the matching operator <operator>.
2005 properties:
2006 effect:
2007 description: Effect indicates the taint effect to match.
2008 Empty means match all taint effects. When specified,
2009 allowed values are NoSchedule, PreferNoSchedule and
2010 NoExecute.
2011 type: string
2012 key:
2013 description: Key is the taint key that the toleration
2014 applies to. Empty means match all taint keys. If the
2015 key is empty, operator must be Exists; this combination
2016 means to match all values and all keys.
2017 type: string
2018 operator:
2019 description: Operator represents a key's relationship
2020 to the value. Valid operators are Exists and Equal.
2021 Defaults to Equal. Exists is equivalent to wildcard
2022 for value, so that a pod can tolerate all taints of
2023 a particular category.
2024 type: string
2025 tolerationSeconds:
2026 description: TolerationSeconds represents the period of
2027 time the toleration (which must be of effect NoExecute,
2028 otherwise this field is ignored) tolerates the taint.
2029 By default, it is not set, which means tolerate the
2030 taint forever (do not evict). Zero and negative values
2031 will be treated as 0 (evict immediately) by the system.
2032 format: int64
2033 type: integer
2034 value:
2035 description: Value is the taint value the toleration matches
2036 to. If the operator is Exists, the value should be empty,
2037 otherwise just a regular string.
2038 type: string
2039 type: object
2040 type: array
2041 volumes:
2042 description: List of volumes that can be mounted by disks belonging
2043 to the vmi.
2044 items:
2045 description: Volume represents a named volume in a vmi.
2046 properties:
2047 cloudInitConfigDrive:
2048 description: 'CloudInitConfigDrive represents a cloud-init
2049 Config Drive user-data source. The Config Drive data
2050 will be added as a disk to the vmi. A proper cloud-init
2051 installation is required inside the guest. More info:
2052 https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html'
2053 properties:
2054 networkData:
2055 description: NetworkData contains config drive inline
2056 cloud-init networkdata.
2057 type: string
2058 networkDataBase64:
2059 description: NetworkDataBase64 contains config drive
2060 cloud-init networkdata as a base64 encoded string.
2061 type: string
2062 networkDataSecretRef:
2063 description: NetworkDataSecretRef references a k8s
2064 secret that contains config drive networkdata.
2065 properties:
2066 name:
2067 description: 'Name of the referent. More info:
2068 https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2069 TODO: Add other useful fields. apiVersion, kind,
2070 uid?'
2071 type: string
2072 type: object
2073 secretRef:
2074 description: UserDataSecretRef references a k8s secret
2075 that contains config drive userdata.
2076 properties:
2077 name:
2078 description: 'Name of the referent. More info:
2079 https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2080 TODO: Add other useful fields. apiVersion, kind,
2081 uid?'
2082 type: string
2083 type: object
2084 userData:
2085 description: UserData contains config drive inline
2086 cloud-init userdata.
2087 type: string
2088 userDataBase64:
2089 description: UserDataBase64 contains config drive
2090 cloud-init userdata as a base64 encoded string.
2091 type: string
2092 type: object
2093 cloudInitNoCloud:
2094 description: 'CloudInitNoCloud represents a cloud-init
2095 NoCloud user-data source. The NoCloud data will be added
2096 as a disk to the vmi. A proper cloud-init installation
2097 is required inside the guest. More info: http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html'
2098 properties:
2099 networkData:
2100 description: NetworkData contains NoCloud inline cloud-init
2101 networkdata.
2102 type: string
2103 networkDataBase64:
2104 description: NetworkDataBase64 contains NoCloud cloud-init
2105 networkdata as a base64 encoded string.
2106 type: string
2107 networkDataSecretRef:
2108 description: NetworkDataSecretRef references a k8s
2109 secret that contains NoCloud networkdata.
2110 properties:
2111 name:
2112 description: 'Name of the referent. More info:
2113 https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2114 TODO: Add other useful fields. apiVersion, kind,
2115 uid?'
2116 type: string
2117 type: object
2118 secretRef:
2119 description: UserDataSecretRef references a k8s secret
2120 that contains NoCloud userdata.
2121 properties:
2122 name:
2123 description: 'Name of the referent. More info:
2124 https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2125 TODO: Add other useful fields. apiVersion, kind,
2126 uid?'
2127 type: string
2128 type: object
2129 userData:
2130 description: UserData contains NoCloud inline cloud-init
2131 userdata.
2132 type: string
2133 userDataBase64:
2134 description: UserDataBase64 contains NoCloud cloud-init
2135 userdata as a base64 encoded string.
2136 type: string
2137 type: object
2138 configMap:
2139 description: 'ConfigMapSource represents a reference to
2140 a ConfigMap in the same namespace. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/'
2141 properties:
2142 name:
2143 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2144 TODO: Add other useful fields. apiVersion, kind,
2145 uid?'
2146 type: string
2147 optional:
2148 description: Specify whether the ConfigMap or it's
2149 keys must be defined
2150 type: boolean
2151 type: object
2152 containerDisk:
2153 description: 'ContainerDisk references a docker image,
2154 embedding a qcow or raw disk. More info: https://kubevirt.gitbooks.io/user-guide/registry-disk.html'
2155 properties:
2156 image:
2157 description: Image is the name of the image with the
2158 embedded disk.
2159 type: string
2160 imagePullPolicy:
2161 description: 'Image pull policy. One of Always, Never,
2162 IfNotPresent. Defaults to Always if :latest tag
2163 is specified, or IfNotPresent otherwise. Cannot
2164 be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
2165 type: string
2166 imagePullSecret:
2167 description: ImagePullSecret is the name of the Docker
2168 registry secret required to pull the image. The
2169 secret must already exist.
2170 type: string
2171 path:
2172 description: Path defines the path to disk file in
2173 the container
2174 type: string
2175 type: object
2176 dataVolume:
2177 description: DataVolume represents the dynamic creation
2178 a PVC for this volume as well as the process of populating
2179 that PVC with a disk image.
2180 properties:
2181 name:
2182 description: Name represents the name of the DataVolume
2183 in the same namespace
2184 type: string
2185 type: object
2186 emptyDisk:
2187 description: 'EmptyDisk represents a temporary disk which
2188 shares the vmis lifecycle. More info: https://kubevirt.gitbooks.io/user-guide/disks-and-volumes.html'
2189 properties:
2190 capacity:
2191 description: Capacity of the sparse disk.
2192 type: string
2193 type: object
2194 ephemeral:
2195 description: Ephemeral is a special volume source that
2196 "wraps" specified source and provides copy-on-write
2197 image on top of it.
2198 properties:
2199 persistentVolumeClaim:
2200 description: 'PersistentVolumeClaimVolumeSource represents
2201 a reference to a PersistentVolumeClaim in the same
2202 namespace. Directly attached to the vmi via qemu.
2203 More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
2204 properties:
2205 claimName:
2206 description: 'ClaimName is the name of a PersistentVolumeClaim
2207 in the same namespace as the pod using this
2208 volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
2209 type: string
2210 readOnly:
2211 description: Will force the ReadOnly setting in
2212 VolumeMounts. Default false.
2213 type: boolean
2214 required:
2215 - claimName
2216 type: object
2217 type: object
2218 hostDisk:
2219 description: HostDisk represents a disk created on the
2220 cluster level
2221 properties:
2222 capacity:
2223 description: Capacity of the sparse disk
2224 type: string
2225 path:
2226 description: The path to HostDisk image located on
2227 the cluster
2228 type: string
2229 shared:
2230 description: Shared indicate whether the path is shared
2231 between nodes
2232 type: boolean
2233 type:
2234 description: Contains information if disk.img exists
2235 or should be created allowed options are 'Disk'
2236 and 'DiskOrCreate'
2237 type: string
2238 type: object
2239 name:
2240 description: 'Volume''s name. Must be a DNS_LABEL and
2241 unique within the vmi. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
2242 type: string
2243 persistentVolumeClaim:
2244 description: 'PersistentVolumeClaimVolumeSource represents
2245 a reference to a PersistentVolumeClaim in the same namespace.
2246 Directly attached to the vmi via qemu. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
2247 properties:
2248 claimName:
2249 description: 'ClaimName is the name of a PersistentVolumeClaim
2250 in the same namespace as the pod using this volume.
2251 More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
2252 type: string
2253 readOnly:
2254 description: Will force the ReadOnly setting in VolumeMounts.
2255 Default false.
2256 type: boolean
2257 required:
2258 - claimName
2259 type: object
2260 secret:
2261 description: 'SecretVolumeSource represents a reference
2262 to a secret data in the same namespace. More info: https://kubernetes.io/docs/concepts/configuration/secret/'
2263 properties:
2264 optional:
2265 description: Specify whether the Secret or it's keys
2266 must be defined
2267 type: boolean
2268 secretName:
2269 description: 'Name of the secret in the pod''s namespace
2270 to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
2271 type: string
2272 type: object
2273 serviceAccount:
2274 description: 'ServiceAccountVolumeSource represents a
2275 reference to a service account. There can only be one
2276 volume of this type! More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/'
2277 properties:
2278 serviceAccountName:
2279 description: 'Name of the service account in the pod''s
2280 namespace to use. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/'
2281 type: string
2282 type: object
2283 type: object
2284 type: array
2285 type: object
2286 type: object
2287 type: object
2288 status:
2289 description: Status holds the current state of the controller and brief
2290 information about its associated VirtualMachineInstance
2291 properties:
2292 conditions:
2293 description: Hold the state information of the VirtualMachine and its
2294 VirtualMachineInstance
2295 items:
2296 description: VirtualMachineCondition represents the state of VirtualMachine
2297 properties:
2298 lastProbeTime:
2299 format: date-time
2300 type: string
2301 lastTransitionTime:
2302 format: date-time
2303 type: string
2304 message:
2305 type: string
2306 reason:
2307 type: string
2308 status:
2309 type: string
2310 type:
2311 type: string
2312 type: object
2313 type: array
2314 created:
2315 description: Created indicates if the virtual machine is created in
2316 the cluster
2317 type: boolean
2318 ready:
2319 description: Ready indicates if the virtual machine is running and ready
2320 type: boolean
2321 stateChangeRequests:
2322 description: StateChangeRequests indicates a list of actions that should
2323 be taken on a VMI e.g. stop a specific VMI then start a new one.
2324 items:
2325 properties:
2326 action:
2327 description: Indicates the type of action that is requested. e.g.
2328 Start or Stop
2329 type: string
2330 data:
2331 additionalProperties:
2332 type: string
2333 description: Provides additional data in order to perform the
2334 Action
2335 type: object
2336 uid:
2337 description: Indicates the UUID of an existing Virtual Machine
2338 Instance that this change request applies to -- if applicable
2339 type: string
2340 type: object
2341 type: array
2342 type: object
2343 type: object
2344 version: v1alpha3
2345 versions:
2346 - name: v1alpha3
2347 served: true
2348 storage: true
2349
2350goroutine 1 [running]:
2351main.main()