{
  "description": "MigrationPolicy holds migration policy (i.e. configurations) to apply to a VM or group of VMs",
  "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",
        "null"
      ]
    },
    "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",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "properties": {
        "allowAutoConverge": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "allowPostCopy": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "allowWorkloadDisruption": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "bandwidthPerMigration": {
          "oneOf": [
            {
              "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "x-kubernetes-int-or-string": true
        },
        "completionTimeoutPerGiB": {
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "experimental": {
          "additionalProperties": false,
          "description": "ExperimentalMigrationOptions is an alpha API. It is intended for experimental\npurposes only and will be removed in the future.",
          "properties": {
            "compression": {
              "description": "Compression selects the algorithm for compressing the live migration\ndata stream. When omitted (nil) or set to \"none\", compression is\ndisabled.",
              "enum": [
                "none",
                "zstd"
              ],
              "type": [
                "string",
                "null"
              ]
            },
            "stallDetector": {
              "additionalProperties": false,
              "properties": {
                "completionTimeoutFactor": {
                  "description": "CompletionTimeoutFactor multiplies the computed migration completion timeout to determine\nthe total time budget for deciding whether a forced switchover can still finish in time,\nand to extend the abort deadline after initiating a completion-timeout-driven switchover.\nDefaults to \"2\".",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ewmaAlpha": {
                  "description": "EwmaAlpha is the smoothing factor for the exponentially weighted moving average of\nobserved migration bandwidth. Must be in the range (0, 1]; zero is invalid because\nthe estimate would never incorporate new samples. Higher values weight recent samples\nmore heavily.\nDefaults to \"0.4\".",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "patienceWindowDecayFactor": {
                  "description": "PatienceWindowDecayFactor is the factor by which the relaxation patience window is\nmultiplied after each best-remaining-bytes relaxation step.\nDefaults to \"0.5\".",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "precopyPossibleFactor": {
                  "description": "PrecopyPossibleFactor is the maximum factor by which estimated downtime may exceed\nMaxDowntime while still attempting a soft stop-and-copy instead of aborting the migration.\nDefaults to \"1.5\".",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "searchLocalMinima": {
                  "description": "SearchLocalMinima controls whether convergence actions are delayed until remaining bytes\nreach a local minimum near the best observed value. When false, actions may trigger\nas soon as a stall is detected.\nDefaults to true.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "stallMargin": {
                  "description": "StallMargin is the fractional tolerance, expressed as a percentage, used when\ncomparing remaining migration bytes against the best observed value to detect stalls\nand local minima. A stall is reported when remaining bytes stay above\n(1 - StallMargin/100) of the outside-window minimum.\nDefaults to 4.",
                  "format": "int64",
                  "maximum": 100,
                  "minimum": 0,
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "stallProgressTimeout": {
                  "description": "StallProgressTimeout is the duration in seconds of the sliding window used to track\nminimum remaining-bytes and detect when migration progress has stalled.\nDefaults to 40.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "switchoverTimeout": {
                  "description": "SwitchoverTimeout is the duration in seconds allowed for a stop-and-copy or post-copy\nswitchover to complete after being triggered before the migration is aborted.\nDefaults to 60.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "maxDowntimeMs": {
          "format": "int64",
          "maximum": 2000000,
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        },
        "selectors": {
          "additionalProperties": false,
          "properties": {
            "namespaceSelector": {
              "additionalProperties": {
                "type": "string"
              },
              "type": [
                "object",
                "null"
              ]
            },
            "virtualMachineInstanceSelector": {
              "additionalProperties": {
                "type": "string"
              },
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": "object"
        }
      },
      "required": [
        "selectors"
      ],
      "type": "object"
    },
    "status": {
      "nullable": true,
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}