Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/docs/provider-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,22 @@ the value zero will be omitted from the request because GCP client
will not write any &ldquo;empty&rdquo; values to the request</p>
</td>
</tr>
<tr>
<td>
<code>storagePool</code>
</td>
<td>
<em>
*string
</em>
</td>
<td>
<em>(Optional)</em>
<p>StoragePool in which the new disk is created.
You can provide this as a partial or full URL to the resource. For example
<a href="https://www.googleapis.com/compute/v1/projects/project/zones/zone">https://www.googleapis.com/compute/v1/projects/project/zones/zone</a></p>
</td>
</tr>
</tbody>
</table>
<br>
Expand Down
1 change: 1 addition & 0 deletions kubernetes/machine-class.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ providerSpec:
# kmsKeyServiceAccount: "[email protected]" # email of service account (optional)
# provisionedIops: 3000 # IOPS that the disk can handle (optional)
# provisionedThroughput: 140 # throughput unit in MB per sec (optional)
# storagePool: projects/<projectName>/zones/<zoneName>/storagePools/<storagePoolName> # StoragePool where the new disk is created (optional). Can be passed as a partial or full URL to the resource
labels:
name: test-mc # Label assigned to the disk
labels:
Expand Down
6 changes: 6 additions & 0 deletions pkg/api/v1alpha1/provider_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ type GCPDisk struct {
// the value zero will be omitted from the request because GCP client
// will not write any "empty" values to the request
ProvisionedThroughput int64 `json:"provisionedThroughput,omitempty"`

// StoragePool in which the new disk is created.
// You can provide this as a partial or full URL to the resource. For example
// https://www.googleapis.com/compute/v1/projects/project/zones/zone
// +optional
StoragePool *string `json:"storagePool,omitempty"`
}

// GCPDiskEncryption holds references to encryption data
Expand Down
1 change: 1 addition & 0 deletions pkg/gcp/machine_controller_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ func createAttachedDisks(disks []*api.GCPDisk, zone, machineName string) []*comp
SourceImage: disk.Image,
ProvisionedIops: disk.ProvisionedIops,
ProvisionedThroughput: disk.ProvisionedThroughput,
StoragePool: ptr.Deref(disk.StoragePool, ""),
},
}
}
Expand Down
Loading