v1alpha1

package
v0.0.0-...-d1a8c34 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: Apache-2.0 Imports: 5 Imported by: 43

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the objectbucket v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=objectbucket.io

Package v1alpha1 contains API Schema definitions for the objectbucket v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=objectbucket.io

Index

Constants

View Source
const (
	AwsKeyField        = "AWS_ACCESS_KEY_ID"
	AwsSecretField     = "AWS_SECRET_ACCESS_KEY"
	StorageClassBucket = "bucketName"
)

Exported constants used by provisioners: including conventional environment variable names for S3 Access and Secret Key, and map key names. Eg. key to access a bucket name in a storage class used for brownfield buckets, or the key to create an OB's Authentication{}.

View Source
const (
	// ObjectBucketClaimStatusPhasePending indicates that the provisioner has begun handling the request and that it is
	// still in process
	ObjectBucketClaimStatusPhasePending = "Pending"
	// ObjectBucketClaimStatusPhaseBound indicates that provisioning has succeeded, the objectBucket is marked bound, and
	// there is now a configMap and secret containing the appropriate bucket data in the namespace of the claim
	ObjectBucketClaimStatusPhaseBound = "Bound"
	// ObjectBucketClaimStatusPhaseReleased TODO this would likely mean that the OB was deleted. That situation should never
	// happen outside of the claim being deleted.  So this state shouldn't naturally arise out of automation.
	ObjectBucketClaimStatusPhaseReleased = "Released"
	// ObjectBucketClaimStatusPhaseFailed indicates that provisioning failed.  There should be no configMap, secret, or
	// object bucket and no bucket should be left hanging in the object store
	ObjectBucketClaimStatusPhaseFailed = "Failed"
)
View Source
const ObjectBucketClaimKind = "ObjectBucketClaim"
View Source
const ObjectBucketKind = "ObjectBucket"
View Source
const Version = "v1alpha1"

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: objectbucketio.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func GroupKindVersion

func GroupKindVersion(kind string) schema.GroupVersionKind

func Kind

func Kind(kind string) schema.GroupKind

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

func ObjectBucketClaimGVK

func ObjectBucketClaimGVK() schema.GroupVersionKind

func ObjectBucketGVK

func ObjectBucketGVK() schema.GroupVersionKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AccessKeys

type AccessKeys struct {
	// AccessKeyId is the S3 style access key to be written to a secret
	AccessKeyID string `json:"-"`
	// SecretAccessKey is the S3 style secret key to be written to a secret
	SecretAccessKey string `json:"-"`
}

AccessKeys is an Authentication type for passing AWS S3 style key pairs from the provisioner to the reconciler

func (*AccessKeys) DeepCopy

func (in *AccessKeys) DeepCopy() *AccessKeys

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

func (*AccessKeys) DeepCopyInto

func (in *AccessKeys) DeepCopyInto(out *AccessKeys)

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

type Authentication

type Authentication struct {
	AccessKeys           *AccessKeys       `json:"-"`
	AdditionalSecretData map[string]string `json:"-"`
}

Authentication wraps all supported auth types. The design choice enables expansion of supported types while protecting backwards compatibility.

func (*Authentication) DeepCopy

func (in *Authentication) DeepCopy() *Authentication

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

func (*Authentication) DeepCopyInto

func (in *Authentication) DeepCopyInto(out *Authentication)

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

func (*Authentication) ToMap

func (a *Authentication) ToMap() map[string]string

ToMap converts the any defined authentication type into a map[string]string for writing to a Secret.StringData field

type Connection

type Connection struct {
	Endpoint        *Endpoint         `json:"endpoint"`
	Authentication  *Authentication   `json:"-"`
	AdditionalState map[string]string `json:"additionalState"`
}

Connection encapsulates Endpoint and Authentication data to simplify the expected return values of the Provision() interface method. This makes it more clear to library consumers what specific values they should return from their Provisioner interface implementation.

func (*Connection) DeepCopy

func (in *Connection) DeepCopy() *Connection

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

func (*Connection) DeepCopyInto

func (in *Connection) DeepCopyInto(out *Connection)

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

type Endpoint

type Endpoint struct {
	BucketHost           string            `json:"bucketHost"`
	BucketPort           int               `json:"bucketPort"`
	BucketName           string            `json:"bucketName"`
	Region               string            `json:"region"`
	SubRegion            string            `json:"subRegion"`
	AdditionalConfigData map[string]string `json:"additionalConfig"`
}

Endpoint contains all connection relevant data that an app may require for accessing the bucket

func (*Endpoint) DeepCopy

func (in *Endpoint) DeepCopy() *Endpoint

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

func (*Endpoint) DeepCopyInto

func (in *Endpoint) DeepCopyInto(out *Endpoint)

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

type ObjectBucket

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

	Spec   ObjectBucketSpec   `json:"spec,omitempty"`
	Status ObjectBucketStatus `json:"status,omitempty"`
}

ObjectBucket is the Schema for the objectbuckets API

func (*ObjectBucket) DeepCopy

func (in *ObjectBucket) DeepCopy() *ObjectBucket

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

func (*ObjectBucket) DeepCopyInto

func (in *ObjectBucket) DeepCopyInto(out *ObjectBucket)

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

func (*ObjectBucket) DeepCopyObject

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

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

type ObjectBucketClaim

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

	Spec   ObjectBucketClaimSpec   `json:"spec,omitempty"`
	Status ObjectBucketClaimStatus `json:"status,omitempty"`
}

ObjectBucketClaim is the Schema for the objectbucketclaims API

func (*ObjectBucketClaim) DeepCopy

func (in *ObjectBucketClaim) DeepCopy() *ObjectBucketClaim

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

