persistentvolumeclaim

package
v0.15.9 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessMode

type AccessMode string

AccessMode represents Kubernetes AccessMode

type AccessModes

type AccessModes []AccessMode

AccessModes represents Kubernetes AccessModes

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client manages communication with the Kubernetes PersistentVolumeClaims.

func NewClient

func NewClient(clientset kubernetes.Interface) *Client

NewClient constructs a new Client.

func (*Client) Delete added in v0.4.1

func (c *Client) Delete(ctx context.Context, name, namespace string) (err error)

Delete deletes PersistentVolumeClaim

func (*Client) Set

func (c *Client) Set(ctx context.Context, name, namespace string, o Options) (pvc *v1.PersistentVolumeClaim, err error)

Set updates PersistentVolumeClaim or it creates it if it does not exist

type DataSource

type DataSource struct {
	APIGroup string
	Kind     string
	Name     string
}

DataSource represents Kubernetes DataSource

type LabelSelectorRequirement

type LabelSelectorRequirement struct {
	Key      string
	Operator string
	Values   []string
}

LabelSelectorRequirement represents Kubernetes LabelSelectorRequirement

type LabelSelectorRequirements

type LabelSelectorRequirements []LabelSelectorRequirement

LabelSelectorRequirements represents Kubernetes LabelSelectorRequirements

type Options

type Options struct {
	Annotations map[string]string
	Labels      map[string]string
	Spec        PersistentVolumeClaimSpec
}

Options holds optional parameters for the Client.

type PersistentVolumeClaim

type PersistentVolumeClaim struct {
	Name        string
	Namespace   string
	Annotations map[string]string
	Labels      map[string]string
	Spec        PersistentVolumeClaimSpec
}

PersistentVolumeClaim represents Kubernetes PersistentVolumeClaim

type PersistentVolumeClaimSpec

type PersistentVolumeClaimSpec struct {
	Name           string
	AccessModes    AccessModes
	DataSource     DataSource
	RequestStorage string
	Selector       Selector
	StorageClass   string
	VolumeMode     string
	VolumeName     string
}

PersistentVolumeClaimSpec represents Kubernetes PersistentVolumeClaimSpec

type PersistentVolumeClaims

type PersistentVolumeClaims []PersistentVolumeClaim

PersistentVolumeClaims represents Kubernetes PersistentVolumeClaims

func (PersistentVolumeClaims) ToK8S

ToK8S converts PersistentVolumeClaims to Kuberntes client objects

type Selector

type Selector struct {
	MatchLabels      map[string]string
	MatchExpressions LabelSelectorRequirements
}

Selector represents Kubernetes LabelSelector

Jump to

Keyboard shortcuts

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