{
  "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": {
        "template": {
          "properties": {
            "metadata": {
              "properties": {
                "annotations": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "finalizers": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "labels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "name": {
                  "type": "string"
                },
                "namespace": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "spec": {
              "properties": {
                "k0sConfigSpec": {
                  "properties": {
                    "args": {
                      "description": "Args specifies extra arguments to be passed to k0s controller.\nSee: https://docs.k0sproject.io/stable/cli/k0s_controller/",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "customUserDataRef": {
                      "description": "CustomUserDataRef is a reference to a secret or a configmap that contains the custom user data.\nProvided user-data will be merged with the one generated by k0smotron. Note that you may want to specify the merge type.\nSee: https://cloudinit.readthedocs.io/en/latest/reference/merging.html",
                      "properties": {
                        "configMapRef": {
                          "description": "ConfigMapRef is a reference to a configmap that contains the content.",
                          "properties": {
                            "key": {
                              "description": "Key is the key in the source that contains the content",
                              "type": "string"
                            },
                            "name": {
                              "description": "Name is the name of the source",
                              "type": "string"
                            }
                          },
                          "required": [
                            "key",
                            "name"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        },
                        "secretRef": {
                          "description": "SecretRef is a reference to a secret that contains the content.",
                          "properties": {
                            "key": {
                              "description": "Key is the key in the source that contains the content",
                              "type": "string"
                            },
                            "name": {
                              "description": "Name is the name of the source",
                              "type": "string"
                            }
                          },
                          "required": [
                            "key",
                            "name"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "downloadURL": {
                      "description": "DownloadURL specifies the URL from which to download the k0s binary.\nIf the version field is specified, it is ignored, and whatever version is downloaded from the URL is used.\nSupported protocols are: http, https, oci. Using 'oci' scheme requires 'oras' to be installed on the target system.\n\nIf 'oci' schema is used and the OCI registry requires authentication, make sure to set up the authentication beforehand\nby adding a file to the Files section that contains the necessary config for ORAS. See: https://oras.land/docs/how_to_guides/authentication/\nThe file must be placed at `/root` directory (HOME for cloud-init execution time) and named `config.json`.\nNOTE: use `.preStartCommands` to set DOCKER_CONFIG environment variable in order to let ORAS pick up your custom config file.",
                      "type": "string"
                    },
                    "files": {
                      "description": "Files specifies extra files to be passed to user_data upon creation.",
                      "items": {
                        "description": "File defines a file to be passed to user_data upon creation.",
                        "properties": {
                          "content": {
                            "type": "string"
                          },
                          "contentFrom": {
                            "description": "ContentFrom specifies the source of the content.",
                            "properties": {
                              "configMapRef": {
                                "description": "ConfigMapRef is a reference to a configmap that contains the content.",
                                "properties": {
                                  "key": {
                                    "description": "Key is the key in the source that contains the content",
                                    "type": "string"
                                  },
                                  "name": {
                                    "description": "Name is the name of the source",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "key",
                                  "name"
                                ],
                                "type": "object",
                                "additionalProperties": false
                              },
                              "secretRef": {
                                "description": "SecretRef is a reference to a secret that contains the content.",
                                "properties": {
                                  "key": {
                                    "description": "Key is the key in the source that contains the content",
                                    "type": "string"
                                  },
                                  "name": {
                                    "description": "Name is the name of the source",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "key",
                                  "name"
                                ],
                                "type": "object",
                                "additionalProperties": false
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "path": {
                            "type": "string"
                          },
                          "permissions": {
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "additionalProperties": false
                      },
                      "type": "array"
                    },
                    "ignition": {
                      "description": "Ignition defines the ignition configuration. If empty, k0smotron will use cloud-init.",
                      "properties": {
                        "additionalConfig": {
                          "description": "AdditionalConfig is an unstructured object that contains additional config to be merged\nwith the generated one. The format follows Butane spec: https://coreos.github.io/butane/",
                          "type": "string"
                        },
                        "variant": {
                          "description": "Variant declares which distribution variant the generated config is for.\nCheck the supported variants and versions here:\nhttps://coreos.github.io/butane/specs/#butane-specifications-and-ignition-specifications",
                          "enum": [
                            "fcos",
                            "flatcar",
                            "openshift",
                            "r4e",
                            "fiot"
                          ],
                          "type": "string"
                        },
                        "version": {
                          "description": "Version is the schema version of the Butane config to use\nCheck the supported variants and versions here:\nhttps://coreos.github.io/butane/specs/#butane-specifications-and-ignition-specifications",
                          "type": "string"
                        }
                      },
                      "required": [
                        "variant",
                        "version"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "k0s": {
                      "description": "K0s defines the k0s configuration. Note, that some fields will be overwritten by k0smotron.\nIf empty, will be used default configuration. @see https://docs.k0sproject.io/stable/configuration/",
                      "type": "object",
                      "x-kubernetes-preserve-unknown-fields": true
                    },
                    "k0sInstallDir": {
                      "default": "/usr/local/bin",
                      "description": "K0sInstallDir specifies the directory where k0s binary will be installed.\nIf empty, k0smotron will use /usr/local/bin, which is the default install path used by k0s get script.",
                      "type": "string"
                    },
                    "postStartCommands": {
                      "description": "PostStartCommands specifies commands to be run after starting k0s worker.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "preInstalledK0s": {
                      "description": "PreInstallK0s specifies whether k0s binary is pre-installed on the node.",
                      "type": "boolean"
                    },
                    "preStartCommands": {
                      "description": "PreStartCommands specifies commands to be run before starting k0s worker.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "tunneling": {
                      "description": "Tunneling defines the tunneling configuration for the cluster.",
                      "properties": {
                        "enabled": {
                          "default": false,
                          "description": "Enabled specifies whether tunneling is enabled.",
                          "type": "boolean"
                        },
                        "mode": {
                          "default": "tunnel",
                          "description": "Mode describes tunneling mode.\nIf empty, k0smotron will use the default one.",
                          "enum": [
                            "tunnel",
                            "proxy"
                          ],
                          "type": "string"
                        },
                        "serverAddress": {
                          "description": "Server address of the tunneling server.\nIf empty, k0smotron will try to detect worker node address for.",
                          "type": "string"
                        },
                        "serverNodePort": {
                          "default": 31700,
                          "description": "NodePort to publish for server port of the tunneling server.\nIf empty, k0smotron will use the default one.",
                          "format": "int32",
                          "type": "integer"
                        },
                        "tunnelingNodePort": {
                          "default": 31443,
                          "description": "NodePort to publish for tunneling port.\nIf empty, k0smotron will use the default one.",
                          "format": "int32",
                          "type": "integer"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "useSystemHostname": {
                      "default": false,
                      "description": "UseSystemHostname specifies whether to use the system hostname for the kubernetes node name.\nBy default, k0smotron will use Machine name as a node name. If true, it will pick it from `hostname` command output.",
                      "type": "boolean"
                    },
                    "workingDir": {
                      "description": "WorkingDir specifies the working directory where k0smotron will place its files.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "machineTemplate": {
                  "description": "K0sControlPlaneTemplateMachineTemplate defines the template for Machines\nin a K0sControlPlaneMachineTemplate object.\nNOTE: K0sControlPlaneTemplateMachineTemplate is similar to K0sControlPlaneMachineTemplate but\nomits ObjectMeta and InfrastructureRef fields. These fields do not make sense on the K0sControlPlaneTemplate,\nbecause they are calculated by the Cluster topology reconciler during reconciliation and thus cannot\nbe configured on the K0sControlPlaneTemplate.",
                  "properties": {
                    "metadata": {
                      "description": "Standard object's metadata.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
                      "properties": {
                        "annotations": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: http://kubernetes.io/docs/user-guide/annotations",
                          "type": "object"
                        },
                        "labels": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "labels is a map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: http://kubernetes.io/docs/user-guide/labels",
                          "type": "object"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "nodeDeletionTimeout": {
                      "description": "NodeDeletionTimeout defines how long the machine controller will attempt to delete the Node that the Machine\nhosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely.\nIf no value is provided, the default value for this property of the Machine resource will be used.",
                      "type": "string"
                    },
                    "nodeDrainTimeout": {
                      "description": "NodeDrainTimeout is the total amount of time that the controller will spend on draining a controlplane node\nThe default value is 0, meaning that the node can be drained without any time limitations.\nNOTE: NodeDrainTimeout is different from `kubectl drain --timeout`",
                      "type": "string"
                    },
                    "nodeVolumeDetachTimeout": {
                      "description": "NodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes\nto be detached. The default value is 0, meaning that the volumes can be detached without any time limitations.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "updateStrategy": {
                  "default": "InPlace",
                  "description": "UpdateStrategy defines the strategy to use when updating the control plane.",
                  "enum": [
                    "InPlace",
                    "Recreate",
                    "RecreateDeleteFirst"
                  ],
                  "type": "string"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "k0sConfigSpec"
              ],
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
