pvcs

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

pkg/resources/pvcs/pvc.go

pkg/resources/pvcs/types.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, spec ResolvedPVCSpec) error

Create creates a PVC owned by the CR if it does not already exist.

func Delete

func Delete(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, spec ResolvedPVCSpec) error

Delete deletes the PVC if it exists.

func DeleteIfOwned

func DeleteIfOwned(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, name, namespace string) error

DeleteIfOwned deletes the PVC only if it is owned by the given CR.

func Update

func Update(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, spec ResolvedPVCSpec) error

Update reconciles a PVC. PVC spec is largely immutable after creation; only labels are patched on drift.

Types

type ResolvedPVCSpec

type ResolvedPVCSpec struct {
	Name             string
	Namespace        string
	StorageClassName string
	AccessModes      []string
	Storage          string
	VolumeMode       string
	VolumeName       string
	Labels           map[string]string

	// Sleep injects an artificial delay into the reconcile of this resource.
	// Useful for autoscale testing, latency simulation, and chaos engineering.
	// Accepts extended duration units (s, m, h, d, w, mo, y).
	Sleep string
}

ResolvedPVCSpec is the fully resolved PersistentVolumeClaim specification.

func Resolve

func Resolve(src orktypes.PVCTemplateSource, ownerName string) ResolvedPVCSpec

Resolve builds a ResolvedPVCSpec from a PVCTemplateSource.

Jump to

Keyboard shortcuts

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