v1alpha1

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the pmem-csi v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=pmem-csi.intel.com

Package v1alpha1 contains API Schema definitions for the pmem-csi v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=pmem-csi.intel.com

Index

Constants

View Source
const (
	// DefaultLogLevel default logging level used for the driver
	DefaultLogLevel = uint16(5)
	// DefaultImagePullPolicy default image pull policy for all the images used by the deployment
	DefaultImagePullPolicy = corev1.PullIfNotPresent

	// DefaultDriverImage default PMEM-CSI driver docker image
	DefaultDriverImage = defaultDriverImageName + ":" + defaultDriverImageTag

	// DefaultProvisionerImage default external provisioner image to use
	DefaultProvisionerImage = defaultProvisionerImageName + ":" + defaultProvisionerImageTag

	// DefaultRegistrarImage default node driver registrar image to use
	DefaultRegistrarImage = defaultRegistrarImageName + ":" + defaultRegistrarImageTag

	// DefaultControllerResourceCPU default CPU resource limit used for controller pod
	DefaultControllerResourceCPU = "100m" // MilliSeconds
	// DefaultControllerResourceMemory default memory resource limit used for controller pod
	DefaultControllerResourceMemory = "250Mi" // MB
	// DefaultNodeResourceCPU default CPU resource limit used for node driver pod
	DefaultNodeResourceCPU = "100m" // MilliSeconds
	// DefaultNodeResourceMemory default memory resource limit used for node driver pod
	DefaultNodeResourceMemory = "250Mi" // MB
	// DefaultDeviceMode default device manger used for deployment
	DefaultDeviceMode = DeviceModeLVM
	// DefaultPMEMPercentage PMEM space to reserve for the driver
	DefaultPMEMPercentage = 100
)
View Source
const (
	DriverMode = iota + 1
	DriverImage
	PullPolicy
	LogLevel
	ProvisionerImage
	NodeRegistrarImage
	ControllerResources
	NodeResources
	NodeSelector
	PMEMPercentage
	Labels
	CACertificate
	RegistryCertificate
	RegistryKey
	NodeControllerCertificate
	NodeControllerKey
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "pmem-csi.intel.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)
View Source
var (
	// DefaultNodeSelector default node label used for node selection
	DefaultNodeSelector = map[string]string{"storage": "pmem"}
)

Functions

func GetDeploymentCRDSchema

func GetDeploymentCRDSchema() *apiextensions.JSONSchemaProps

Types

type Deployment

type Deployment struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DeploymentSpec   `json:"spec,omitempty"`
	Status DeploymentStatus `json:"status,omitempty"`
}

Deployment is the Schema for the deployments API +kubebuilder:subresource:status +kubebuilder:resource:path=deployments,scope=Namespaced

func (*Deployment) Compare

func (d *Deployment) Compare(other *Deployment) map[DeploymentChange]struct{}

Compare compares 'other' deployment spec with current deployment and returns the all the changes. If len(changes) == 0 represents both deployment spec are equivalent.

func (*Deployment) DeepCopy

func (in *Deployment) DeepCopy() *Deployment

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Deployment.

func (*Deployment) DeepCopyInto

func (in *Deployment) DeepCopyInto(out *Deployment)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Deployment) DeepCopyObject

func (in *Deployment) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Deployment) EnsureDefaults

func (d *Deployment) EnsureDefaults(operatorImage string) error

EnsureDefaults make sure that the deployment object has all defaults set properly

func (*Deployment) GetHyphenedName

func (d *Deployment) GetHyphenedName() string

GetHyphenedName returns the name of the deployment with dots replaced by hyphens. Most objects created for the deployment will use hyphens in the name, sometimes with an additional suffix like -controller, but others must use the original name (like the CSIDriver object).

type DeploymentChange

type DeploymentChange int

DeploymentChange type declaration for changes between two deployments

func (DeploymentChange) String

func (c DeploymentChange) String() string

type DeploymentList

type DeploymentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Deployment `json:"items"`
}

DeploymentList contains a list of Deployment

func (*DeploymentList) DeepCopy

func (in *DeploymentList) DeepCopy() *DeploymentList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentList.

func (*DeploymentList) DeepCopyInto

func (in *DeploymentList) DeepCopyInto(out *DeploymentList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeploymentList) DeepCopyObject

