{
  "description": "Plan provides all details of what to execute as a part of the plan, and\nthe current status of its execution.",
  "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": {
      "description": "Spec defines how the plan behaves.",
      "properties": {
        "commands": {
          "description": "Commands are a collection of all of the commands that need to be executed\nin order for this plan to transition to Completed.",
          "items": {
            "description": "PlanCommand is a command that can be run within a `Plan`",
            "properties": {
              "airgapupdate": {
                "description": "AirgapUpdate is the `AirgapUpdate` command which is responsible for updating a k0s airgap bundle.",
                "properties": {
                  "platforms": {
                    "additionalProperties": {
                      "description": "PlanResourceURL is a remote URL resource.",
                      "properties": {
                        "sha256": {
                          "description": "Sha256 provides an optional SHA256 hash of the URL's content for verification.",
                          "type": "string"
                        },
                        "url": {
                          "description": "URL is the URL of a downloadable resource.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "url"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "description": "Platforms is a map of PlanResourceUrls to platform identifiers, allowing a single k0s airgap\nversion to have multiple Url resources based on platform.",
                    "type": "object"
                  },
                  "version": {
                    "description": "Version is the version that `AirgapUpdate` will be upgrading to.",
                    "type": "string"
                  },
                  "workers": {
                    "description": "Workers defines how the k0s workers will be discovered and airgap updated.",
                    "properties": {
                      "discovery": {
                        "description": "Discovery details how nodes for this target should be discovered.",
                        "properties": {
                          "selector": {
                            "description": "Selector provides a kubernetes 'selector' means of identifying target signal nodes.",
                            "properties": {
                              "fields": {
                                "description": "Fields is a standard kubernetes field selector (key=value,key=value,...)",
                                "type": "string"
                              },
                              "labels": {
                                "description": "Labels is a standard kubernetes label selector (key=value,key=value,...)",
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "static": {
                            "description": "Static provides a static means of identifying target signal nodes.",
                            "properties": {
                              "nodes": {
                                "description": "Nodes provides a static set of target signal nodes.",
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "type": "object",
                        "additionalProperties": false
                      },
                      "limits": {
                        "default": {
                          "concurrent": 1
                        },
                        "description": "Limits impose various limits and restrictions on how discovery and execution should behave.",
                        "properties": {
                          "concurrent": {
                            "default": 1,
                            "description": "Concurrent specifies the number of concurrent target executions that can be performed\nwithin this target. (ie. '2' == at most have 2 execute at the same time)",
                            "type": "integer"
                          }
                        },
                        "type": "object",
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "discovery"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  }
                },
                "required": [
                  "platforms",
                  "version",
                  "workers"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "k0supdate": {
                "description": "K0sUpdate is the `K0sUpdate` command which is responsible for updating a k0s node (controller/worker)",
                "properties": {
                  "forceupdate": {
                    "description": "ForceUpdate ensures that version checking is ignored and that all updates are applied.",
                    "type": "boolean"
                  },
                  "platforms": {
                    "additionalProperties": {
                      "description": "PlanResourceURL is a remote URL resource.",
                      "properties": {
                        "sha256": {
                          "description": "Sha256 provides an optional SHA256 hash of the URL's content for verification.",
                          "type": "string"
                        },
                        "url": {
                          "description": "URL is the URL of a downloadable resource.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "url"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "description": "Platforms is a map of PlanResourceUrls to platform identifiers, allowing a single k0s version\nto have multiple URL resources based on platform.",
                    "type": "object"
                  },
                  "targets": {
                    "description": "Targets defines how the controllers/workers should be discovered and upgraded.",
                    "properties": {
                      "controllers": {
                        "description": "Controllers defines how k0s controllers will be discovered and executed.",
                        "properties": {
                          "discovery": {
                            "description": "Discovery details how nodes for this target should be discovered.",
                            "properties": {
                              "selector": {
                                "description": "Selector provides a kubernetes 'selector' means of identifying target signal nodes.",
                                "properties": {
                                  "fields": {
                                    "description": "Fields is a standard kubernetes field selector (key=value,key=value,...)",
                                    "type": "string"
                                  },
                                  "labels": {
                                    "description": "Labels is a standard kubernetes label selector (key=value,key=value,...)",
                                    "type": "string"
                                  }
                                },
                                "type": "object",
                                "additionalProperties": false
                              },
                              "static": {
                                "description": "Static provides a static means of identifying target signal nodes.",
                                "properties": {
                                  "nodes": {
                                    "description": "Nodes provides a static set of target signal nodes.",
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  }
                                },
                                "type": "object",
                                "additionalProperties": false
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "limits": {
                            "default": {
                              "concurrent": 1
                            },
                            "description": "Limits impose various limits and restrictions on how discovery and execution should behave.",
                            "properties": {
                              "concurrent": {
                                "default": 1,
                                "description": "Concurrent specifies the number of concurrent target executions that can be performed\nwithin this target. (ie. '2' == at most have 2 execute at the same time)",
                                "type": "integer"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "discovery"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "workers": {
                        "description": "Workers defines how k0s workers will be discovered and executed.",
                        "properties": {
                          "discovery": {
                            "description": "Discovery details how nodes for this target should be discovered.",
                            "properties": {
                              "selector": {
                                "description": "Selector provides a kubernetes 'selector' means of identifying target signal nodes.",
                                "properties": {
                                  "fields": {
                                    "description": "Fields is a standard kubernetes field selector (key=value,key=value,...)",
                                    "type": "string"
                                  },
                                  "labels": {
                                    "description": "Labels is a standard kubernetes label selector (key=value,key=value,...)",
                                    "type": "string"
                                  }
                                },
                                "type": "object",
                                "additionalProperties": false
                              },
                              "static": {
                                "description": "Static provides a static means of identifying target signal nodes.",
                                "properties": {
                                  "nodes": {
                                    "description": "Nodes provides a static set of target signal nodes.",
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  }
                                },
                                "type": "object",
                                "additionalProperties": false
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "limits": {
                            "default": {
                              "concurrent": 1
                            },
                            "description": "Limits impose various limits and restrictions on how discovery and execution should behave.",
                            "properties": {
                              "concurrent": {
                                "default": 1,
                                "description": "Concurrent specifies the number of concurrent target executions that can be performed\nwithin this target. (ie. '2' == at most have 2 execute at the same time)",
                                "type": "integer"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "discovery"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "version": {
                    "description": "Version is the version that `K0sUpdate` will be upgrading to.",
                    "type": "string"
                  }
                },
                "required": [
                  "platforms",
                  "targets",
                  "version"
                ],
                "type": "object",
                "additionalProperties": false
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "id": {
          "description": "ID is a user-provided identifier for this plan.",
          "type": "string"
        },
        "timestamp": {
          "description": "Timestamp is a user-provided time that the plan was created.",
          "type": "string"
        }
      },
      "required": [
        "commands",
        "id",
        "timestamp"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "Status is the most recently observed status of the plan.",
      "properties": {
        "commands": {
          "description": "Commands are a collection of status's for each of the commands defined in the plan,\nmaintained in their index order.",
          "items": {
            "description": "PlanCommandStatus is the status of a known command.",
            "properties": {
              "airgapupdate": {
                "description": "AirgapUpdate is the status of the `AirgapUpdate` command.",
                "properties": {
                  "workers": {
                    "description": "Workers are a collection of status for resolved k0s worker targets.",
                    "items": {
                      "description": "PlanCommandTargetStatus is the status of a resolved node (controller/worker).",
                      "properties": {
                        "lastUpdatedTimestamp": {
                          "description": "LastUpdatedTimestamp is a timestamp of the last time the status has changed.",
                          "format": "date-time",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name the name of the target signal node.",
                          "type": "string"
                        },
                        "state": {
                          "description": "State is the current state of the target signal nodes operation.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "lastUpdatedTimestamp",
                        "name",
                        "state"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "type": "array"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "description": {
                "description": "Description is the additional information about the plan command state.",
                "type": "string"
              },
              "id": {
                "description": "ID is a unique identifier for this command in a Plan",
                "type": "integer"
              },
              "k0supdate": {
                "description": "K0sUpdate is the status of the `K0sUpdate` command.",
                "properties": {
                  "controllers": {
                    "description": "Controllers are a collection of status for resolved k0s controller targets.",
                    "items": {
                      "description": "PlanCommandTargetStatus is the status of a resolved node (controller/worker).",
                      "properties": {
                        "lastUpdatedTimestamp": {
                          "description": "LastUpdatedTimestamp is a timestamp of the last time the status has changed.",
                          "format": "date-time",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name the name of the target signal node.",
                          "type": "string"
                        },
                        "state": {
                          "description": "State is the current state of the target signal nodes operation.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "lastUpdatedTimestamp",
                        "name",
                        "state"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "type": "array"
                  },
                  "workers": {
                    "description": "Workers are a collection of status for resolved k0s worker targets.",
                    "items": {
                      "description": "PlanCommandTargetStatus is the status of a resolved node (controller/worker).",
                      "properties": {
                        "lastUpdatedTimestamp": {
                          "description": "LastUpdatedTimestamp is a timestamp of the last time the status has changed.",
                          "format": "date-time",
                          "type": "string"
                        },
                        "name": {
                          "description": "Name the name of the target signal node.",
                          "type": "string"
                        },
                        "state": {
                          "description": "State is the current state of the target signal nodes operation.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "lastUpdatedTimestamp",
                        "name",
                        "state"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "type": "array"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "state": {
                "description": "State is the current state of the plan command.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "state"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "state": {
          "description": "State is the current state of the plan. This value typically mirrors the status\nof the current command execution to allow for querying a single field to determine\nthe plan status.",
          "type": "string"
        }
      },
      "required": [
        "commands",
        "state"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
