ComputeReservation
| Property | Value |
|---|---|
| Google Cloud Service Name | Compute Engine |
| Google Cloud Service Documentation | /compute/docs/ |
| Google Cloud REST Resource Name | v1.reservations |
| Google Cloud REST Resource Documentation | /compute/docs/reference/rest/v1/reservations |
| Config Connector Resource Short Names | computereservation gcpcomputereservation gcpcomputereservations |
| Config Connector Service Name | compute.googleapis.com |
| Config Connector Resource Fully Qualified Name | computereservations.compute.cnrm.cloud.google.com |
| Can Be Referenced by IAMPolicy/IAMPolicyMember | No |
| Config Connector Default Average Reconcile Interval In Seconds | 600 |
Custom Resource Definition Properties
Annotations
| Fields | |
|---|---|
cnrm.cloud.google.com/project-id |
|
Spec
Schema
description: string
resourceID: string
shareSettings:
projectMap:
- keyRef:
apiVersion: string
external: string
kind: string
name: string
namespace: string
value:
projectIDRef:
external: string
kind: string
name: string
namespace: string
shareType: string
specificReservation:
count: integer
inUseCount: integer
instanceProperties:
guestAccelerators:
- acceleratorCount: integer
acceleratorType: string
localSsds:
- diskSizeGb: integer
interface: string
machineType: string
minCpuPlatform: string
specificReservationRequired: boolean
zone: string
| Fields | |
|---|---|
|
Optional |
Immutable. An optional description of this resource. |
|
Optional |
Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. |
|
Optional |
The share setting for reservations and sole tenancy node groups. |
|
Optional |
A map of key(i.e. project or other shared resources) and associated project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. |
|
Optional |
|
|
Required* |
The resource reference that defaults to Project if Kind is not specified. |
|
Optional |
APIVersion of the referenced resource |
|
Optional |
The external name of the referenced resource |
|
Optional |
Kind of the referenced resource |
|
Optional |
|
|
Optional |
|
|
Optional |
|
|
Optional |
The project ID, should be same as the key of this project config in the parent map. |
|
Optional |
The `projectID` field of a project, when not managed by Config Connector. |
|
Optional |
The kind of the Project resource; optional but must be `Project` if provided. |
|
Optional |
The `name` field of a `Project` resource. |
|
Optional |
The `namespace` field of a `Project` resource. |
|
Optional |
Immutable. Type of sharing for this shared-reservation Check the ShareType enum for the list of possible values. |
|
Required |
Reservation for instances with specific machine shapes. |
|
Required |
The number of resources that are allocated. |
|
Optional |
How many instances are in use. |
|
Required |
Immutable. The instance properties for the reservation. |
|
Optional |
Immutable. Guest accelerator type and count. |
|
Optional |
|
|
Required* |
Immutable. The number of the guest accelerator cards exposed to this instance. |
|
Required* |
Immutable. The full or partial URL of the accelerator type to attach to this instance. For example: 'projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100' If you are creating an instance template, specify only the accelerator name. |
|
Optional |
Immutable. The amount of local ssd to reserve with each instance. This reserves disks of type 'local-ssd'. |
|
Optional |
|
|
Required* |
Immutable. The size of the disk in base-2 GB. |
|
Optional |
Immutable. The disk interface to use for attaching this disk. Default value: "SCSI" Possible values: ["SCSI", "NVME"]. |
|
Required |
Immutable. The name of the machine type to reserve. |
|
Optional |
Immutable. The minimum CPU platform for the reservation. For example, '"Intel Skylake"'. See the CPU platform availability reference](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones) for information on available CPU platforms. |
|
Optional |
Immutable. When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false. |
|
Required |
Immutable. The zone where the reservation is made. |
* Field is required when parent field is specified
Status
Schema
commitment: string
conditions:
- lastTransitionTime: string
message: string
reason: string
status: string
type: string
creationTimestamp: string
externalRef: string
observedGeneration: integer
selfLink: string
status: string
| Fields | |
|---|---|
commitment |
Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. |
conditions |
Conditions represent the latest available observations of the object's current state. |
conditions[] |
|
conditions[].lastTransitionTime |
Last time the condition transitioned from one status to another. |
conditions[].message |
Human-readable message indicating details about last transition. |
conditions[].reason |
Unique, one-word, CamelCase reason for the condition's last transition. |
conditions[].status |
Status is the status of the condition. Can be True, False, Unknown. |
conditions[].type |
Type is the type of the condition. |
creationTimestamp |
Creation timestamp in RFC3339 text format. |
externalRef |
A unique specifier for the ComputeReservation resource in Google Cloud. |
observedGeneration |
ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. |
selfLink |
Server-defined URL for the resource. |
status |
The status of the reservation. |
Sample YAML(s)
Bulk Compute Reservation
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeReservation
metadata:
name: computereservation-sample-bulk
spec:
description: Reservation for 2 basic machines which will become generally available for VM instances to consume.
zone: us-central1-a
specificReservation:
count: 2
instanceProperties:
machineType: n1-standard-1
minCpuPlatform: "Intel Sandy Bridge"
Specialized Compute Reservation
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeReservation
metadata:
name: computereservation-sample-specialized
spec:
description: Reservation for a single tricked out machine that can only be consumed by a VM instance that references this reservation.
zone: us-central1-a
specificReservationRequired: true
specificReservation:
count: 1
instanceProperties:
machineType: n1-highmem-8
minCpuPlatform: "Intel Skylake"
guestAccelerators:
- acceleratorCount: 1
acceleratorType: nvidia-tesla-v100
localSsds:
- interface: NVME
diskSizeGb: 375