{
  "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": {
        "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"
        },
        "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
    },
    "status": {
      "properties": {
        "conditions": {
          "description": "Conditions defines current service state of the K0sControllerConfig.",
          "items": {
            "description": "Condition defines an observation of a Cluster API resource operational state.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when\nthe API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis field may be empty.",
                "maxLength": 10240,
                "minLength": 1,
                "type": "string"
              },
              "reason": {
                "description": "reason is the reason for the condition's last transition in CamelCase.\nThe specific API may choose whether or not this field is considered a guaranteed API.\nThis field may be empty.",
                "maxLength": 256,
                "minLength": 1,
                "type": "string"
              },
              "severity": {
                "description": "severity provides an explicit classification of Reason code, so the users or machines can immediately\nunderstand the current situation and act accordingly.\nThe Severity field MUST be set only when Status=False.",
                "maxLength": 32,
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions\ncan be useful (see .node.status.conditions), the ability to deconflict is important.",
                "maxLength": 256,
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "dataSecretName": {
          "description": "DataSecretName is the name of the secret that stores the bootstrap data script.",
          "type": "string"
        },
        "ready": {
          "description": "Ready indicates the Bootstrapdata field is ready to be consumed",
          "type": "boolean"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
