Documentation ¶
Overview ¶
Package crd to manage volume attachment custom resource.
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func RegisterFakeAPI() *runtime.Scheme
- func Resource(resource string) schema.GroupResource
- type Attachment
- type MockVolumeAttachmentController
- func (m *MockVolumeAttachmentController) Create(volumeAttachment VolumeAttachment) error
- func (m *MockVolumeAttachmentController) Delete(namespace, name string) error
- func (m *MockVolumeAttachmentController) Get(namespace, name string) (VolumeAttachment, error)
- func (m *MockVolumeAttachmentController) List(namespace string) (VolumeAttachmentList, error)
- func (m *MockVolumeAttachmentController) Update(volumeAttachment VolumeAttachment) error
- type VolumeAttachment
- type VolumeAttachmentCRDController
- func (c *VolumeAttachmentCRDController) Create(volumeAttachment VolumeAttachment) error
- func (c *VolumeAttachmentCRDController) Delete(namespace, name string) error
- func (c *VolumeAttachmentCRDController) Get(namespace, name string) (VolumeAttachment, error)
- func (c *VolumeAttachmentCRDController) List(namespace string) (VolumeAttachmentList, error)
- func (c *VolumeAttachmentCRDController) Update(volumeAttachment VolumeAttachment) error
- type VolumeAttachmentController
- type VolumeAttachmentList
- type VolumeAttachmentTPRController
- func (c *VolumeAttachmentTPRController) Create(volumeAttachment VolumeAttachment) error
- func (c *VolumeAttachmentTPRController) Delete(namespace, name string) error
- func (c *VolumeAttachmentTPRController) Get(namespace, name string) (VolumeAttachment, error)
- func (c *VolumeAttachmentTPRController) List(namespace string) (VolumeAttachmentList, error)
- func (c *VolumeAttachmentTPRController) Update(volumeAttachment VolumeAttachment) error
Constants ¶
const ( CustomResourceName = "volumeattachment" CustomResourceNamePlural = "volumeattachments" )
Variables ¶
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
)
var VolumeAttachmentResource = opkit.CustomResource{ Name: CustomResourceName, Plural: CustomResourceNamePlural, Group: k8sutil.CustomResourceGroup, Version: k8sutil.V1Alpha1, Scope: apiextensionsv1beta1.NamespaceScoped, Kind: reflect.TypeOf(VolumeAttachment{}).Name(), }
VolumeAttachmentResource represents the VolumeAttachment custom resource object
Functions ¶
func RegisterFakeAPI ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns back a Group qualified GroupResource
Types ¶
type Attachment ¶
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 (m *MockVolumeAttachmentController) List(namespace string) (VolumeAttachmentList, error)
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 ¶
func New(client rest.Interface) *VolumeAttachmentCRDController
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 ¶
func (c *VolumeAttachmentCRDController) List(namespace string) (VolumeAttachmentList, error)
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 ¶
func NewTPR(clientset kubernetes.Interface) *VolumeAttachmentTPRController
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 ¶
func (c *VolumeAttachmentTPRController) List(namespace string) (VolumeAttachmentList, error)
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