v1alpha1

package
v0.0.0-...-a1cbf69 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const BucketAnnotation = "storage.k8s.riveiro.io/bucket"

BucketAnnotation is a annotation to keep tracking of the original bucket created by the resource.

View Source
const BucketFinalizerName = "bucket.storage.k8s.riveiro.io/finalizer"

BucketFinalizerName is the name of the bucket finalizer

View Source
const BucketOwnerLabel = "bucket-storage-k8s-riveiro-io-owner"

BucketOwnerLabel is a label to ensure we're labeling buckets in GCS with the proper owner and allow tracing.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "storage.k8s.riveiro.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
)

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 theSchema for the buckets API

func (*Bucket) AddFinalizer

func (b *Bucket) AddFinalizer(finalizerName string)

AddFinalizer adds the specified finalizer

func (*Bucket) DeepCopy

func (in *Bucket) DeepCopy() *Bucket

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

func (*Bucket) DeepCopyInto

func (in *Bucket) DeepCopyInto(out *Bucket)

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

func (*Bucket) DeepCopyObject

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

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

func (*Bucket) HasFinalizer

func (b *Bucket) HasFinalizer(finalizerName string) bool

HasFinalizer returns true if the item has the specified finalizer

func (*Bucket) IsBeingDeleted

func (b *Bucket) IsBeingDeleted() bool

IsBeingDeleted returns true if a deletion timestamp is set

func (*Bucket) IsGCSBucketRefValid

func (b *Bucket) IsGCSBucketRefValid() bool

IsGCSBucketRefValid check if the resource already has a ref with a GCS bucket

func (*Bucket) Owned

func (b *Bucket) Owned(a *storage.BucketAttrs) bool

Owned checks if the resource is owner of the bucket

func (*Bucket) RemoveFinalizer

func (b *Bucket) RemoveFinalizer(finalizerName string)

RemoveFinalizer removes the specified finalizer

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 BucketSpec

type BucketSpec struct {
	// +kubebuilder:validation:Required
	Name string `json:"name,omitempty"`

	// Defines the project where the bucket will be created.
	// +kubebuilder:validation:Required
	Project string `json:"project,omitempty"`

	// Defines the location where the bucket will be created.
	// https://cloud.google.com/storage/docs/locations
	// +kubebuilder:validation:Required
	Location string `json:"location,omitempty"`

	// Defines the kind of the storage to use.
	// https://cloud.google.com/storage/docs/storage-classes
	// +kubebuilder:validation:Required
	StorageClass string `json:"storageClass,omitempty"` //

	// Defines if we gcs bucket should be delete with the CR.
	// +kubebuilder:validation:Required
	RemoveOnDelete bool `json:"removeOnDelete,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 {
	GCSBucketRef string `json:"gcsBucketRef,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.

Jump to

Keyboard shortcuts

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