protectionutil

package
v1.32.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDeletionCandidate

func IsDeletionCandidate(obj metav1.Object, finalizer string) bool

IsDeletionCandidate checks if object is candidate to be deleted

func NeedToAddFinalizer

func NeedToAddFinalizer(obj metav1.Object, finalizer string) bool

NeedToAddFinalizer checks if need to add finalizer to object

Types

type PersistentVolumeClaimWrapper added in v1.32.0

type PersistentVolumeClaimWrapper struct{ v1.PersistentVolumeClaim }

PersistentVolumeClaimWrapper wraps a PersistentVolumeClaim inside.

func MakePersistentVolumeClaim added in v1.32.0

func MakePersistentVolumeClaim() *PersistentVolumeClaimWrapper

MakePersistentVolumeClaim creates a PersistentVolumeClaim wrapper.

func (*PersistentVolumeClaimWrapper) Annotation added in v1.32.0

Annotation sets a {k,v} pair to the inner PersistentVolumeClaim.

func (*PersistentVolumeClaimWrapper) CurrentVolumeAttributesClassName added in v1.32.0

func (p *PersistentVolumeClaimWrapper) CurrentVolumeAttributesClassName(s string) *PersistentVolumeClaimWrapper

CurrentVolumeAttributesClassName sets `s` as the CurrentVolumeAttributesClassName of the inner PersistentVolumeClaim.

func (*PersistentVolumeClaimWrapper) Finalizer added in v1.32.0

func (*PersistentVolumeClaimWrapper) Name added in v1.32.0

Name sets `s` as the name of the inner PersistentVolumeClaim.

func (*PersistentVolumeClaimWrapper) Namespace added in v1.32.0

Namespace sets `s` as the namespace of the inner PersistentVolumeClaim.

func (*PersistentVolumeClaimWrapper) Obj added in v1.32.0

Obj returns the inner PersistentVolumeClaim.

func (*PersistentVolumeClaimWrapper) TargetVolumeAttributesClassName added in v1.32.0

func (p *PersistentVolumeClaimWrapper) TargetVolumeAttributesClassName(s string) *PersistentVolumeClaimWrapper

TargetVolumeAttributesClassName sets `s` as the TargetVolumeAttributesClassName of the inner PersistentVolumeClaim. It also sets the status to Pending.

func (*PersistentVolumeClaimWrapper) VolumeAttributesClassName added in v1.32.0

func (p *PersistentVolumeClaimWrapper) VolumeAttributesClassName(s string) *PersistentVolumeClaimWrapper

VolumeAttributesClassName sets `s` as the VolumeAttributesClassName of the inner PersistentVolumeClaim.

func (*PersistentVolumeClaimWrapper) VolumeName added in v1.32.0

VolumeName sets `name` as the volume name of the inner PersistentVolumeClaim.

type PersistentVolumeWrapper added in v1.32.0

type PersistentVolumeWrapper struct{ v1.PersistentVolume }

PersistentVolumeWrapper wraps a PersistentVolume inside.

func MakePersistentVolume added in v1.32.0

func MakePersistentVolume() *PersistentVolumeWrapper

MakePersistentVolume creates a PersistentVolume wrapper.

func (*PersistentVolumeWrapper) Name added in v1.32.0

Name sets `s` as the name of the inner PersistentVolume.

func (*PersistentVolumeWrapper) Obj added in v1.32.0

Obj returns the inner PersistentVolume.

func (*PersistentVolumeWrapper) VolumeAttributesClassName added in v1.32.0

func (p *PersistentVolumeWrapper) VolumeAttributesClassName(s string) *PersistentVolumeWrapper

VolumeAttributesClassName sets `s` as the VolumeAttributesClassName of the inner PersistentVolume.

type PodWrapper added in v1.32.0

type PodWrapper struct{ v1.Pod }

PodWrapper wraps a Pod inside.

func MakePod added in v1.32.0

func MakePod() *PodWrapper

MakePod creates a Pod wrapper.

func (*PodWrapper) Annotation added in v1.32.0

func (p *PodWrapper) Annotation(key, value string) *PodWrapper

Annotation sets a {k,v} pair to the inner pod annotation.

func (*PodWrapper) Annotations added in v1.32.0

func (p *PodWrapper) Annotations(annotations map[string]string) *PodWrapper

Annotations sets all {k,v} pair provided by `annotations` to the inner pod annotations.

func (*PodWrapper) Name added in v1.32.0

func (p *PodWrapper) Name(s string) *PodWrapper

Name sets `s` as the name of the inner pod.

func (*PodWrapper) Namespace added in v1.32.0

func (p *PodWrapper) Namespace(s string) *PodWrapper

Namespace sets `s` as the namespace of the inner pod.

func (*PodWrapper) Obj added in v1.32.0

func (p *PodWrapper) Obj() *v1.Pod

Obj returns the inner Pod.

func (*PodWrapper) PVC added in v1.32.0

func (p *PodWrapper) PVC(name string) *PodWrapper

PVC creates a Volume with a PVC and injects into the inner pod.

func (*PodWrapper) SchedulerName added in v1.32.0

func (p *PodWrapper) SchedulerName(s string) *PodWrapper

SchedulerName sets `s` as the scheduler name of the inner pod.

func (*PodWrapper) Terminating added in v1.32.0

func (p *PodWrapper) Terminating() *PodWrapper

Terminating sets the inner pod's deletionTimestamp to current timestamp.

func (*PodWrapper) UID added in v1.32.0

func (p *PodWrapper) UID(s string) *PodWrapper

UID sets `s` as the UID of the inner pod.

type VolumeAttributesClassWrapper added in v1.32.0

type VolumeAttributesClassWrapper struct {
	storagev1beta1.VolumeAttributesClass
}

VolumeAttributesClassWrapper wraps a VolumeAttributesClass inside.

func MakeVolumeAttributesClass added in v1.32.0

func MakeVolumeAttributesClass() *VolumeAttributesClassWrapper

MakeVolumeAttributesClass creates a VolumeAttributesClass wrapper.

func (*VolumeAttributesClassWrapper) Finalizer added in v1.32.0

Finalizer appends `s` to the finalizers of the inner VolumeAttributesClass.

func (*VolumeAttributesClassWrapper) Name added in v1.32.0

Name sets `s` as the name of the inner VolumeAttributesClass.

func (*VolumeAttributesClassWrapper) Obj added in v1.32.0

Obj returns the inner VolumeAttributesClass.

func (*VolumeAttributesClassWrapper) Terminating added in v1.32.0

Terminating sets the inner VolumeAttributesClass' deletionTimestamp to non-nil.

Jump to

Keyboard shortcuts

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