{
  "description": "HetznerBareMetalMachineTemplate is the Schema for the hetznerbaremetalmachinetemplates API.",
  "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": "HetznerBareMetalMachineTemplateSpec defines the desired state of HetznerBareMetalMachineTemplate.",
      "properties": {
        "template": {
          "description": "HetznerBareMetalMachineTemplateResource describes the data needed to create a HetznerBareMetalMachine from a template.",
          "properties": {
            "spec": {
              "description": "Spec is the specification of the desired behavior of the machine.",
              "properties": {
                "hostSelector": {
                  "description": "HostSelector specifies matching criteria for labels on HetznerBareMetalHosts.\nThis is used to limit the set of HetznerBareMetalHost objects considered for\nclaiming for a HetznerBareMetalMachine.",
                  "properties": {
                    "matchExpressions": {
                      "description": "MatchExpressions defines the label match expressions that must be true on a chosen BareMetalHost.",
                      "items": {
                        "description": "HostSelectorRequirement defines a requirement used for MatchExpressions to select host machines.",
                        "properties": {
                          "key": {
                            "description": "Key defines the key of the label that should be matched in the host object.",
                            "type": "string"
                          },
                          "operator": {
                            "description": "Operator defines the selection operator.",
                            "type": "string"
                          },
                          "values": {
                            "description": "Values define the values whose relation to the label value in the host machine is defined by the selection operator.",
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "key",
                          "operator",
                          "values"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "type": "array"
                    },
                    "matchLabels": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "MatchLabels defines the key/value pairs of labels that must exist on a chosen BareMetalHost.",
                      "type": "object"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "installImage": {
                  "description": "InstallImage is the configuration that is used for the autosetup configuration for installing an OS via InstallImage.",
                  "properties": {
                    "btrfsDefinitions": {
                      "description": "BTRFSDefinitions define the btrfs subvolume definitions to be created.",
                      "items": {
                        "description": "BTRFSDefinition defines the btrfs subvolume definitions to be created.",
                        "properties": {
                          "mount": {
                            "description": "Mount defines the mountpath.",
                            "type": "string"
                          },
                          "subvolume": {
                            "description": "SubVolume defines the subvolume name.",
                            "type": "string"
                          },
                          "volume": {
                            "description": "Volume defines the btrfs volume name.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "mount",
                          "subvolume",
                          "volume"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "type": "array"
                    },
                    "image": {
                      "description": "Image is the image to be provisioned. It defines the image for baremetal machine.",
                      "properties": {
                        "name": {
                          "description": "Name defines the archive name after download. This has to be a valid name for Installimage.",
                          "type": "string"
                        },
                        "path": {
                          "description": "Path is the local path for a preinstalled image from upstream.",
                          "type": "string"
                        },
                        "url": {
                          "description": "URL defines the remote URL for downloading a tar, tar.gz, tar.bz, tar.bz2, tar.xz, tgz, tbz, txz image.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "logicalVolumeDefinitions": {
                      "description": "LVMDefinitions defines the logical volume definitions to be created.",
                      "items": {
                        "description": "LVMDefinition defines the logical volume definitions to be created.",
                        "properties": {
                          "filesystem": {
                            "description": "FileSystem defines the filesystem for this logical volume.",
                            "type": "string"
                          },
                          "mount": {
                            "description": "Mount defines the mountpath.",
                            "type": "string"
                          },
                          "name": {
                            "description": "Name defines the volume name.",
                            "type": "string"
                          },
                          "size": {
                            "description": "Size defines the size in M/G/T or MiB/GiB/TiB.",
                            "type": "string"
                          },
                          "vg": {
                            "description": "VG defines the vg name.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "filesystem",
                          "mount",
                          "name",
                          "size",
                          "vg"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "type": "array"
                    },
                    "partitions": {
                      "description": "Partitions define the additional Partitions to be created in installimage.",
                      "items": {
                        "description": "Partition defines the additional Partitions to be created.",
                        "properties": {
                          "fileSystem": {
                            "description": "FileSystem can be ext2, ext3, ext4, btrfs, reiserfs, xfs, swap\nor name of the LVM volume group (VG), if this PART is a VG.",
                            "type": "string"
                          },
                          "mount": {
                            "description": "Mount defines the mount path for this filesystem.\nKeyword 'lvm' to use this PART as volume group (VG) for LVM.\nIdentifier 'btrfs.X' to use this PART as volume for\nbtrfs subvolumes. X can be replaced with a unique\nalphanumeric keyword. NOTE: no support for btrfs multi-device volumes.",
                            "type": "string"
                          },
                          "size": {
                            "description": "Size can use the keyword 'all' to assign all the remaining space of the drive to the last partition.\nYou can use M/G/T for unit specification in MiB/GiB/TiB.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "fileSystem",
                          "mount",
                          "size"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "type": "array"
                    },
                    "postInstallScript": {
                      "description": "PostInstallScript (Bash) is used for configuring commands that should be executed after installimage.\nIt is passed along with the installimage command.",
                      "type": "string"
                    },
                    "swraid": {
                      "default": 0,
                      "description": "Swraid defines the SWRAID in InstallImage. It enables or disables raids. Set 1 to enable.",
                      "enum": [
                        0,
                        1
                      ],
                      "type": "integer"
                    },
                    "swraidLevel": {
                      "default": 1,
                      "description": "SwraidLevel defines the SWRAIDLEVEL in InstallImage. Only relevant if the raid is enabled.\nPick one of 0,1,5,6,10. Ignored if Swraid=0.",
                      "enum": [
                        0,
                        1,
                        5,
                        6,
                        10
                      ],
                      "type": "integer"
                    }
                  },
                  "required": [
                    "image",
                    "partitions"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "providerID": {
                  "description": "ProviderID will be the hetznerbaremetalmachine which is set by the controller\nin the `hcloud://bm-<server-id>` format.",
                  "type": "string"
                },
                "sshSpec": {
                  "description": "SSHSpec gives a reference on the secret where SSH details are specified as well as ports for SSH.",
                  "properties": {
                    "portAfterCloudInit": {
                      "description": "PortAfterCloudInit specifies the port that has to be used to connect to the machine\nby reaching the server via SSH after the successful completion of cloud init.",
                      "type": "integer"
                    },
                    "portAfterInstallImage": {
                      "default": 22,
                      "description": "PortAfterInstallImage specifies the port that has to be used to connect to the machine\nby reaching the server via SSH after installing the image successfully.",
                      "type": "integer"
                    },
                    "secretRef": {
                      "description": "SecretRef gives reference to the secret where the SSH key is stored.",
                      "properties": {
                        "key": {
                          "description": "Key contains details about the keys used in the data of the secret.",
                          "properties": {
                            "name": {
                              "description": "Name is the key in the secret's data where the SSH key's name is stored.",
                              "type": "string"
                            },
                            "privateKey": {
                              "description": "PrivateKey is the key in the secret's data where the SSH key's private key is stored.",
                              "type": "string"
                            },
                            "publicKey": {
                              "description": "PublicKey is the key in the secret's data where the SSH key's public key is stored.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "privateKey",
                            "publicKey"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        },
                        "name": {
                          "description": "Name is the name of the secret.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "key",
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "secretRef"
                  ],
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "required": [
                "installImage"
              ],
              "type": "object",
              "additionalProperties": false
            }
          },
          "required": [
            "spec"
          ],
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "template"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