func (*ObjectBucketClaim) DeepCopyInto

func (in *ObjectBucketClaim) DeepCopyInto(out *ObjectBucketClaim)

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

func (*ObjectBucketClaim) DeepCopyObject

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

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

type ObjectBucketClaimList

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

ObjectBucketClaimList contains a list of ObjectBucketClaim

func (*ObjectBucketClaimList) DeepCopy

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

func (*ObjectBucketClaimList) DeepCopyInto

func (in *ObjectBucketClaimList) DeepCopyInto(out *ObjectBucketClaimList)

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

func (*ObjectBucketClaimList) DeepCopyObject

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

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

type ObjectBucketClaimSpec

type ObjectBucketClaimSpec struct {

	// StorageClass names the StorageClass object representing the desired provisioner and parameters
	StorageClassName string `json:"storageClassName"`

	// BucketName (not recommended) the name of the bucket.  Caution!
	// In-store bucket names may collide across namespaces.  If you define
	// the name yourself, try to make it as unique as possible.
	// +optional
	BucketName string `json:"bucketName,omityempty"`

	// GenerateBucketName (recommended) a prefix for a bucket name to be
	// followed by a hyphen and 5 random characters. Protects against
	// in-store name collisions.
	// +optional
	GenerateBucketName string `json:"generateBucketName,omitempty"`

	// AdditionalConfig gives providers a location to set
	// proprietary config values (tenant, namespace, etc)
	// +optional
	AdditionalConfig map[string]string `json:"additionalConfig,omitempty"`

	// ObjectBucketName is the name of the object bucket resource. This is the authoritative
	// determination for binding.
	ObjectBucketName string `json:"objectBucketName,omitempty"`
}

ObjectBucketClaimSpec defines the desired state of ObjectBucketClaim

func (*ObjectBucketClaimSpec) DeepCopy

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

func (*ObjectBucketClaimSpec) DeepCopyInto

func (in *ObjectBucketClaimSpec) DeepCopyInto(out *ObjectBucketClaimSpec)

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

type ObjectBucketClaimStatus

type ObjectBucketClaimStatus struct {
	Phase ObjectBucketClaimStatusPhase `json:"phase,omitempty"`
}

ObjectBucketClaimStatus defines the observed state of ObjectBucketClaim

func (*ObjectBucketClaimStatus) DeepCopy

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

func (*ObjectBucketClaimStatus) DeepCopyInto

func (in *ObjectBucketClaimStatus) DeepCopyInto(out *ObjectBucketClaimStatus)

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

type ObjectBucketClaimStatusPhase

type ObjectBucketClaimStatusPhase string

ObjectBucketClaimStatusPhase is set by the controller to save the state of the provisioning process.

type ObjectBucketList

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

ObjectBucketList contains a list of ObjectBucket

func (*ObjectBucketList) DeepCopy

func (in *ObjectBucketList) DeepCopy() *ObjectBucketList

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

func (*ObjectBucketList) DeepCopyInto

func (in *ObjectBucketList) DeepCopyInto(out *ObjectBucketList)

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

func (*ObjectBucketList) DeepCopyObject

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

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

type ObjectBucketSpec

type ObjectBucketSpec struct {
	StorageClassName string                                `json:"storageClassName"`
	ReclaimPolicy    *corev1.PersistentVolumeReclaimPolicy `json:"reclaimPolicy"`
	ClaimRef         *corev1.ObjectReference               `json:"claimRef"`
	*Connection      `json:",inline"`
}

ObjectBucketSpec defines the desired state of ObjectBucket. Fields defined here should be normal among all providers. Authentication must be of a type defined in this package to pass type checks in reconciler

func (*ObjectBucketSpec) DeepCopy

func (in *ObjectBucketSpec) DeepCopy() *ObjectBucketSpec

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

func (*ObjectBucketSpec) DeepCopyInto

func (in *ObjectBucketSpec) DeepCopyInto(out *ObjectBucketSpec)

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

type ObjectBucketStatus

type ObjectBucketStatus struct {
	Phase ObjectBucketStatusPhase `json:"phase"`
}

ObjectBucketStatus defines the observed state of ObjectBucket

func (*ObjectBucketStatus) DeepCopy

func (in *ObjectBucketStatus) DeepCopy() *ObjectBucketStatus

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

func (*ObjectBucketStatus) DeepCopyInto

func (in *ObjectBucketStatus) DeepCopyInto(out *ObjectBucketStatus)

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

type ObjectBucketStatusPhase

type ObjectBucketStatusPhase string

ObjectBucketStatusPhase is set by the controller to save the state of the provisioning process.

const (
	// ObjectBucketStatusPhaseBound indicates that the objectBucket has been logically bound to a claim following a
	// successful provision.  It is NOT the authority for the status of the claim an object bucket. For that, see
	// objectBucketClaim.Spec.ObjectBucketName
	ObjectBucketStatusPhaseBound ObjectBucketStatusPhase = "Bound"
	// ObjectBucketStatusPhaseReleased indicates that the object bucket was once bound to a claim that has since been deleted
	// this phase can occur when the claim is deleted and the reconciler is in the process of either deleting the bucket or
	// revoking access to that bucket in the case of brownfield.
	ObjectBucketStatusPhaseReleased ObjectBucketStatusPhase = "Released"
	// ObjectBucketStatusPhaseFailed TODO this phase does not have a defined reason for existing.  If provisioning fails
	//  the OB is cleaned up.  Since we generate OBs for brownfield cases, we also would delete them on failures.  The
	//  result is that if this phase is set, the OB would deleted soon after anyway.
	ObjectBucketStatusPhaseFailed ObjectBucketStatusPhase = "Failed"
)

Jump to

Keyboard shortcuts

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