A private pool configuration file (private pool config file) contains
instructions for Cloud Build to create a private pool based on
your specifications. A private pool config file contains information such as the
disk size and machine type you want to use for your private pool. The
private pool config file is required when you create and manage private pools
using the gcloud
tool or the Cloud Build API.
Structure of a private pool config file
You can write the private pool config file using the YAML or the JSON
syntax. To create and manage private pools using curl
, write
the private pool config file in the JSON format. To create and manage private
pools using the gcloud
tool, write the private pool config file in the
YAML or the JSON format.
A private pool config file has the following structure:
YAML
privatePoolV1Config:
networkConfig:
egressOption: NO_PUBLIC_EGRESS
peeredNetwork: PEERED_NETWORK
workerConfig:
diskSizeGb: 'PRIVATE_POOL_DISK_SIZE'
machineType: PRIVATE_POOL_MACHINE_TYPE
JSON
{
"privatePoolV1Config": {
"networkConfig": {
"egressOption": "NO_PUBLIC_EGRESS",
"peeredNetwork": "PEERED_NETWORK"
},
"workerConfig": {
"diskSizeGb": "PRIVATE_POOL_DISK_SIZE",
"machineType": "PRIVATE_POOL_MACHINE_TYPE"
}
}
}
The fields in the private pool config file are explained below:
networkConfig
This is an optional field. Specify networkConfig
only if you're peering your
VPC network with the service producer network.
egressOption
This is an optional field. Set the value of this field to NO_PUBLIC_EGRESS
if
you're creating your private pool within a VPC Service Controls perimeter. If you
don't include this field in the private pool config file, public egress is enabled.
For information on setting up VPC Service Controls for private pools, see
Using VPC Service Controls.
peeredNetwork
This is a required field if your private pool config file contains the networkConfig
field. Set the value of this field to the network
resource URL of the VPC network that is peered to the service
producer network. The network resource URL must be of the format
projects/NETWORK_PROJECT_ID/global/networks/NETWORK_NAME
,
where NETWORK_PROJECT_ID is the project ID of
the Cloud project that holds your VPC network and
NETWORK_NAME is the name of your VPC network.
If you don't specify a value, Cloud Build uses the service producer
network by default.
workerConfig
This is a required field. It contains configuration options for your private pool.
diskSizeGb
This is an optional field. Use this field to specify a disk size for your
private pool instance in GB. Specify a value greater than or equal to
100 and less than or equal to 1000. If you don't include this field in your private
pool config file, or if you specify 0
as the value of this field,
Cloud Build uses the default value of 100.
machineType
This is an optional field. Use this field to specify the Compute Engine machine type for your private pool instance. Specify one of the following machine types:
+ `e2-medium`
+ `e2-standard-2`
+ `e2-standard-4`
+ `e2-standard-8`
+ `e2-standard-16`
+ `e2-standard-32`
+ `e2-highmem-2`
+ `e2-highmem-4`
+ `e2-highmem-8`
+ `e2-highmem-16`
+ `e2-highcpu-2`
+ `e2-highcpu-4`
+ `e2-highcpu-8`
+ `e2-highcpu-16`
+ `e2-highcpu-32`
If you don't specify a value, Cloud Build uses the default value
of e2-medium
.
What's next
- Learn how to run builds in private pools.
- Learn how to create and manage private pools.