Documentation
¶
Overview ¶
pkg/resources/pvcs/pvc.go
pkg/resources/pvcs/types.go
Index ¶
- func Create(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, ...) error
- func Delete(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, ...) error
- func DeleteIfOwned(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, ...) error
- func Update(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, ...) error
- type ResolvedPVCSpec
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.
Click to show internal directories.
Click to hide internal directories.