v1alpha1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=vck.intelai.org

Index

Constants

View Source
const (
	GroupName string = "vck.intelai.org"

	Version string = "v1alpha1"

	// The kind of the crd.
	VolumeManagerResourceKind string = "VolumeManager"

	// The singular form of the crd.
	VolumeManagerResourceSingular string = "volumemanager"

	// The plural form of the crd.
	VolumeManagerResourcePlural string = "volumemanagers"

	// The message for a successful volumemanager status.
	SuccessfulVolumeStatusMessage string = "success"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var (
	// GVK unambiguously identifies the volume manager kind.
	GVK = schema.GroupVersionKind{
		Group:   GroupName,
		Version: Version,
		Kind:    VolumeManagerResourceKind,
	}
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

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

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type DataSourceType

type DataSourceType string

DataSourceType is the type of the data source (e.g., S3, NFS).

type Volume

type Volume struct {
	ID           string              `json:"id"`
	VolumeSource corev1.VolumeSource `json:"volumeSource"`
	NodeAffinity corev1.NodeAffinity `json:"nodeAffinity"`
	Message      string              `json:"message,omitempty"`
}

Volume provides the details on volume source and node affinity.

type VolumeConfig

type VolumeConfig struct {
	ID           string              `json:"id"`
	Replicas     int                 `json:"replicas"`
	SourceType   DataSourceType      `json:"sourceType"`
	AccessMode   string              `json:"accessMode"`
	Capacity     string              `json:"capacity"`
	NodeAffinity corev1.NodeAffinity `json:"nodeAffinity"`
	Tolerations  []corev1.Toleration `json:"tolerations"`
	Labels       map[string]string   `json:"labels"`
	Options      map[string]string   `json:"options"`
}

VolumeConfig contains all the configuration required for a volume.

type VolumeManager

type VolumeManager struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              VolumeManagerSpec   `json:"spec"`
	Status            VolumeManagerStatus `json:"status,omitempty"`
}

Volumemanager is the spec for a VolumeManager CR

func (*VolumeManager) GetSpecState

func (s *VolumeManager) GetSpecState() states.State

func (*VolumeManager) GetStatusState

func (s *VolumeManager) GetStatusState() states.State

func (*VolumeManager) JSON

func (s *VolumeManager) JSON() (string, error)

func (*VolumeManager) SetStatusStateWithMessage

func (s *VolumeManager) SetStatusStateWithMessage(state states.State, msg string)

type VolumeManagerList

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

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object VolumemanagerList is the list of VolumeManager resources

func (*VolumeManagerList) GetItems

func (vml *VolumeManagerList) GetItems() []runtime.Object

GetItems returns the list of items to be used in the List api call for crs

type VolumeManagerSpec

type VolumeManagerSpec struct {
	VolumeConfigs []VolumeConfig `json:"volumeConfigs"`
	State         states.State   `json:"state"`
}

VolumeManagerSpec is the spec for the crd.

type VolumeManagerStatus

type VolumeManagerStatus struct {
	Volumes []Volume     `json:"volumes"`
	State   states.State `json:"state,omitempty"`
	Message string       `json:"message,omitempty"`
}

VolumeManagerStatus is the status for the crd.

Jump to

Keyboard shortcuts

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