func (in *DeploymentList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DeploymentPhase

type DeploymentPhase string

DeploymentPhase represents the status phase of a driver deployment

const (
	// DeploymentPhaseNew indicates a new deployment
	DeploymentPhaseNew DeploymentPhase = ""
	// DeploymentPhaseInitializing indicates deployment initialization is in progress
	DeploymentPhaseInitializing DeploymentPhase = "Initializing"
	// DeploymentPhaseRunning indicates that the deployment was successful
	DeploymentPhaseRunning DeploymentPhase = "Running"
	// DeploymentPhaseFailed indicates that the deployment was failed
	DeploymentPhaseFailed DeploymentPhase = "Failed"
)

type DeploymentSpec

type DeploymentSpec struct {

	// Image holds container image options
	Image string `json:"image,omitempty"`
	// PullPolicy image pull policy one of Always, Never, IfNotPresent
	PullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// ProvisionerImage CSI provisioner sidecar image
	ProvisionerImage string `json:"provisionerImage,omitempty"`
	// NodeRegistrarImage CSI node driver registrar sidecar image
	NodeRegistrarImage string `json:"nodeRegistrarImage,omitempty"`
	// ControllerResources Compute resources required by Controller driver
	ControllerResources *corev1.ResourceRequirements `json:"controllerResources,omitempty"`
	// NodeResources Compute resources required by Node driver
	NodeResources *corev1.ResourceRequirements `json:"nodeResources,omitempty"`
	// DeviceMode to use to manage PMEM devices. One of lvm, direct
	DeviceMode DeviceMode `json:"deviceMode,omitempty"`
	// LogLevel number for the log verbosity
	LogLevel uint16 `json:"logLevel,omitempty"`
	// RegistryCert encoded certificate signed by a CA for registry server authentication
	// If not provided, provisioned one by the operator using self-signed CA
	RegistryCert []byte `json:"registryCert,omitempty"`
	// RegistryPrivateKey encoded private key used for registry server certificate
	// If not provided, provisioned one by the operator
	RegistryPrivateKey []byte `json:"registryKey,omitempty"`
	// NodeControllerCert encoded certificate signed by a CA for node controller server authentication
	// If not provided, provisioned one by the operator using self-signed CA
	NodeControllerCert []byte `json:"nodeControllerCert,omitempty"`
	// NodeControllerPrivateKey encoded private key used for node controller server certificate
	// If not provided, provisioned one by the operator
	NodeControllerPrivateKey []byte `json:"nodeControllerKey,omitempty"`
	// CACert encoded root certificate of the CA by which the registry and node controller certificates are signed
	// If not provided operator uses a self-signed CA certificate
	CACert []byte `json:"caCert,omitempty"`
	// NodeSelector node labels to use for selection of driver node
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// PMEMPercentage represents the percentage of space to be used by the driver in each PMEM region
	// on every node. Default 100
	// This is only valid for driver in LVM mode
	PMEMPercentage uint16 `json:"pmemPercentage,omitempty"`
	// Labels contains additional labels for all objects created by the operator.
	Labels map[string]string `json:"labels,omitempty"`
}

DeploymentSpec defines the desired state of Deployment

func (*DeploymentSpec) DeepCopy

func (in *DeploymentSpec) DeepCopy() *DeploymentSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentSpec.

func (*DeploymentSpec) DeepCopyInto

func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeploymentStatus

type DeploymentStatus struct {

	// Phase indicates the state of the deployment
	Phase DeploymentPhase `json:"phase,omitempty"`
	// LastUpdated time of the deployment status
	LastUpdated metav1.Time `json:"lastUpdated,omitempty"`
}

DeploymentStatus defines the observed state of Deployment

func (*DeploymentStatus) DeepCopy

func (in *DeploymentStatus) DeepCopy() *DeploymentStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStatus.

func (*DeploymentStatus) DeepCopyInto

func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeviceMode

type DeviceMode string

DeviceMode type decleration for allowed driver device managers

const (
	// DeviceModeLVM represents 'lvm' device manager
	DeviceModeLVM DeviceMode = "lvm"
	// DeviceModeDirect represents 'direct' device manager
	DeviceModeDirect DeviceMode = "direct"
)

func (*DeviceMode) Set

func (mode *DeviceMode) Set(value string) error

Set sets the value

func (*DeviceMode) String

func (mode *DeviceMode) String() string

Jump to

Keyboard shortcuts

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