v1alpha1

package
v0.9.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: AGPL-3.0 Imports: 5 Imported by: 1

Documentation

Overview

+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=storage.kubeblocks.io

Package v1alpha1 contains API Schema definitions for the storage v1alpha1 API group +kubebuilder:object:generate=true +groupName=storage.kubeblocks.io

Index

Constants

View Source
const (
	// ConditionTypeCSIDriverInstalled is the name of the condition that
	// indicates whether the CSI driver is installed.
	ConditionTypeCSIDriverInstalled = "CSIDriverInstalled"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "storage.kubeblocks.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = GroupVersion

SchemeGroupVersion is group version used to register these objects.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ParametersSchema

type ParametersSchema struct {
	// Defines the parameters in OpenAPI V3.
	//
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:validation:Type=object
	// +kubebuilder:pruning:PreserveUnknownFields
	// +k8s:conversion-gen=false
	// +optional
	OpenAPIV3Schema *apiextensionsv1.JSONSchemaProps `json:"openAPIV3Schema,omitempty"`

	// Defines which parameters are credential fields, which need to be handled specifically.
	// For instance, these should be stored in a `Secret` instead of a `ConfigMap`.
	//
	// +optional
	CredentialFields []string `json:"credentialFields,omitempty"`
}

ParametersSchema describes the parameters needed for a certain storage.

func (*ParametersSchema) DeepCopy

func (in *ParametersSchema) DeepCopy() *ParametersSchema

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

func (*ParametersSchema) DeepCopyInto

func (in *ParametersSchema) DeepCopyInto(out *ParametersSchema)

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

type StorageProvider

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

	Spec   StorageProviderSpec   `json:"spec,omitempty"`
	Status StorageProviderStatus `json:"status,omitempty"`
}

StorageProvider comprises specifications that provide guidance on accessing remote storage. Currently the supported access methods are via a dedicated CSI driver or the `datasafed` tool. In case of CSI driver, the specification expounds on provisioning PVCs for that driver. As for the `datasafed` tool, the specification provides insights on generating the necessary configuration file.

func (*StorageProvider) DeepCopy

func (in *StorageProvider) DeepCopy() *StorageProvider

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

func (*StorageProvider) DeepCopyInto

func (in *StorageProvider) DeepCopyInto(out *StorageProvider)

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

func (*StorageProvider) DeepCopyObject

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

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

type StorageProviderList

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

StorageProviderList contains a list of `StorageProvider`.

func (*StorageProviderList) DeepCopy

func (in *StorageProviderList) DeepCopy() *StorageProviderList

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

func (*StorageProviderList) DeepCopyInto

func (in *StorageProviderList) DeepCopyInto(out *StorageProviderList)

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

func (*StorageProviderList) DeepCopyObject

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

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

type StorageProviderPhase

type StorageProviderPhase string

StorageProviderPhase defines phases of a `StorageProvider`.

+enum

const (
	// StorageProviderNotReady indicates that the `StorageProvider` is not ready,
	// usually because the specified CSI driver is not yet installed.
	StorageProviderNotReady StorageProviderPhase = "NotReady"
	// StorageProviderReady indicates that the `StorageProvider` is ready for use.
	StorageProviderReady StorageProviderPhase = "Ready"
)

type StorageProviderSpec

type StorageProviderSpec struct {
	// Specifies the name of the CSI driver used to access remote storage.
	// This field can be empty, it indicates that the storage is not accessible via CSI.
	//
	// +optional
	CSIDriverName string `json:"csiDriverName,omitempty"`

	// A Go template that used to render and generate `k8s.io/api/core/v1.Secret`
	// resources for a specific CSI driver.
	// For example, `accessKey` and `secretKey` needed by CSI-S3 are stored in this
	// `Secret` resource.
	//
	// +optional
	CSIDriverSecretTemplate string `json:"csiDriverSecretTemplate,omitempty"`

	// A Go template utilized to render and generate `kubernetes.storage.k8s.io.v1.StorageClass`
	// resources. The `StorageClass' created by this template is aimed at using the CSI driver.
	//
	// +optional
	StorageClassTemplate string `json:"storageClassTemplate,omitempty"`

	// A Go template that renders and generates `k8s.io/api/core/v1.PersistentVolumeClaim`
	// resources. This PVC can reference the `StorageClass` created from `storageClassTemplate`,
	// allowing Pods to access remote storage by mounting the PVC.
	//
	// +optional
	PersistentVolumeClaimTemplate string `json:"persistentVolumeClaimTemplate,omitempty"`

	// A Go template used to render and generate `k8s.io/api/core/v1.Secret`.
	// This `Secret` involves the configuration details required by the `datasafed` tool
	// to access remote storage. For example, the `Secret` should contain `endpoint`,
	// `bucket`, 'region', 'accessKey', 'secretKey', or something else for S3 storage.
	// This field can be empty, it means this kind of storage is not accessible via
	// the `datasafed` tool.
	//
	// +optional
	DatasafedConfigTemplate string `json:"datasafedConfigTemplate,omitempty"`

	// Describes the parameters required for storage.
	// The parameters defined here can be referenced in the above templates,
	// and `kbcli` uses this definition for dynamic command-line parameter parsing.
	//
	// +optional
	ParametersSchema *ParametersSchema `json:"parametersSchema,omitempty"`
}

StorageProviderSpec defines the desired state of `StorageProvider`.

func (*StorageProviderSpec) DeepCopy

func (in *StorageProviderSpec) DeepCopy() *StorageProviderSpec

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

func (*StorageProviderSpec) DeepCopyInto

func (in *StorageProviderSpec) DeepCopyInto(out *StorageProviderSpec)

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

type StorageProviderStatus

type StorageProviderStatus struct {
	// The phase of the `StorageProvider`. Valid phases are `NotReady` and `Ready`.
	//
	// +kubebuilder:validation:Enum={NotReady,Ready}
	Phase StorageProviderPhase `json:"phase,omitempty"`

	// Describes the current state of the `StorageProvider`.
	//
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

StorageProviderStatus defines the observed state of `StorageProvider`.

func (*StorageProviderStatus) DeepCopy

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

func (*StorageProviderStatus) DeepCopyInto

func (in *StorageProviderStatus) DeepCopyInto(out *StorageProviderStatus)

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

Jump to

Keyboard shortcuts

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