{
  "description": "GCPCluster is the Schema for the gcpclusters 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": "GCPClusterSpec defines the desired state of GCPCluster.",
      "properties": {
        "additionalLabels": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "AdditionalLabels is an optional set of tags to add to GCP resources managed by the GCP provider, in addition to the\nones added by default.",
          "type": "object"
        },
        "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
        },
        "credentialsRef": {
          "description": "CredentialsRef is a reference to a Secret that contains the credentials to use for provisioning this cluster. If not\nsupplied then the credentials of the controller will be used.",
          "properties": {
            "name": {
              "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
              "type": "string"
            },
            "namespace": {
              "description": "Namespace of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
              "type": "string"
            }
          },
          "required": [
            "name",
            "namespace"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "failureDomains": {
          "description": "FailureDomains is an optional field which is used to assign selected availability zones to a cluster\nFailureDomains if empty, defaults to all the zones in the selected region and if specified would override\nthe default zones.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "loadBalancer": {
          "description": "LoadBalancer contains configuration for one or more LoadBalancers.",
          "properties": {
            "apiServerInstanceGroupTagOverride": {
              "description": "APIServerInstanceGroupTagOverride overrides the default setting for the\ntag used when creating the API Server Instance Group.",
              "maxLength": 16,
              "pattern": "(^[1-9][0-9]{0,31}$)|(^[a-z][a-z0-9-]{4,28}[a-z0-9]$)",
              "type": "string"
            },
            "internalLoadBalancer": {
              "description": "InternalLoadBalancer is the configuration for an Internal Passthrough Network Load Balancer.",
              "properties": {
                "name": {
                  "description": "Name is the name of the Load Balancer. If not set a default name\nwill be used. For an Internal Load Balancer service the default\nname is \"api-internal\".",
                  "pattern": "(^[1-9][0-9]{0,31}$)|(^[a-z][a-z0-9-]{4,28}[a-z0-9]$)",
                  "type": "string"
                },
                "subnet": {
                  "description": "Subnet is the name of the subnet to use for a regional Load Balancer. A subnet is\nrequired for the Load Balancer, if not defined the first configured subnet will be\nused.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "loadBalancerType": {
              "description": "LoadBalancerType defines the type of Load Balancer that should be created.\nIf not set, a Global External Proxy Load Balancer will be created by default.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "network": {
          "description": "NetworkSpec encapsulates all things related to GCP network.",
          "properties": {
            "autoCreateSubnetworks": {
              "description": "AutoCreateSubnetworks: When set to true, the VPC network is created\nin \"auto\" mode. When set to false, the VPC network is created in\n\"custom\" mode.\n\nAn auto mode VPC network starts with one subnet per region. Each\nsubnet has a predetermined range as described in Auto mode VPC\nnetwork IP ranges.\n\nDefaults to true.",
              "type": "boolean"
            },
            "hostProject": {
              "description": "HostProject is the name of the project hosting the shared VPC network resources.",
              "type": "string"
            },
            "loadBalancerBackendPort": {
              "description": "Allow for configuration of load balancer backend (useful for changing apiserver port)",
              "format": "int32",
              "type": "integer"
            },
            "mtu": {
              "default": 1460,
              "description": "Mtu: Maximum Transmission Unit in bytes. The minimum value for this field is\n1300 and the maximum value is 8896. The suggested value is 1500, which is\nthe default MTU used on the Internet, or 8896 if you want to use Jumbo\nframes. If unspecified, the value defaults to 1460.\nMore info: https://pkg.go.dev/google.golang.org/api/compute/v1#Network",
              "format": "int64",
              "maximum": 8896,
              "minimum": 1300,
              "type": "integer"
            },
            "name": {
              "description": "Name is the name of the network to be used.",
              "type": "string"
            },
            "subnets": {
              "description": "Subnets configuration.",
              "items": {
                "description": "SubnetSpec configures an GCP Subnet.",
                "properties": {
                  "cidrBlock": {
                    "description": "CidrBlock is the range of internal addresses that are owned by this\nsubnetwork. Provide this property when you create the subnetwork. For\nexample, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and\nnon-overlapping within a network. Only IPv4 is supported. This field\ncan be set only at resource creation time.",
                    "type": "string"
                  },
                  "description": {
                    "description": "Description is an optional description associated with the resource.",
                    "type": "string"
                  },
                  "enableFlowLogs": {
                    "description": "EnableFlowLogs: Whether to enable flow logging for this subnetwork.\nIf this field is not explicitly set, it will not appear in get\nlistings. If not set the default behavior is to disable flow logging.",
                    "type": "boolean"
                  },
                  "name": {
                    "description": "Name defines a unique identifier to reference this resource.",
                    "type": "string"
                  },
                  "privateGoogleAccess": {
                    "description": "PrivateGoogleAccess defines whether VMs in this subnet can access\nGoogle services without assigning external IP addresses",
                    "type": "boolean"
                  },
                  "purpose": {
                    "default": "PRIVATE_RFC_1918",
                    "description": "Purpose: The purpose of the resource.\nIf unspecified, the purpose defaults to PRIVATE_RFC_1918.\nThe enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.\n\nPossible values:\n  \"INTERNAL_HTTPS_LOAD_BALANCER\" - Subnet reserved for Internal\nHTTP(S) Load Balancing.\n  \"PRIVATE\" - Regular user created or automatically created subnet.\n  \"PRIVATE_RFC_1918\" - Regular user created or automatically created\nsubnet.\n  \"PRIVATE_SERVICE_CONNECT\" - Subnetworks created for Private Service\nConnect in the producer network.\n  \"REGIONAL_MANAGED_PROXY\" - Subnetwork used for Regional\nInternal/External HTTP(S) Load Balancing.",
                    "enum": [
                      "INTERNAL_HTTPS_LOAD_BALANCER",
                      "PRIVATE_RFC_1918",
                      "PRIVATE",
                      "PRIVATE_SERVICE_CONNECT",
                      "REGIONAL_MANAGED_PROXY"
                    ],
                    "type": "string"
                  },
                  "region": {
                    "description": "Region is the name of the region where the Subnetwork resides.",
                    "type": "string"
                  },
                  "secondaryCidrBlocks": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "SecondaryCidrBlocks defines secondary CIDR ranges,\nfrom which secondary IP ranges of a VM may be allocated",
                    "type": "object"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "project": {
          "description": "Project is the name of the project to deploy the cluster to.",
          "type": "string"
        },
        "region": {
          "description": "The GCP Region the cluster lives in.",
          "type": "string"
        },
        "resourceManagerTags": {
          "description": "ResourceManagerTags is an optional set of tags to apply to GCP resources managed\nby the GCP provider. GCP supports a maximum of 50 tags per resource.",
          "items": {
            "description": "ResourceManagerTag is a tag to apply to GCP resources managed by the GCP provider.",
            "properties": {
              "key": {
                "description": "Key is the key part of the tag. A tag key can have a maximum of 63 characters and cannot\nbe empty. Tag key must begin and end with an alphanumeric character, and must contain\nonly uppercase, lowercase alphanumeric characters, and the following special\ncharacters `._-`.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-zA-Z0-9]([0-9A-Za-z_.-]{0,61}[a-zA-Z0-9])?$",
                "type": "string"
              },
              "parentID": {
                "description": "ParentID is the ID of the hierarchical resource where the tags are defined\ne.g. at the Organization or the Project level. To find the Organization or Project ID ref\nhttps://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id\nhttps://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects\nAn OrganizationID must consist of decimal numbers, and cannot have leading zeroes.\nA ProjectID must be 6 to 30 characters in length, can only contain lowercase letters,\nnumbers, and hyphens, and must start with a letter, and cannot end with a hyphen.",
                "maxLength": 32,
                "minLength": 1,
                "pattern": "(^[1-9][0-9]{0,31}$)|(^[a-z][a-z0-9-]{4,28}[a-z0-9]$)",
                "type": "string"
              },
              "value": {
                "description": "Value is the value part of the tag. A tag value can have a maximum of 63 characters and\ncannot be empty. Tag value must begin and end with an alphanumeric character, and must\ncontain only uppercase, lowercase alphanumeric characters, and the following special\ncharacters `_-.@%=+:,*#&(){}[]` and spaces.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-zA-Z0-9]([0-9A-Za-z_.@%=+:,*#&()\\[\\]{}\\-\\s]{0,61}[a-zA-Z0-9])?$",
                "type": "string"
              }
            },
            "required": [
              "key",
              "parentID",
              "value"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "required": [
        "project",
        "region"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "GCPClusterStatus defines the observed state of GCPCluster.",
      "properties": {
        "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"
        },
        "network": {
          "description": "Network encapsulates GCP networking resources.",
          "properties": {
            "apiInternalBackendService": {
              "description": "APIInternalBackendService is the full reference to the backend service\ncreated for the internal Load Balancer.",
              "type": "string"
            },
            "apiInternalForwardingRule": {
              "description": "APIInternalForwardingRule is the full reference to the forwarding rule\ncreated for the internal Load Balancer.",
              "type": "string"
            },
            "apiInternalHealthCheck": {
              "description": "APIInternalHealthCheck is the full reference to the health check\ncreated for the internal Load Balancer.",
              "type": "string"
            },
            "apiInternalIpAddress": {
              "description": "APIInternalAddress is the IPV4 regional address assigned to the\ninternal Load Balancer.",
              "type": "string"
            },
            "apiServerBackendService": {
              "description": "APIServerBackendService is the full reference to the backend service\ncreated for the API Server.",
              "type": "string"
            },
            "apiServerForwardingRule": {
              "description": "APIServerForwardingRule is the full reference to the forwarding rule\ncreated for the API Server.",
              "type": "string"
            },
            "apiServerHealthCheck": {
              "description": "APIServerHealthCheck is the full reference to the health check\ncreated for the API Server.",
              "type": "string"
            },
            "apiServerInstanceGroups": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "APIServerInstanceGroups is a map from zone to the full reference\nto the instance groups created for the control plane nodes created in the same zone.",
              "type": "object"
            },
            "apiServerIpAddress": {
              "description": "APIServerAddress is the IPV4 global address assigned to the load balancer\ncreated for the API Server.",
              "type": "string"
            },
            "apiServerTargetProxy": {
              "description": "APIServerTargetProxy is the full reference to the target proxy\ncreated for the API Server.",
              "type": "string"
            },
            "firewallRules": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "FirewallRules is a map from the name of the rule to its full reference.",
              "type": "object"
            },
            "router": {
              "description": "Router is the full reference to the router created within the network\nit'll contain the cloud nat gateway",
              "type": "string"
            },
            "selfLink": {
              "description": "SelfLink is the link to the Network used for this cluster.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "ready": {
          "description": "Bastion Instance `json:\"bastion,omitempty\"`",
          "type": "boolean"
        }
      },
      "required": [
        "ready"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
