v1alpha

package
v0.0.0-...-1a81cf4 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 9

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=storage.arangodb.com

Index

Constants

View Source
const (
	ArangoLocalStorageResourceKind   = storage.ArangoLocalStorageResourceKind
	ArangoLocalStorageResourcePlural = storage.ArangoLocalStorageResourcePlural

	ArangoLocalStorageCRDName = ArangoLocalStorageResourcePlural + "." + groupName
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme

	SchemeGroupVersion           = schema.GroupVersion{Group: groupName, Version: "v1alpha"}
	ArangoLocalStorageShortNames = []string{"arangostorage"}
)
View Source
var (
	// ValidationError indicates a validation failure
	ValidationError = errors.New("validation failed")
)

Functions

func IsValidation

func IsValidation(err error) bool

IsValidation return true when the given error is or is caused by a ValidationError.

func Resource

func Resource(resource string) schema.GroupResource

Resource gets an ArangoCluster GroupResource for a specified resource

Types

type ArangoLocalStorage

type ArangoLocalStorage struct {
	meta.TypeMeta   `json:",inline"`
	meta.ObjectMeta `json:"metadata,omitempty"`
	Spec            LocalStorageSpec   `json:"spec"`
	Status          LocalStorageStatus `json:"status"`
}

ArangoLocalStorage contains the entire Kubernetes info for an ArangoDB local storage provider.

func (*ArangoLocalStorage) AsOwner

func (d *ArangoLocalStorage) AsOwner() meta.OwnerReference

AsOwner creates an OwnerReference for the given storage

func (*ArangoLocalStorage) DeepCopy

func (in *ArangoLocalStorage) DeepCopy() *ArangoLocalStorage

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

func (*ArangoLocalStorage) DeepCopyInto

func (in *ArangoLocalStorage) DeepCopyInto(out *ArangoLocalStorage)

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

func (*ArangoLocalStorage) DeepCopyObject

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

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

func (*ArangoLocalStorage) OwnerOf

func (d *ArangoLocalStorage) OwnerOf(in meta.Object) bool

type ArangoLocalStorageList

type ArangoLocalStorageList struct {
	meta.TypeMeta `json:",inline"`
	// Standard list metadata
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	meta.ListMeta `json:"metadata,omitempty"`
	Items         []ArangoLocalStorage `json:"items"`
}

ArangoLocalStorageList is a list of ArangoDB local storage providers.

func (*ArangoLocalStorageList) DeepCopy

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

func (*ArangoLocalStorageList) DeepCopyInto

func (in *ArangoLocalStorageList) DeepCopyInto(out *ArangoLocalStorageList)

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

func (*ArangoLocalStorageList) DeepCopyObject

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

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

type LocalStoragePodCustomization

type LocalStoragePodCustomization struct {
	// Priority if defined, sets the priority for pods of storage provisioner
	Priority *int32 `json:"priority,omitempty"`
}

func (*LocalStoragePodCustomization) DeepCopy

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

func (*LocalStoragePodCustomization) DeepCopyInto

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

func (*LocalStoragePodCustomization) GetPriority

func (l *LocalStoragePodCustomization) GetPriority() *int32

type LocalStorageSpec

type LocalStorageSpec struct {
	StorageClass StorageClassSpec `json:"storageClass"`
	// LocalPath setting specifies one or more local directories (on the nodes) used to create persistent volumes in.
	LocalPath []string `json:"localPath,omitempty"`

	// Tolerations specifies the tolerations added to pods of storage provisioner
	// +doc/type: []core.Toleration
	// +doc/link: Documentation of core.Toleration|https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#toleration-v1-core
	Tolerations []core.Toleration `json:"tolerations,omitempty"`
	// NodeSelector setting specifies which nodes the operator will provision persistent volumes on.
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// Privileged if set, passes Privileged flag to SecurityContext for pods of storage provisioner
	Privileged *bool `json:"privileged,omitempty"`

	PodCustomization *LocalStoragePodCustomization `json:"podCustomization,omitempty"`
}

LocalStorageSpec contains the specification part of an ArangoLocalStorage.

func (*LocalStorageSpec) DeepCopy

func (in *LocalStorageSpec) DeepCopy() *LocalStorageSpec

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

func (*LocalStorageSpec) DeepCopyInto

func (in *LocalStorageSpec) DeepCopyInto(out *LocalStorageSpec)

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

