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 gcpcomputereservation
gcpcomputereservations
computereservation
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
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

description

Optional

string

Immutable. An optional description of this resource.

resourceID

Optional

string

Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default.

specificReservation

Required

object

Reservation for instances with specific machine shapes.

specificReservation.count

Required

integer

The number of resources that are allocated.

specificReservation.inUseCount

Optional

integer

How many instances are in use.

specificReservation.instanceProperties

Required

object

Immutable. The instance properties for the reservation.

specificReservation.instanceProperties.guestAccelerators

Optional

list (object)

Immutable. Guest accelerator type and count.

specificReservation.instanceProperties.guestAccelerators[]

Optional

object

specificReservation.instanceProperties.guestAccelerators[].acceleratorCount

Required*

integer

Immutable. The number of the guest accelerator cards exposed to this instance.

specificReservation.instanceProperties.guestAccelerators[].acceleratorType

Required*

string

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.

specificReservation.instanceProperties.localSsds

Optional

list (object)

Immutable. The amount of local ssd to reserve with each instance. This reserves disks of type 'local-ssd'.

specificReservation.instanceProperties.localSsds[]

Optional

object

specificReservation.instanceProperties.localSsds[].diskSizeGb

Required*

integer

Immutable. The size of the disk in base-2 GB.

specificReservation.instanceProperties.localSsds[].interface

Optional

string

Immutable. The disk interface to use for attaching this disk. Default value: "SCSI" Possible values: ["SCSI", "NVME"].

specificReservation.instanceProperties.machineType

Required

string

Immutable. The name of the machine type to reserve.

specificReservation.instanceProperties.minCpuPlatform

Optional

string

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.

specificReservationRequired

Optional

boolean

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.

zone

Required

string

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
observedGeneration: integer
selfLink: string
status: string
Fields
commitment

string

Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.

conditions

list (object)

Conditions represent the latest available observation of the resource's current state.

conditions[]

object

conditions[].lastTransitionTime

string

Last time the condition transitioned from one status to another.

conditions[].message

string

Human-readable message indicating details about last transition.

conditions[].reason

string

Unique, one-word, CamelCase reason for the condition's last transition.

conditions[].status

string

Status is the status of the condition. Can be True, False, Unknown.

conditions[].type

string

Type is the type of the condition.

creationTimestamp

string

Creation timestamp in RFC3339 text format.

observedGeneration

integer

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

string

status

string

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