ComputeImage


Property Value
Google Cloud Service Name Compute Engine
Google Cloud Service Documentation /compute/docs/
Google Cloud REST Resource Name v1.images
Google Cloud REST Resource Documentation /compute/docs/reference/rest/v1/images
Config Connector Resource Short Names gcpcomputeimage
gcpcomputeimages
computeimage
Config Connector Service Name compute.googleapis.com
Config Connector Resource Fully Qualified Name computeimages.compute.cnrm.cloud.google.com
Can Be Referenced by IAMPolicy/IAMPolicyMember Yes
Supports IAM Conditions Yes
Supports IAM Audit Configs No
IAM External Reference Format

projects/{{project}}/global/images/{{name}}

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
diskRef:
  external: string
  name: string
  namespace: string
diskSizeGb: integer
family: string
guestOsFeatures:
- type: string
imageEncryptionKey:
  kmsKeySelfLinkRef:
    external: string
    name: string
    namespace: string
  kmsKeyServiceAccountRef:
    external: string
    name: string
    namespace: string
licenses:
- string
rawDisk:
  containerType: string
  sha1: string
  source: string
resourceID: string
sourceImageRef:
  external: string
  name: string
  namespace: string
sourceSnapshotRef:
  external: string
  name: string
  namespace: string
storageLocations:
- string
Fields

description

Optional

string

Immutable. An optional description of this resource. Provide this property when you create the resource.

diskRef

Optional

object

The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.

diskRef.external

Optional

string

Allowed value: The `selfLink` field of a `ComputeDisk` resource.

diskRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

diskRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

diskSizeGb

Optional

integer

Immutable. Size of the image when restored onto a persistent disk (in GB).

family

Optional

string

Immutable. The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.

guestOsFeatures

Optional

list (object)

Immutable. A list of features to enable on the guest operating system. Applicable only for bootable images.

guestOsFeatures[]

Optional

object

guestOsFeatures[].type

Required*

string

Immutable. The type of supported feature. Read [Enabling guest operating system features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) to see a list of available options. Possible values: ["MULTI_IP_SUBNET", "SECURE_BOOT", "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", "GVNIC", "SEV_LIVE_MIGRATABLE", "SEV_SNP_CAPABLE", "SUSPEND_RESUME_COMPATIBLE", "TDX_CAPABLE"].

imageEncryptionKey

Optional

object

Immutable. Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).

imageEncryptionKey.kmsKeySelfLinkRef

Optional

object

The self link of the encryption key that is stored in Google Cloud KMS.

imageEncryptionKey.kmsKeySelfLinkRef.external

Optional

string

Allowed value: The `selfLink` field of a `KMSCryptoKey` resource.

imageEncryptionKey.kmsKeySelfLinkRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

imageEncryptionKey.kmsKeySelfLinkRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

imageEncryptionKey.kmsKeyServiceAccountRef

Optional

object

The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

imageEncryptionKey.kmsKeyServiceAccountRef.external

Optional

string

Allowed value: The `email` field of an `IAMServiceAccount` resource.

imageEncryptionKey.kmsKeyServiceAccountRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

imageEncryptionKey.kmsKeyServiceAccountRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

licenses

Optional

list (string)

Immutable. Any applicable license URI.

licenses[]

Optional

string

rawDisk

Optional

object

Immutable. The parameters of the raw disk image.

rawDisk.containerType

Optional

string

Immutable. The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created. Default value: "TAR" Possible values: ["TAR"].

rawDisk.sha1

Optional

string

Immutable. An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created.

rawDisk.source

Required*

string

Immutable. The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both.

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.

sourceImageRef

Optional

object

The source image used to create this image.

sourceImageRef.external

Optional

string

Allowed value: The `selfLink` field of a `ComputeImage` resource.

sourceImageRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

sourceImageRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

sourceSnapshotRef

Optional

object

The source snapshot used to create this image.

sourceSnapshotRef.external

Optional

string

Allowed value: The `selfLink` field of a `ComputeSnapshot` resource.

sourceSnapshotRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

sourceSnapshotRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

storageLocations

Optional

list (string)

Immutable. Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images.

storageLocations[]

Optional

string

* Field is required when parent field is specified

Status

Schema

archiveSizeBytes: integer
conditions:
- lastTransitionTime: string
  message: string
  reason: string
  status: string
  type: string
creationTimestamp: string
labelFingerprint: string
observedGeneration: integer
selfLink: string
Fields
archiveSizeBytes

integer

Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).

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.

labelFingerprint

string

The fingerprint used for optimistic locking of this resource. Used internally during updates.

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

Sample YAML(s)

Image From Existing Disk

# 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: ComputeImage
metadata:
  name: computeimage-sample-fromexistingdisk
spec:
  description: A sample image created from an empty disk resource
  diskRef:
    name: computeimage-dep-fromexistingdisk
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeDisk
metadata:
  name: computeimage-dep-fromexistingdisk
spec:
  location: us-central1-a

Image From Url Raw

# 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: ComputeImage
metadata:
  name: computeimage-sample-fromurlraw
  labels:
    image-type: stemcell
spec:
  description: A sample image created from URL to a raw TAR disk image
  family: ubuntu-custom
  licenses: ["https://compute.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"]
  rawDisk:
    source: "https://storage.googleapis.com/config-connector-computeimage-raw/computeimage-raw.tar.gz"
    containerType: "TAR"
    sha1: 819b7e9c17423f4539f09687eaa13687afa2fe32