func (LocalStorageSpec) GetPrivileged

func (s LocalStorageSpec) GetPrivileged() bool

func (LocalStorageSpec) ResetImmutableFields

func (s LocalStorageSpec) ResetImmutableFields(target *LocalStorageSpec) []string

ResetImmutableFields replaces all immutable fields in the given target with values from the source spec. It returns a list of fields that have been reset. Field names are relative to `spec.`.

func (*LocalStorageSpec) SetDefaults

func (s *LocalStorageSpec) SetDefaults(localStorageName string)

SetDefaults fills empty field with default values.

func (LocalStorageSpec) Validate

func (s LocalStorageSpec) Validate() error

Validate the given spec, returning an error on validation problems or nil if all ok.

type LocalStorageState

type LocalStorageState string

LocalStorageState is a strongly typed state of a deploymenlocal storage

const (
	// LocalStorageStateNone indicates that the state is not set yet
	LocalStorageStateNone LocalStorageState = ""
	// LocalStorageStateCreating indicates that the local storage components are being created
	LocalStorageStateCreating LocalStorageState = "Creating"
	// LocalStorageStateRunning indicates that all components are running
	LocalStorageStateRunning LocalStorageState = "Running"
	// LocalStorageStateFailed indicates that a local storage is in a failed state
	// from which automatic recovery is impossible. Inspect `Reason` for more info.
	LocalStorageStateFailed LocalStorageState = "Failed"
)

func (LocalStorageState) IsFailed

func (cs LocalStorageState) IsFailed() bool

IsFailed returns true if given state is LocalStorageStateFailed

type LocalStorageStatus

type LocalStorageStatus struct {
	// State holds the current high level state of the local storage
	State LocalStorageState `json:"state,omitempty"`
	// Reason for the state this object is in.
	Reason string `json:"reason,omitempty"`
}

LocalStorageStatus contains the status part of an ArangoLocalStorage.

func (*LocalStorageStatus) DeepCopy

func (in *LocalStorageStatus) DeepCopy() *LocalStorageStatus

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

func (*LocalStorageStatus) DeepCopyInto

func (in *LocalStorageStatus) DeepCopyInto(out *LocalStorageStatus)

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

type StorageClassSpec

type StorageClassSpec struct {
	// Name setting specifies the name of the storage class that
	// created `PersistentVolume` will use.
	// If empty, this field defaults to the name of the `ArangoLocalStorage` object.
	// If a `StorageClass` with given name does not yet exist, it will be created.
	// +doc/default: ""
	Name string `json:"name,omitempty"`
	// IsDefault setting specifies if the created `StorageClass` will
	// be marked as default storage class.
	// +doc/default: false
	IsDefault bool `json:"isDefault,omitempty"`
	// ReclaimPolicy defines what happens to a persistent volume when released from its claim.
	// +doc/type: core.PersistentVolumeReclaimPolicy
	// +doc/link: Documentation of core.PersistentVolumeReclaimPolicy|https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
	ReclaimPolicy *core.PersistentVolumeReclaimPolicy `json:"reclaimPolicy,omitempty"`
}

StorageClassSpec contains specification for create StorageClass.

func (*StorageClassSpec) DeepCopy

func (in *StorageClassSpec) DeepCopy() *StorageClassSpec

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

func (*StorageClassSpec) DeepCopyInto

func (in *StorageClassSpec) DeepCopyInto(out *StorageClassSpec)

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

func (*StorageClassSpec) GetReclaimPolicy

func (s *StorageClassSpec) GetReclaimPolicy() core.PersistentVolumeReclaimPolicy

GetReclaimPolicy returns StorageClass Reclaim Policy

func (StorageClassSpec) ResetImmutableFields

func (s StorageClassSpec) ResetImmutableFields(fieldPrefix string, target *StorageClassSpec) []string

ResetImmutableFields replaces all immutable fields in the given target with values from the source spec. It returns a list of fields that have been reset. Field names are relative to `spec.`.

func (*StorageClassSpec) SetDefaults

func (s *StorageClassSpec) SetDefaults(localStorageName string)

SetDefaults fills empty field with default values.

func (StorageClassSpec) Validate

func (s StorageClassSpec) Validate() error

Validate the given spec, returning an error on validation problems or nil if all ok.

Jump to

Keyboard shortcuts

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