{
  "description": "HetznerCluster is the Schema for the hetznercluster 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": "HetznerClusterSpec defines the desired state of HetznerCluster.",
      "properties": {
        "controlPlaneEndpoint": {
          "description": "ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.",
          "properties": {
            "host": {
              "description": "The hostname on which the API server is serving.",
              "type": "string"
            },
            "port": {
              "description": "The port on which the API server is serving.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "host",
            "port"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "controlPlaneLoadBalancer": {
          "description": "ControlPlaneLoadBalancer is an optional configuration for customizing control plane behavior.",
          "properties": {
            "algorithm": {
              "allOf": [
                {
                  "enum": [
                    "round_robin",
                    "least_connections"
                  ]
                },
                {
                  "enum": [
                    "round_robin",
                    "least_connections"
                  ]
                }
              ],
              "default": "round_robin",
              "description": "Algorithm defines the type of load balancer algorithm. It could be round_robin or least_connection. The default value is \"round_robin\".",
              "type": "string"
            },
            "enabled": {
              "default": true,
              "description": "Enabled specifies if a load balancer should be created.",
              "type": "boolean"
            },
            "extraServices": {
              "description": "ExtraServices defines how traffic will be routed from the load balancer to your target server.",
              "items": {
                "description": "LoadBalancerServiceSpec defines a load balancer Target.",
                "properties": {
                  "destinationPort": {
                    "description": "DestinationPort defines the port on the server. It must be a valid port range (1-65535).",
                    "maximum": 65535,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "listenPort": {
                    "description": "ListenPort, i.e. source port, defines the incoming port open on the load balancer. It must be a valid port range (1-65535).",
                    "maximum": 65535,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "protocol": {
                    "description": "Protocol specifies the supported load balancer Protocol. It could be one of the https, http, or tcp.",
                    "enum": [
                      "http",
                      "https",
                      "tcp"
                    ],
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            },
            "name": {
              "description": "Name defines the name of the load balancer. It can be specified in order to use an existing load balancer.",
              "type": "string"
            },
            "port": {
              "default": 6443,
              "description": "Port defines the API Server port. It must be a valid port range (1-65535). If omitted, the default value is 6443.",
              "maximum": 65535,
              "minimum": 1,
              "type": "integer"
            },
            "region": {
              "description": "Region contains the name of the HCloud location where the load balancer is running.",
              "enum": [
                "fsn1",
                "hel1",
                "nbg1",
                "ash",
                "hil",
                "sin"
              ],
              "type": "string"
            },
            "type": {
              "default": "lb11",
              "description": "Type defines the type of load balancer. It could be one of lb11, lb21, or lb31.",
              "enum": [
                "lb11",
                "lb21",
                "lb31"
              ],
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "controlPlaneRegions": {
          "description": "ControlPlaneRegion consists of a list of HCloud Regions (fsn, nbg, hel). Because HCloud Networks\nhave a very low latency we could assume in some use cases that a region is behaving like a zone.\nhttps://kubernetes.io/docs/reference/labels-annotations-taints/#topologykubernetesiozone",
          "items": {
            "description": "Region is a Hetzner Location.",
            "enum": [
              "fsn1",
              "hel1",
              "nbg1",
              "ash",
              "hil",
              "sin"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "hcloudNetwork": {
          "description": "HCloudNetwork defines details about the private Network for Hetzner Cloud. If left empty, no private Network is configured.",
          "properties": {
            "cidrBlock": {
              "default": "10.0.0.0/16",
              "description": "CIDRBlock defines the cidrBlock of the HCloud Network. If omitted, default \"10.0.0.0/16\" will be used.",
              "type": "string"
            },
            "enabled": {
              "description": "Enabled defines whether the network should be enabled or not.",
              "type": "boolean"
            },
            "networkZone": {
              "default": "eu-central",
              "description": "NetworkZone specifies the HCloud network zone of the private network.\nThe zones must be one of eu-central, us-east, or us-west. The default is eu-central.",
              "enum": [
                "eu-central",
                "us-east",
                "us-west",
                "ap-southeast"
              ],
              "type": "string"
            },
            "subnetCidrBlock": {
              "default": "10.0.0.0/24",
              "description": "SubnetCIDRBlock defines the cidrBlock for the subnet of the HCloud Network.\nNote: A subnet is required.",
              "type": "string"
            }
          },
          "required": [
            "enabled"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "hcloudPlacementGroups": {
          "items": {
            "description": "HCloudPlacementGroupSpec defines a PlacementGroup.",
            "properties": {
              "name": {
                "minLength": 1,
                "type": "string"
              },
              "type": {
                "default": "spread",
                "enum": [
                  "spread"
                ],
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "hetznerSecretRef": {
          "description": "HetznerSecretRef is a reference to a token to be used when reconciling this cluster.\nThis is generated in the security section under API TOKENS. Read & write is necessary.",
          "properties": {
            "key": {
              "description": "Key defines the keys that are used in the secret.\nNeed to specify either HCloudToken or both HetznerRobotUser and HetznerRobotPassword.",
              "properties": {
                "hcloudToken": {
                  "default": "hcloud-token",
                  "description": "HCloudToken defines the name of the key where the token for the Hetzner Cloud API is stored.",
                  "type": "string"
                },
                "hetznerRobotPassword": {
                  "default": "hetzner-robot-password",
                  "description": "HetznerRobotPassword defines the name of the key where the password for the Hetzner Robot API is stored.",
                  "type": "string"
                },
                "hetznerRobotUser": {
                  "default": "hetzner-robot-user",
                  "description": "HetznerRobotUser defines the name of the key where the username for the Hetzner Robot API is stored.",
                  "type": "string"
                },
                "sshKey": {
                  "default": "hcloud-ssh-key-name",
                  "description": "SSHKey defines the name of the ssh key.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "name": {
              "default": "hetzner",
              "description": "Name defines the name of the secret.",
              "type": "string"
            }
          },
          "required": [
            "key",
            "name"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "skipCreatingHetznerSecretInWorkloadCluster": {
          "description": "SkipCreatingHetznerSecretInWorkloadCluster indicates whether the Hetzner secret should be\ncreated in the workload cluster. By default the secret gets created, so that the ccm (running\nin the wl-cluster) can use that secret. If you prefer to not reveal the secret in the\nwl-cluster, you can set this to value to false, so that the secret is not created. Be sure to\nrun the ccm outside of the wl-cluster in that case, e.g. in the management cluster.",
          "type": "boolean"
        },
        "sshKeys": {
          "description": "SSHKeys are cluster wide. Valid values are a valid SSH key name.",
          "properties": {
            "hcloud": {
              "description": "Hcloud defines the SSH keys used for hcloud.",
              "items": {
                "description": "SSHKey defines the SSHKey for HCloud.",
                "properties": {
                  "fingerprint": {
                    "description": "Fingerprint defines the fingerprint of the SSH key - added by the controller.",
                    "type": "string"
                  },
                  "name": {
                    "description": "Name defines the name of the SSH key.",
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            },
            "robotRescueSecretRef": {
              "description": "RobotRescueSecretRef defines the reference to the secret where the SSH key for the rescue system 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
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "controlPlaneRegions",
        "hetznerSecretRef",
        "sshKeys"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "HetznerClusterStatus defines the observed state of HetznerCluster.",
      "properties": {
        "conditions": {
          "description": "Conditions provide observations of the operational state of a Cluster API resource.",
          "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"
        },
        "controlPlaneLoadBalancer": {
          "description": "LoadBalancerStatus defines the observed state of the control plane load balancer.",
          "properties": {
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "internalIP": {
              "type": "string"
            },
            "ipv4": {
              "type": "string"
            },
            "ipv6": {
              "type": "string"
            },
            "protected": {
              "type": "boolean"
            },
            "targets": {
              "items": {
                "description": "LoadBalancerTarget defines the target of a load balancer.",
                "properties": {
                  "ip": {
                    "type": "string"
                  },
                  "serverID": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": {
                    "description": "LoadBalancerTargetType defines the target type.",
                    "enum": [
                      "server",
                      "ip"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "type"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "failureDomains": {
          "additionalProperties": {
            "description": "FailureDomainSpec is the Schema for Cluster API failure domains.\nIt allows controllers to understand how many failure domains a cluster can optionally span across.",
            "properties": {
              "attributes": {
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Attributes is a free form map of attributes an infrastructure provider might use or require.",
                "type": "object"
              },
              "controlPlane": {
                "description": "ControlPlane determines if this failure domain is suitable for use by control plane machines.",
                "type": "boolean"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "description": "FailureDomains is a slice of FailureDomains.",
          "type": "object"
        },
        "hcloudPlacementGroups": {
          "items": {
            "description": "HCloudPlacementGroupStatus returns the status of a Placementgroup.",
            "properties": {
              "id": {
                "format": "int64",
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "servers": {
                "items": {
                  "format": "int64",
                  "type": "integer"
                },
                "type": "array"
              },
              "type": {
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "networkStatus": {
          "description": "NetworkStatus defines the observed state of the HCloud Private Network.",
          "properties": {
            "attachedServers": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "ready": {
          "default": false,
          "type": "boolean"
        }
      },
      "required": [
        "ready"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
