{
  "description": "HetznerBareMetalMachine is the Schema for the hetznerbaremetalmachines 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": "HetznerBareMetalMachineSpec defines the desired state of HetznerBareMetalMachine.",
      "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
    },
    "status": {
      "description": "HetznerBareMetalMachineStatus defines the observed state of HetznerBareMetalMachine.",
      "properties": {
        "addresses": {
          "description": "Addresses is a list of addresses assigned to the machine.\nThis field is copied from the infrastructure provider reference.",
          "items": {
            "description": "MachineAddress contains information for the node's address.",
            "properties": {
              "address": {
                "description": "The machine address.",
                "type": "string"
              },
              "type": {
                "description": "Machine address type, one of Hostname, ExternalIP, InternalIP, ExternalDNS or InternalDNS.",
                "type": "string"
              }
            },
            "required": [
              "address",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "conditions": {
          "description": "Conditions define the current service state of the HetznerBareMetalMachine.",
          "items": {
            "description": "Condition defines an observation of a Cluster API resource operational state.",
            "properties": {
              "lastTransitionTime": {
                "description": "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": "A human readable message indicating details about the transition.\nThis field may be empty.",
                "type": "string"
              },
              "reason": {
                "description": "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 not be empty.",
                "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.",
                "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.",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "failureMessage": {
          "description": "FailureMessage will be set in the event that there is a terminal problem.",
          "type": "string"
        },
        "failureReason": {
          "description": "FailureReason will be set in the event that there is a terminal problem.",
          "type": "string"
        },
        "lastUpdated": {
          "description": "LastUpdated identifies when this status was last observed.",
          "format": "date-time",
          "type": "string"
        },
        "phase": {
          "description": "Phase represents the current phase of HetznerBareMetalMachineStatus actuation.\nE.g. Pending, Running, Terminating, Failed, etc.",
          "type": "string"
        },
        "ready": {
          "description": "Ready is the state of the hetznerbaremetalmachine.",
          "type": "boolean"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
