v1alpha1

package
v0.0.0-...-2e75498 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

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

type AuthenticationConfig struct {
	// The name of the secret containing the `root` user's
	// credentials. If the Secret does not exist, it will
	// be created, where the name of the Secret will be
	// formatted as `db8-mariadb-<instancename>-creds`.
	SecretName string `json:"secretName,omitempty"`

	// Set to `true` to prevent operator from auto-generating
	// credentials if the supplied credentials are empty. Not
	// recommended for production instances.
	// +kubebuilder:default:=docker.io
	AllowEmptyPasswords string `json:"allowEmptyPasswords,omitempty"`
}

AuthenticationConfig configures the configuration of a database instance.

type ImageConfig

type ImageConfig struct {
	// +kubebuilder:default:=docker.io
	Registry string `json:"registry,omitempty"`

	// Make this field optional to make this type reusable.
	// The default will be set by the controller.
	// +kubebuilder:validation:Optional
	Repository string `json:"repository,omitempty"`

	// +kubebuilder:default:=latest
	Tag string `json:"tag,omitempty"`

	// +kubebuilder:default:=IfNotPresent
	PullPolicy corev1.PullPolicy `json:"pullPolicy,omitempty"`

	// +kubebuilder:validation:Optional
	PullSecretNames []string `json:"pullSecretNames,omitempty"`
}

ImageConfig contains all configuration related to the Pod's container image.

type MariaDB

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

	Spec   MariaDBSpec   `json:"spec,omitempty"`
	Status MariaDBStatus `json:"status,omitempty"`
}

MariaDB is the Schema for the mariadbs API

func (*MariaDB) DeepCopy

func (in *MariaDB) DeepCopy() *MariaDB

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

func (*MariaDB) DeepCopyInto

func (in *MariaDB) DeepCopyInto(out *MariaDB)

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

func (*MariaDB) DeepCopyObject

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

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

type MariaDBArchitecture

type MariaDBArchitecture string

MariaDBArchitecture configures the database replication.

const (
	// MariaDBStandalone defines an architecture where a single primary replica is deployed.
	MariaDBStandalone MariaDBArchitecture = "Standalone"
)

type MariaDBList

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

MariaDBList contains a list of MariaDB

func (*MariaDBList) DeepCopy

func (in *MariaDBList) DeepCopy() *MariaDBList

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

func (*MariaDBList) DeepCopyInto

func (in *MariaDBList) DeepCopyInto(out *MariaDBList)

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

func (*MariaDBList) DeepCopyObject

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

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

type MariaDBReplica

type MariaDBReplica struct {
	// Persistence configures the settings for persistent data storage.
	Persistence PersistenceConfig `json:"persistence,omitempty"`

	// Resources defines the replica's resource requests and limits.
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

MariaDBReplica defines the configuration of a replica.

type MariaDBSpec

type MariaDBSpec struct {

	// Architecture configures the database replication architecture.
	// +kubebuilder:default:=Standalone
	Architecture MariaDBArchitecture `json:"architecture,omitempty"`

	// Authentication contains all authentication settings.
	Authentication AuthenticationConfig `json:"authentication,omitempty"`

	// Image contains all configuration related to the container image of the Pod.
	Image ImageConfig `json:"image,omitempty"`

	// Primary contains the configuration specific to the primary replica.
	Primary MariaDBReplica `json:"primary,omitempty"`
}

MariaDBSpec defines the desired state of MariaDB.

func (*MariaDBSpec) DeepCopy

func (in *MariaDBSpec) DeepCopy() *MariaDBSpec

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

func (*MariaDBSpec) DeepCopyInto

func (in *MariaDBSpec) DeepCopyInto(out *MariaDBSpec)

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

type MariaDBStatus

type MariaDBStatus struct {
}

MariaDBStatus defines the observed state of MariaDB.

func (*MariaDBStatus) DeepCopy

func (in *MariaDBStatus) DeepCopy() *MariaDBStatus

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

func (*MariaDBStatus) DeepCopyInto

func (in *MariaDBStatus) DeepCopyInto(out *MariaDBStatus)

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

type PersistenceConfig

type PersistenceConfig struct {
	// If set to `false` EmptyDir will be used
	// as storage backend causing data NOT to
	// be persisted between Pod restarts.
	// +kubebuilder:default:=true
	Enabled bool `json:"enabled,omitempty"`

	// The name of the PersistentVolumeClaim used to
	// persist the data between Pod restarts. If the
	// Secret does not exist, it will be created, where
	// the name of the Secret will be formatted as
	// `db8-mariadb-<instancename>-primary-<ordinal>-data`.
	// +kubebuilder:validation:Optional
	PersistentVolumeClaimName string `json:"persistentVolumeClaimName,omitempty"`

	// The name of the StorageClass used to provision
	// the volume. If not specified, the default storage
	// class will be used.
	// +kubebuilder:validation:Optional
	StorageClassName string `json:"storageClassName,omitempty"`

	// Annotations to add to the persistent volume claim.
	// +kubebuilder:validation:Optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Access modes for the persistent volume.
	// +kubebuilder:validation:Optional
	AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`

	// The size of the persistent volume.
	Size resource.Quantity `json:"size,omitempty"`

	// A selector to match an existing persistent volume.
	// +kubebuilder:validation:Optional
	Selector metav1.LabelSelector `json:"selector,omitempty"`
}

PersistenceConfig contains all configuration related to the Pod's persistent storage.

Jump to

Keyboard shortcuts

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