{
  "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": {
                "args": {
                  "description": "Args specifies extra arguments to be passed to k0s worker.\nSee: https://docs.k0sproject.io/stable/worker-node-config/\nSee: https://docs.k0sproject.io/stable/cli/k0s_worker/",
                  "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 to download k0s binary from.\nIf specified the version field is ignored and what ever version is downloaded from the URL is used.",
                  "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
                },
                "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"
                },
                "secretMetadata": {
                  "description": "SecretMetadata specifies metadata (labels and annotations) to be propagated to the bootstrap Secret.",
                  "properties": {
                    "annotations": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "Annotations to be added to the bootstrap Secret",
                      "type": "object"
                    },
                    "labels": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "Labels to be added to the bootstrap Secret",
                      "type": "object"
                    }
                  },
                  "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"
                },
                "version": {
                  "description": "Version is the version of k0s to use. In case this is not set, k0smotron will use\na version field of the Machine object. If it's empty, the latest version is used.\nMake sure the version is compatible with the k0s version running on the control plane.\nFor reference see the Kubernetes version skew policy: https://kubernetes.io/docs/setup/release/version-skew-policy/",
                  "type": "string"
                },
                "workingDir": {
                  "description": "WorkingDir specifies the working directory where k0smotron will place its files.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
