Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the s3 v1alpha1 API group +kubebuilder:object:generate=true +groupName=s3.linka.cloud
Index ¶
Constants ¶
const ( MinioAccessKey = "MINIO_ACCESS_KEY" MinioSecretKey = "MINIO_SECRET_KEY" MinioEndpoint = "MINIO_ENDPOINT" MinioBucket = "MINIO_BUCKET" MinioSecure = "MINIO_SECURE" )
const ( BucketConditionCreating = "Creating" BucketConditionReady = "Ready" BucketConditionError = "Error" BucketConditionDeleting = "Deleting" BucketConditionReasonErrCreateBucket = "ErrCreateBucket" BucketConditionReasonErrCreateServiceAccount = "ErrCreateServiceAccount" BucketConditionReasonErrCreatePolicy = "ErrCreatePolicy" BucketConditionReasonErrCreateSecret = "ErrCreateSecret" BucketAccessSecretType = "s3.linka.cloud/bucket-access" )
const ( BucketSAConditionCreating = "Creating" BucketSAConditionReady = "Ready" BucketSAConditionError = "Error" BucketSAConditionDeleting = "Deleting" BucketSAConditionDeletionPending = "DeletionPending" BucketSAConditionReasonErrCreateUser = "ErrCreateUser" BucketSAConditionReasonErrCreateAccount = "ErrCreateAccount" BucketSAConditionReasonErrCreatePolicy = "ErrCreatePolicy" BucketSASecretType = "s3.linka.cloud/service-account" ServiceAccountAnnotation = "s3.linka.cloud/service-account" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "s3.linka.cloud", 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 )
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec BucketSpec `json:"spec,omitempty"` Status BucketStatus `json:"status,omitempty"` }
Bucket is the Schema for the buckets API The controller will try to create a bucket with the same name as the Bucket resource, it will also create a user and the policy giving read/write access to the bucket. It will then create a secret with the credentials the user's service account credentials: MINIO_ACCESS_KEY: the account's access key MINIO_SECRET_KEY: the account's secret key MINIO_ENDPOINT: the endpoint of the minio server MINIO_BUCKET: the name of the bucket MINIO_SECURE: whether the connection to the minio server should be secure
func (*Bucket) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bucket.
func (*Bucket) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Bucket) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BucketAccess ¶
type BucketAccess struct { AccessKey string SecretKey string Endpoint string Bucket string Secure bool }
func (*BucketAccess) DeepCopy ¶
func (in *BucketAccess) DeepCopy() *BucketAccess
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketAccess.
func (*BucketAccess) DeepCopyInto ¶
func (in *BucketAccess) DeepCopyInto(out *BucketAccess)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BucketList ¶
type BucketList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Bucket `json:"items"` }
BucketList contains a list of Bucket
func (*BucketList) DeepCopy ¶
func (in *BucketList) DeepCopy() *BucketList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketList.
func (*BucketList) DeepCopyInto ¶
func (in *BucketList) DeepCopyInto(out *BucketList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BucketList) DeepCopyObject ¶
func (in *BucketList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BucketReclaimPolicy ¶
type BucketReclaimPolicy string
BucketReclaimPolicy describes a policy for end-of-life maintenance of buckets. +kubebuilder:validation:Enum:=Delete;Retain
const ( // BucketReclaimDelete means the bucket will be deleted from Kubernetes on Bucket resource deletion. BucketReclaimDelete BucketReclaimPolicy = "Delete" // BucketReclaimRetain means the bucket will be left in its current phase (Released) for manual reclamation by the administrator. // The default policy is Retain. BucketReclaimRetain BucketReclaimPolicy = "Retain" )
type BucketServiceAccount ¶
type BucketServiceAccount struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Status BucketServiceAccountStatus `json:"status,omitempty"` }
BucketServiceAccount is the Schema for the bucketserviceaccounts API
func (*BucketServiceAccount) DeepCopy ¶
func (in *BucketServiceAccount) DeepCopy() *BucketServiceAccount
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketServiceAccount.
func (*BucketServiceAccount) DeepCopyInto ¶
func (in *BucketServiceAccount) DeepCopyInto(out *BucketServiceAccount)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BucketServiceAccount) DeepCopyObject ¶
func (in *BucketServiceAccount) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*BucketServiceAccount) GetObjectMeta ¶
func (b *BucketServiceAccount) GetObjectMeta() metav1.Object
type BucketServiceAccountList ¶
type BucketServiceAccountList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []BucketServiceAccount `json:"items"` }
BucketServiceAccountList contains a list of BucketServiceAccount
func (*BucketServiceAccountList) DeepCopy ¶
func (in *BucketServiceAccountList) DeepCopy() *BucketServiceAccountList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketServiceAccountList.
func (*BucketServiceAccountList) DeepCopyInto ¶
func (in *BucketServiceAccountList) DeepCopyInto(out *BucketServiceAccountList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BucketServiceAccountList) DeepCopyObject ¶
func (in *BucketServiceAccountList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BucketServiceAccountStatus ¶
type BucketServiceAccountStatus struct { SecretName *string `json:"secretName,omitempty"` // Conditions represent the latest available observations of a BucketServiceAccount's current state. Conditions []metav1.Condition `json:"conditions,omitempty"` }
BucketServiceAccountStatus defines the observed state of BucketServiceAccount
func (*BucketServiceAccountStatus) DeepCopy ¶
func (in *BucketServiceAccountStatus) DeepCopy() *BucketServiceAccountStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketServiceAccountStatus.
func (*BucketServiceAccountStatus) DeepCopyInto ¶
func (in *BucketServiceAccountStatus) DeepCopyInto(out *BucketServiceAccountStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BucketSpec ¶
type BucketSpec struct { // ServiceAccount is the name of the service account that should be used for bucket access. // If not specified, a service account with the same name as the bucket will be created. // +optional // +kubebuilder:validation:MinLength=3 // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:Pattern=^[a-z0-9]+[a-z0-9.-]*[a-z0-9]+$ ServiceAccount string `json:"serviceAccount,omitempty"` // ReclaimPolicy is the name of the BucketReclaimPolicy to use for this bucket. // +kubebuilder:default:=Retain ReclaimPolicy BucketReclaimPolicy `json:"reclaimPolicy,omitempty"` // SecretName is the name of the secret containing the credentials to access the bucket that should be created. // +optional // +kubebuilder:validation:MinLength=3 // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:Pattern=^[a-z0-9]+[a-z0-9.-]*[a-z0-9]+$ SecretName *string `json:"secretName,omitempty"` // SecretTemplate is the template for the secret containing the credentials to access the bucket that should be created. // The templates takes a BucketAccess struct as input. // +optional SecretTemplate map[string]string `json:"secretTemplate,omitempty"` }
BucketSpec defines the desired state of Bucket
func (*BucketSpec) DeepCopy ¶
func (in *BucketSpec) DeepCopy() *BucketSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketSpec.
func (*BucketSpec) DeepCopyInto ¶
func (in *BucketSpec) DeepCopyInto(out *BucketSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BucketStatus ¶
type BucketStatus struct { // +optional Endpoint *string `json:"endpoint,omitempty"` // +optional SecretName *string `json:"secretName,omitempty"` Conditions []metav1.Condition `json:"conditions,omitempty"` }
BucketStatus defines the observed state of Bucket
func (*BucketStatus) DeepCopy ¶
func (in *BucketStatus) DeepCopy() *BucketStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketStatus.
func (*BucketStatus) DeepCopyInto ¶
func (in *BucketStatus) DeepCopyInto(out *BucketStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.