Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the csi v1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=tkestack.io/csi-operator/pkg/apis/csi +k8s:defaulter-gen=TypeMeta +groupName=storage.tkestack.io
Package v1 contains API Schema definitions for the csi v1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=tkestack.io/csi-operator/pkg/apis/storage +k8s:defaulter-gen=TypeMeta +groupName=storage.tkestack.io
Index ¶
Constants ¶
const ( // CSIDriverCephRBD indicates the CephRBD storage type. CSIDriverCephRBD = "csi-rbd" // CSIDriverCephFS indicates the CephFS storage type. CSIDriverCephFS = "csi-cephfs" // CSIDriverTencentCBS indicates the Tencent Cloud CBS storage type. CSIDriverTencentCBS = "com.tencent.cloud.csi.cbs" // CSIDriverTencentCOS indicates the Tencent Cloud COS storage type. CSIDriverTencentCOS = "csi-tencent-cloud-cos" // CSIDriverTencentCFS indicates the Tencent Cloud CFS storage type. CSIDriverTencentCFS = "csi-tencent-cloud-cfs" )
const ( // CSIVersionV0 indicates the 0.3.0 version of CSI. CSIVersionV0 = "v0.0" // CSIVersionV1 indicates the 1.x version of CSI. CSIVersionV1 = "v1.0" // CSIVersionV1p1 indicates the 1.1+ version of CSI in tencent cloud cvm, // which does not need to use secret id and key. CSIVersionV1p1 = "v1.1" )
const ( // CSIPending indicates the CSI components is creating. CSIPending = "Pending" // CSIRunning indicates the CSI components is running. CSIRunning = "Running" // CSIFailed indicates creating CSI components failed. CSIFailed = "Failed" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: storage.GroupName, Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is required by pkg/client/... AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type CSI ¶
type CSI struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec CSISpec `json:"spec,omitempty"` Status CSIStatus `json:"status,omitempty"` }
CSI is the Schema for the csis API +k8s:openapi-gen=true
func (*CSI) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSI.
func (*CSI) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CSI) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CSIComponent ¶
type CSIComponent struct { // Name of the Controller sidecar container image. // +optional Image string `json:"image" protobuf:"bytes,1,opt,name=image"` // Resources for the controller container. // +optional Resources corev1.ResourceRequirements `json:"resources" protobuf:"bytes,2,opt,name=resources"` // Parameters contains additional parameters for external components. // +optional Parameters map[string]string `json:"parameters" protobuf:"bytes,3,opt,name=parameters"` }
CSIComponent is the basic configuration of a external component.
func (*CSIComponent) DeepCopy ¶
func (in *CSIComponent) DeepCopy() *CSIComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIComponent.
func (*CSIComponent) DeepCopyInto ¶
func (in *CSIComponent) DeepCopyInto(out *CSIComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CSICondition ¶
type CSICondition struct { // Type of deployment condition. Type string `json:"type"` // Status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status"` // Last time the condition transitioned from one status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // The reason for the condition's last transition. Reason string `json:"reason,omitempty"` // A human readable message indicating details about the transition. Message string `json:"message,omitempty"` }
CSICondition describes the state of a CSI at a certain point.
func (*CSICondition) DeepCopy ¶
func (in *CSICondition) DeepCopy() *CSICondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSICondition.
func (*CSICondition) DeepCopyInto ¶
func (in *CSICondition) DeepCopyInto(out *CSICondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CSIController ¶
type CSIController struct { // Replicas of the controller deployment. Replicas int32 `json:"replicas" protobuf:"bytes,1,opt,name=replicas"` // Configuration for CSI Provisioner. // +optional Provisioner *CSIComponent `json:"provisioner" protobuf:"bytes,2,opt,name=provisioner"` // Configuration for CSI Attacher. // +optional Attacher *CSIComponent `json:"attacher" protobuf:"bytes,3,opt,name=attacher"` // Configuration for CSI Resizer. // +optional Resizer *CSIComponent `json:"resizer" protobuf:"bytes,4,opt,name=resizer"` // Configuration for CSI Snapshotter. // +optional Snapshotter *CSIComponent `json:"snapshotter" protobuf:"bytes,5,opt,name=snapshotter"` // Configuration for CSI ClusterRegister. // +optional ClusterRegistrar *CSIComponent `json:"clusterRegistrar" protobuf:"bytes,6,opt,name=clusterRegistrar"` // Configuration for CSI LivenessProbe. // +optional LivenessProbe *CSIComponent `json:"livenessProbe" protobuf:"bytes,7,opt,name=livenessProbe"` }
CSIController is the configuration of the controller sidecars.
func (*CSIController) DeepCopy ¶
func (in *CSIController) DeepCopy() *CSIController
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIController.
func (*CSIController) DeepCopyInto ¶
func (in *CSIController) DeepCopyInto(out *CSIController)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CSIDriverTemplate ¶
type CSIDriverTemplate struct { // Should contain one and only one container which is the concrete driver. // The container should use the CSI_ENDPOINT env to get the CSI socket in the command. // It should only contain CSI un-related volumes and volumeMounts, such as /sys, /lib/modules, etc. Template corev1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,1,opt,name=template"` // Special Cluster rules needed by the driver. // +optional Rules []rbacv1.PolicyRule `json:"rules,omitempty" protobuf:"bytes,2,opt,name=rules"` }
CSIDriverTemplate is the definition of the Driver container.
func (*CSIDriverTemplate) DeepCopy ¶
func (in *CSIDriverTemplate) DeepCopy() *CSIDriverTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIDriverTemplate.
func (*CSIDriverTemplate) DeepCopyInto ¶
func (in *CSIDriverTemplate) DeepCopyInto(out *CSIDriverTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CSIList ¶
type CSIList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []CSI `json:"items"` }
CSIList contains a list of CSI
func (*CSIList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIList.
func (*CSIList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CSIList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CSINode ¶
type CSINode struct { // Configuration for CSI NodeRegistrar. // +optional NodeRegistrar *CSIComponent `json:"nodeRegistrar" protobuf:"bytes,1,opt,name=nodeRegistrar"` // Configuration for CSI LivenessProbe. // +optional LivenessProbe *CSIComponent `json:"livenessProbe" protobuf:"bytes,2,opt,name=livenessProbe"` }
CSINode is the configuration of the node sidecars.
func (*CSINode) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSINode.
func (*CSINode) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CSISpec ¶
type CSISpec struct { // Version can be set to a well known CSI version. // If version set, you need to set DriverName to a well known driver type, // and left DriverTemplate, Node, Controller as empty. The operator will // enhance these fields. Version CSIVersion `json:"version" protobuf:"bytes,1,opt,name=version"` // Parameters contains global parameters for a well known CSI type and version. // Such as ceph cluster information, etc. Parameters map[string]string `json:"parameters" protobuf:"bytes,2,opt,name=parameters"` // Name of the CSI driver. DriverName string `json:"driverName" protobuf:"bytes,3,opt,name=driverName"` // Driver info. DriverTemplate *CSIDriverTemplate `json:"driverTemplate" protobuf:"bytes,4,opt,name=driverTemplate"` // Components info of daemonSet sidecars. // +optional Node CSINode `json:"node" protobuf:"bytes,5,opt,name=node"` // Components info of controller sidecars. // +optional Controller CSIController `json:"controller" protobuf:"bytes,6,opt,name=controller"` // Secrets used to provision/attach/resize/snapshot. // +optional Secrets []corev1.Secret `json:"secrets,omitempty" protobuf:"bytes,7,opt,name=secrets"` // StorageClasses relevant to the Driver. Note that the provisioner name will // be override by the name of driver. // +optional StorageClasses []storagev1.StorageClass `json:"storageClasses,omitempty" protobuf:"bytes,8,opt,name=storageClasses"` }
CSISpec defines the desired state of CSI
func (*CSISpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSISpec.
func (*CSISpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CSIStatus ¶
type CSIStatus struct { // The status of the CSI object. Phase CSIPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase"` // The generation observed by the operator. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"bytes,2,opt,name=observedGeneration"` // Generation of Driver DaemonSets and Controller Deployments that the operator has created / updated. Children []Generation `json:"children,omitempty" protobuf:"bytes,3,opt,name=children"` // Represents the latest available observations of a CSI's current state. Conditions []CSICondition `json:"conditions,omitempty" protobuf:"bytes,4,opt,name=conditions"` }
CSIStatus defines the observed state of CSI
func (*CSIStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIStatus.
func (*CSIStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CSIVersion ¶
type CSIVersion string
CSIVersion indicates the version of CSI external components.
type Generation ¶
type Generation struct { // Group is the group of the object the operator involved Group string `json:"group"` // Kind is the resource type of the object the operator involved Kind string `json:"resource"` // Namespace is where the object the operator involved Namespace string `json:"namespace"` // Name is the name of the object the operator involved Name string `json:"name"` // LastGeneration is the last generation of the object the operator involved LastGeneration int64 `json:"lastGeneration"` }
Generation keeps track of the generation for a given object.
func (*Generation) DeepCopy ¶
func (in *Generation) DeepCopy() *Generation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Generation.
func (*Generation) DeepCopyInto ¶
func (in *Generation) DeepCopyInto(out *Generation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.