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