gcepd

package
v0.0.1-dev.137 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package gcepd implements the "gce-pd" storage driver, backed by Google Compute Engine Persistent Disks.

The driver is registered under the name "gce-pd" (operator-facing, hyphenated) while the Go package itself is "gcepd" (Go forbids hyphens). Operators consume it by writing a StorageClass that points at it:

storageClass:
  name: pd-balanced-euw2a
  driver: gce-pd
  parameters:
    project: my-gcp-project       # optional on GCE (metadata fallback)
    zone: europe-west2-a
    diskType: pd-balanced
    fsType: ext4
  reclaimPolicy: retain
  allowedTopologies:
    - matchLabels:
        rune.io/zone: europe-west2-a

Like Amazon EBS (and unlike DigitalOcean's region-scoped volumes), a zonal Persistent Disk is pinned to a single zone and can only attach to an instance in that same zone — hence `zone` is required at Provision time (sourced from parameters or the selected topology).

Auth uses Application Default Credentials: on a GCE node whose service account carries the compute scopes (see terraform-google-rune) no credentials need to be configured at all — the metadata server serves them. For off-instance / cross-project controllers, a service-account key can be supplied via StorageClass `parameters.credentialsJSON`; the controller resolves any `secret:...` reference into plaintext before the driver sees it (RUNE-200 / pkg/storage/driverparams), so rotation flows through the secrets store with no driver-level wiring.

Mirrors the do-volume / aws-ebs reference drivers (RUNE-069).

Index

Constants

View Source
const DriverName = "gce-pd"

DriverName is the registry key.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DiskNamePrefix is prepended to the name of every Persistent Disk
	// created by this driver, so multiple Rune clusters can share one GCP
	// project without their disk listings colliding. Default "rune-".
	DiskNamePrefix string
}

Config is the runefile [storage.drivers.gce-pd] section after parsing. Only knobs that don't belong on per-StorageClass parameters live here — project, zone, disk type and auth are all sourced from StorageClass parameters so a single driver instance serves every project/zone.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL