{
  "description": "Topology is the Schema for the topology 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": "spec is the specification of the Topology.",
      "properties": {
        "levels": {
          "description": "levels define the levels of topology.",
          "items": {
            "description": "TopologyLevel defines the desired state of TopologyLevel",
            "properties": {
              "nodeLabel": {
                "description": "nodeLabel indicates the name of the node label for a specific topology\nlevel.\n\nExamples:\n- cloud.provider.com/topology-block\n- cloud.provider.com/topology-rack",
                "maxLength": 316,
                "minLength": 1,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "nodeLabel"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "maxItems": 16,
          "minItems": 1,
          "type": "array",
          "x-kubernetes-list-type": "atomic",
          "x-kubernetes-validations": [
            {
              "message": "field is immutable",
              "rule": "self == oldSelf"
            },
            {
              "message": "must be unique",
              "rule": "size(self.filter(i, size(self.filter(j, j == i)) > 1)) == 0"
            },
            {
              "message": "the kubernetes.io/hostname label can only be used at the lowest level of topology",
              "rule": "size(self.filter(i, i.nodeLabel == 'kubernetes.io/hostname')) == 0 || self[size(self) - 1].nodeLabel == 'kubernetes.io/hostname'"
            }
          ]
        }
      },
      "required": [
        "levels"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
