crd

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package crd to manage volume attachment custom resource.

Index

Constants

View Source
const (
	CustomResourceName       = "volumeattachment"
	CustomResourceNamePlural = "volumeattachments"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
)

VolumeAttachmentResource represents the VolumeAttachment custom resource object

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func RegisterFakeAPI

func RegisterFakeAPI() *runtime.Scheme

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns back a Group qualified GroupResource

Types

type Attachment

type Attachment struct {
	Node         string `json:"node"`
	PodNamespace string `json:"podNamespace"`
	PodName      string `json:"podName"`
	ClusterName  string `json:"clusterName"`
	MountDir     string `json:"mountDir"`
	ReadOnly     bool   `json:"readOnly"`
}

type MockVolumeAttachmentController

type MockVolumeAttachmentController struct {
	MockCreate func(volumeAttachment VolumeAttachment) error
	MockGet    func(namespace, name string) (VolumeAttachment, error)
	MockList   func(namespace string) (VolumeAttachmentList, error)
	MockUpdate func(volumeAttachment VolumeAttachment) error
	MockDelete func(namespace, name string) error
}

func (*MockVolumeAttachmentController) Create

func (m *MockVolumeAttachmentController) Create(volumeAttachment VolumeAttachment) error

func (*MockVolumeAttachmentController) Delete

func (m *MockVolumeAttachmentController) Delete(namespace, name string) error

func (*MockVolumeAttachmentController) Get

func (m *MockVolumeAttachmentController) Get(namespace, name string) (VolumeAttachment, error)

func (*MockVolumeAttachmentController) List

func (*MockVolumeAttachmentController) Update

func (m *MockVolumeAttachmentController) Update(volumeAttachment VolumeAttachment) error

type VolumeAttachment

type VolumeAttachment struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Attachments       []Attachment `json:"attachments"`
}

func NewVolumeAttachment

func NewVolumeAttachment(name, namespace, node, podNamespace, podName, clusterName, mountDir string, readOnly bool) VolumeAttachment

NewVolumeAttachment creates a reference of a Volumeattach CRD object

type VolumeAttachmentCRDController

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

VolumeAttachmentCRDController is a controller to manage VolumeAttachment CRD objects

func New

New creates a new VolumeAttachmentCRDController controller

func (*VolumeAttachmentCRDController) Create

func (c *VolumeAttachmentCRDController) Create(volumeAttachment VolumeAttachment) error

Create creates the volume attach CRD resource in Kubernetes

func (*VolumeAttachmentCRDController) Delete

func (c *VolumeAttachmentCRDController) Delete(namespace, name string) error

Delete deletes the volume attach CRD resource in Kubernetes

func (*VolumeAttachmentCRDController) Get

func (c *VolumeAttachmentCRDController) Get(namespace, name string) (VolumeAttachment, error)

Get queries the VolumeAttachment CRD from Kubernetes

func (*VolumeAttachmentCRDController) List

List lists all the volume attachment CRD resources in the given namespace

func (*VolumeAttachmentCRDController) Update

func (c *VolumeAttachmentCRDController) Update(volumeAttachment VolumeAttachment) error

Update updates VolumeAttachment resource

type VolumeAttachmentController

type VolumeAttachmentController interface {
	Create(volumeAttachment VolumeAttachment) error
	Get(namespace, name string) (VolumeAttachment, error)
	List(namespace string) (VolumeAttachmentList, error)
	Update(volumeAttachment VolumeAttachment) error
	Delete(namespace, name string) error
}

VolumeAttachmentController handles custom resource VolumeAttachment storage operations

func NewVolumeAttachmentController

func NewVolumeAttachmentController(clientset kubernetes.Interface,
	volumeAttachmentCRDClient rest.Interface) (VolumeAttachmentController, error)

type VolumeAttachmentList

type VolumeAttachmentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []VolumeAttachment `json:"items"`
}

type VolumeAttachmentTPRController

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

VolumeAttachmentTPRController is a controller to manage VolumeAttachment TPR objects CRD is available on v1.7.0. TPR became deprecated on v1.7.0 Remove this code when TPR is not longer supported

func NewTPR

NewTPR creates a new VolumeAttachment controller for TPR resources. Only valid for k8s 1.6 and older

func (*VolumeAttachmentTPRController) Create

func (c *VolumeAttachmentTPRController) Create(volumeAttachment VolumeAttachment) error

Create creates the volume attach TPR resource in Kubernetes

func (*VolumeAttachmentTPRController) Delete

func (c *VolumeAttachmentTPRController) Delete(namespace, name string) error

Delete deletes the volume attach TPR resource in Kubernetes

func (*VolumeAttachmentTPRController) Get

func (c *VolumeAttachmentTPRController) Get(namespace, name string) (VolumeAttachment, error)

Get queries the VolumeAttachment TPR from Kubernetes

func (*VolumeAttachmentTPRController) List

List lists all the volume attachment TPR resources in the given namespace

func (*VolumeAttachmentTPRController) Update

func (c *VolumeAttachmentTPRController) Update(volumeAttachment VolumeAttachment) error

Update updates VolumeAttachment TPR resource

Jump to

Keyboard shortcuts

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