Skip to content

Commit

Permalink
Add docu for worker config sourceImage
Browse files Browse the repository at this point in the history
  • Loading branch information
hebelsan committed Apr 30, 2024
1 parent d2bc708 commit 4ff484d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/usage/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ The worker configuration contains:

If you attach the disk with `SCRATCH` type, either an `NVMe` interface or a `SCSI` interface must be specified.
It is only meaningful to provide this volume interface if only `SCRATCH` data volumes are used.

* Volume Encryption config that specifies values for `kmsKeyName` and `kmsKeyServiceAccountName`.
* The `kmsKeyName` is the
key name of the cloud kms disk encryption key and must be specified if CMEK disk encryption is needed.
Expand All @@ -166,6 +167,12 @@ The worker configuration contains:
gcloud projects add-iam-policy-binding projectId --member
serviceAccount:[email protected] --role roles/cloudkms.cryptoKeyEncrypterDecrypter
```

* Setting a volume image with `volume.sourceImage`.
However, this parameter should only be used with particular caution.
For example Gardenlinux works with filesystem LABELs only and creating another disk form the very same image causes the LABELs to be duplicated.
See: https://github.com/gardener/gardener-extension-provider-gcp/issues/323

* Service Account with their specified scopes, authorized for this worker.

Service accounts created in advance that generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance.
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/gcp/types_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ type Volume struct {
Encryption *DiskEncryption

// SourceImage is the image to create this disk
// However, this parameter should only be used with particular caution.
// For example Gardenlinux works with filesystem LABELs only and creating
// another disk form the very same image causes the LABELs to be duplicated.
// See: https://github.com/gardener/gardener-extension-provider-gcp/issues/323
SourceImage *string
}

Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/gcp/v1alpha1/types_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ type Volume struct {
Encryption *DiskEncryption `json:"encryption,omitempty"`

// SourceImage is the image to create this disk
// However, this parameter should only be used with particular caution.
// For example Gardenlinux works with filesystem LABELs only and creating
// another disk form the very same image causes the LABELs to be duplicated.
// See: https://github.com/gardener/gardener-extension-provider-gcp/issues/323
// +optional
SourceImage *string `json:"sourceImage,omitempty"`
}
Expand Down

0 comments on commit 4ff484d

Please sign in to comment.