{
  "description": "VirtualMachineInstanceMigration represents the object tracking a VMI's migration\nto another host in the cluster",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "addedNodeSelector": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "AddedNodeSelector is an additional selector that can be used to\ncomplement a NodeSelector or NodeAffinity as set on the VM\nto restrict the set of allowed target nodes for a migration.\nIn case of key collisions, values set on the VM objects\nare going to be preserved to ensure that addedNodeSelector\ncan only restrict but not bypass constraints already set on the VM object.",
          "type": "object"
        },
        "receive": {
          "description": "If receieve is specified, this VirtualMachineInstanceMigration will be considered the target",
          "properties": {
            "migrationID": {
              "description": "A unique identifier to identify this migration.",
              "type": "string"
            }
          },
          "required": [
            "migrationID"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "sendTo": {
          "description": "If sendTo is specified, this VirtualMachineInstanceMigration will be considered the source",
          "properties": {
            "connectURL": {
              "description": "The synchronization controller URL to connect to.",
              "type": "string"
            },
            "migrationID": {
              "description": "A unique identifier to identify this migration.",
              "type": "string"
            }
          },
          "required": [
            "connectURL",
            "migrationID"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "vmiName": {
          "description": "The name of the VMI to perform the migration on. VMI must exist in the migration objects namespace",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "VirtualMachineInstanceMigration reprents information pertaining to a VMI's migration.",
      "properties": {
        "conditions": {
          "items": {
            "properties": {
              "lastProbeTime": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "lastTransitionTime": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "migrationState": {
          "description": "Represents the status of a live migration",
          "properties": {
            "abortRequested": {
              "description": "Indicates that the migration has been requested to abort",
              "type": "boolean"
            },
            "abortStatus": {
              "description": "Indicates the final status of the live migration abortion",
              "type": "string"
            },
            "completed": {
              "description": "Indicates the migration completed",
              "type": "boolean"
            },
            "endTimestamp": {
              "description": "The time the migration action ended",
              "format": "date-time",
              "nullable": true,
              "type": "string"
            },
            "failed": {
              "description": "Indicates that the migration failed",
              "type": "boolean"
            },
            "failureReason": {
              "description": "Contains the reason why the migration failed",
              "type": "string"
            },
            "migrationConfiguration": {
              "description": "Migration configurations to apply",
              "properties": {
                "allowAutoConverge": {
                  "description": "AllowAutoConverge allows the platform to compromise performance/availability of VMIs to\nguarantee successful VMI live migrations. Defaults to false",
                  "type": "boolean"
                },
                "allowPostCopy": {
                  "description": "AllowPostCopy enables post-copy live migrations. Such migrations allow even the busiest VMIs\nto successfully live-migrate. However, events like a network failure can cause a VMI crash.\nIf set to true, migrations will still start in pre-copy, but switch to post-copy when\nCompletionTimeoutPerGiB triggers. Defaults to false",
                  "type": "boolean"
                },
                "allowWorkloadDisruption": {
                  "description": "AllowWorkloadDisruption indicates that the migration shouldn't be\ncanceled after acceptableCompletionTime is exceeded. Instead, if\npermitted, migration will be switched to post-copy or the VMI will be\npaused to allow the migration to complete",
                  "type": "boolean"
                },
                "bandwidthPerMigration": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "string"
                    }
                  ],
                  "description": "BandwidthPerMigration limits the amount of network bandwidth live migrations are allowed to use.\nThe value is in quantity per second. Defaults to 0 (no limit)",
                  "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                  "x-kubernetes-int-or-string": true
                },
                "completionTimeoutPerGiB": {
                  "description": "CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take.\nIf the timeout is reached, the migration will be either paused, switched\nto post-copy or cancelled depending on other settings. Defaults to 150",
                  "format": "int64",
                  "type": "integer"
                },
                "disableTLS": {
                  "description": "When set to true, DisableTLS will disable the additional layer of live migration encryption\nprovided by KubeVirt. This is usually a bad idea. Defaults to false",
                  "type": "boolean"
                },
                "matchSELinuxLevelOnMigration": {
                  "description": "By default, the SELinux level of target virt-launcher pods is forced to the level of the source virt-launcher.\nWhen set to true, MatchSELinuxLevelOnMigration lets the CRI auto-assign a random level to the target.\nThat will ensure the target virt-launcher doesn't share categories with another pod on the node.\nHowever, migrations will fail when using RWX volumes that don't automatically deal with SELinux levels.",
                  "type": "boolean"
                },
                "network": {
                  "description": "Network is the name of the CNI network to use for live migrations. By default, migrations go\nthrough the pod network.",
                  "type": "string"
                },
                "nodeDrainTaintKey": {
                  "description": "NodeDrainTaintKey defines the taint key that indicates a node should be drained.\nNote: this option relies on the deprecated node taint feature. Default: kubevirt.io/drain",
                  "type": "string"
                },
                "parallelMigrationsPerCluster": {
                  "description": "ParallelMigrationsPerCluster is the total number of concurrent live migrations\nallowed cluster-wide. Defaults to 5",
                  "format": "int32",
                  "type": "integer"
                },
                "parallelOutboundMigrationsPerNode": {
                  "description": "ParallelOutboundMigrationsPerNode is the maximum number of concurrent outgoing live migrations\nallowed per node. Defaults to 2",
                  "format": "int32",
                  "type": "integer"
                },
                "progressTimeout": {
                  "description": "ProgressTimeout is the maximum number of seconds a live migration is allowed to make no progress.\nHitting this timeout means a migration transferred 0 data for that many seconds. The migration is\nthen considered stuck and therefore cancelled. Defaults to 150",
                  "format": "int64",
                  "type": "integer"
                },
                "unsafeMigrationOverride": {
                  "description": "UnsafeMigrationOverride allows live migrations to occur even if the compatibility check\nindicates the migration will be unsafe to the guest. Defaults to false",
                  "type": "boolean"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "migrationNetworkType": {
              "description": "The type of migration network, either 'pod' or 'migration'",
              "type": "string"
            },
            "migrationPolicyName": {
              "description": "Name of the migration policy. If string is empty, no policy is matched",
              "type": "string"
            },
            "migrationUid": {
              "description": "The VirtualMachineInstanceMigration object associated with this migration",
              "type": "string"
            },
            "mode": {
              "description": "Lets us know if the vmi is currently running pre or post copy migration",
              "type": "string"
            },
            "sourceNode": {
              "description": "The source node that the VMI originated on",
              "type": "string"
            },
            "sourcePersistentStatePVCName": {
              "description": "If the VMI being migrated uses persistent features (backend-storage), its source PVC name is saved here",
              "type": "string"
            },
            "sourcePod": {
              "type": "string"
            },
            "sourceState": {
              "description": "SourceState contains migration state managed by the source virt handler",
              "properties": {
                "domainName": {
                  "description": "The name of the domain on the source libvirt domain",
                  "type": "string"
                },
                "domainNamespace": {
                  "description": "Namespace used in the name of the source libvirt domain. Can be used to find and modify paths in the domain",
                  "type": "string"
                },
                "migrationUID": {
                  "description": "The Source VirtualMachineInstanceMigration object associated with this migration",
                  "type": "string"
                },
                "node": {
                  "description": "The source node that the VMI originated on",
                  "type": "string"
                },
                "nodeSelectors": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Node selectors needed by the target to start the receiving pod.",
                  "type": "object"
                },
                "persistentStatePVCName": {
                  "description": "If the VMI being migrated uses persistent features (backend-storage), its source PVC name is saved here",
                  "type": "string"
                },
                "pod": {
                  "description": "The source pod that the VMI is originated on",
                  "type": "string"
                },
                "selinuxContext": {
                  "description": "SELinuxContext is the actual SELinux context of the pod",
                  "type": "string"
                },
                "syncAddress": {
                  "description": "The ip address/fqdn:port combination to use to synchronize the VMI with the target.",
                  "type": "string"
                },
                "virtualMachineInstanceUID": {
                  "description": "VirtualMachineInstanceUID is the UID of the target virtual machine instance",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "startTimestamp": {
              "description": "The time the migration action began",
              "format": "date-time",
              "nullable": true,
              "type": "string"
            },
            "targetAttachmentPodUID": {
              "description": "The UID of the target attachment pod for hotplug volumes",
              "type": "string"
            },
            "targetCPUSet": {
              "description": "If the VMI requires dedicated CPUs, this field will\nhold the dedicated CPU set on the target node",
              "items": {
                "type": "integer"
              },
              "type": "array",
              "x-kubernetes-list-type": "atomic"
            },
            "targetDirectMigrationNodePorts": {
              "additionalProperties": {
                "type": "integer"
              },
              "description": "The list of ports opened for live migration on the destination node",
              "type": "object"
            },
            "targetNode": {
              "description": "The target node that the VMI is moving to",
              "type": "string"
            },
            "targetNodeAddress": {
              "description": "The address of the target node to use for the migration",
              "type": "string"
            },
            "targetNodeDomainDetected": {
              "description": "The Target Node has seen the Domain Start Event",
              "type": "boolean"
            },
            "targetNodeDomainReadyTimestamp": {
              "description": "The timestamp at which the target node detects the domain is active",
              "format": "date-time",
              "type": "string"
            },
            "targetNodeTopology": {
              "description": "If the VMI requires dedicated CPUs, this field will\nhold the numa topology on the target node",
              "type": "string"
            },
            "targetPersistentStatePVCName": {
              "description": "If the VMI being migrated uses persistent features (backend-storage), its target PVC name is saved here",
              "type": "string"
            },
            "targetPod": {
              "description": "The target pod that the VMI is moving to",
              "type": "string"
            },
            "targetState": {
              "description": "TargetState contains migration state managed by the target virt handler",
              "properties": {
                "attachmentPodUID": {
                  "description": "The UID of the target attachment pod for hotplug volumes",
                  "type": "string"
                },
                "cpuSet": {
                  "description": "If the VMI requires dedicated CPUs, this field will\nhold the dedicated CPU set on the target node",
                  "items": {
                    "type": "integer"
                  },
                  "type": "array",
                  "x-kubernetes-list-type": "atomic"
                },
                "directMigrationNodePorts": {
                  "additionalProperties": {
                    "type": "integer"
                  },
                  "description": "The list of ports opened for live migration on the destination node",
                  "type": "object"
                },
                "domainDetected": {
                  "description": "The Target Node has seen the Domain Start Event",
                  "type": "boolean"
                },
                "domainName": {
                  "description": "The name of the domain on the source libvirt domain",
                  "type": "string"
                },
                "domainNamespace": {
                  "description": "Namespace used in the name of the source libvirt domain. Can be used to find and modify paths in the domain",
                  "type": "string"
                },
                "domainReadyTimestamp": {
                  "description": "The timestamp at which the target node detects the domain is active",
                  "format": "date-time",
                  "type": "string"
                },
                "migrationUID": {
                  "description": "The Source VirtualMachineInstanceMigration object associated with this migration",
                  "type": "string"
                },
                "node": {
                  "description": "The source node that the VMI originated on",
                  "type": "string"
                },
                "nodeAddress": {
                  "description": "The address of the target node to use for the migration",
                  "type": "string"
                },
                "nodeTopology": {
                  "description": "If the VMI requires dedicated CPUs, this field will\nhold the numa topology on the target node",
                  "type": "string"
                },
                "persistentStatePVCName": {
                  "description": "If the VMI being migrated uses persistent features (backend-storage), its source PVC name is saved here",
                  "type": "string"
                },
                "pod": {
                  "description": "The source pod that the VMI is originated on",
                  "type": "string"
                },
                "selinuxContext": {
                  "description": "SELinuxContext is the actual SELinux context of the pod",
                  "type": "string"
                },
                "syncAddress": {
                  "description": "The ip address/fqdn:port combination to use to synchronize the VMI with the target.",
                  "type": "string"
                },
                "virtualMachineInstanceUID": {
                  "description": "VirtualMachineInstanceUID is the UID of the target virtual machine instance",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "phase": {
          "description": "VirtualMachineInstanceMigrationPhase is a label for the condition of a VirtualMachineInstanceMigration at the current time.",
          "type": "string"
        },
        "phaseTransitionTimestamps": {
          "description": "PhaseTransitionTimestamp is the timestamp of when the last phase change occurred",
          "items": {
            "description": "VirtualMachineInstanceMigrationPhaseTransitionTimestamp gives a timestamp in relation to when a phase is set on a vmi",
            "properties": {
              "phase": {
                "description": "Phase is the status of the VirtualMachineInstanceMigrationPhase in kubernetes world. It is not the VirtualMachineInstanceMigrationPhase status, but partially correlates to it.",
                "type": "string"
              },
              "phaseTransitionTimestamp": {
                "description": "PhaseTransitionTimestamp is the timestamp of when the phase change occurred",
                "format": "date-time",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        },
        "synchronizationAddresses": {
          "description": "The synchronization addresses one can use to connect to the synchronization controller, includes the port, if multiple\naddresses are available, the first one is reported in the synchronizationAddress field.",
          "items": {
            "type": "string"
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
