v1alpha1

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the databases v1alpha1 API group +kubebuilder:object:generate=true +groupName=databases.digitalocean.com

Index

Constants

View Source
const (
	// DatabaseClusterKind is the kind of a DatabaseCluster.
	DatabaseClusterKind = "DatabaseCluster"
	// DatabaseClusterReferenceKind is the kind of a DatabaseClusterReference.
	DatabaseClusterReferenceKind = "DatabaseClusterReference"
	// DatabaseUserKind is the kind of a DatabaseUser.
	DatabaseUserKind = "DatabaseUser"
	// DatabaseUserReferenceKind is the kind of a DatabaseUserReference.
	DatabaseUserReferenceKind = "DatabaseUserReference"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "databases.digitalocean.com", 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 DatabaseCluster

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

	Spec   DatabaseClusterSpec   `json:"spec,omitempty"`
	Status DatabaseClusterStatus `json:"status,omitempty"`
}

DatabaseCluster is the Schema for the databaseclusters API +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Engine",type=string,JSONPath=`.spec.engine` +kubebuilder:printcolumn:name="Cluster name",type=string,JSONPath=`.spec.name` +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status`

func (*DatabaseCluster) DeepCopy

func (in *DatabaseCluster) DeepCopy() *DatabaseCluster

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

func (*DatabaseCluster) DeepCopyInto

func (in *DatabaseCluster) DeepCopyInto(out *DatabaseCluster)

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

func (*DatabaseCluster) DeepCopyObject

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

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

func (*DatabaseCluster) SetupWebhookWithManager

func (r *DatabaseCluster) SetupWebhookWithManager(mgr ctrl.Manager, godoClient *godo.Client) error

func (*DatabaseCluster) ValidateCreate

func (r *DatabaseCluster) ValidateCreate() (warnings admission.Warnings, err error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*DatabaseCluster) ValidateDelete

func (r *DatabaseCluster) ValidateDelete() (warnings admission.Warnings, err error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*DatabaseCluster) ValidateUpdate

func (r *DatabaseCluster) ValidateUpdate(old runtime.Object) (warnings admission.Warnings, err error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type DatabaseClusterList

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

DatabaseClusterList contains a list of DatabaseCluster

func (*DatabaseClusterList) DeepCopy

func (in *DatabaseClusterList) DeepCopy() *DatabaseClusterList

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

func (*DatabaseClusterList) DeepCopyInto

func (in *DatabaseClusterList) DeepCopyInto(out *DatabaseClusterList)

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

func (*DatabaseClusterList) DeepCopyObject

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

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

type DatabaseClusterReference

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

	Spec   DatabaseClusterReferenceSpec   `json:"spec,omitempty"`
	Status DatabaseClusterReferenceStatus `json:"status,omitempty"`
}

DatabaseClusterReference is the Schema for the databaseclusterreferences API

func (*DatabaseClusterReference) DeepCopy

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

func (*DatabaseClusterReference) DeepCopyInto

func (in *DatabaseClusterReference) DeepCopyInto(out *DatabaseClusterReference)

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

func (*DatabaseClusterReference) DeepCopyObject

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

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

func (*DatabaseClusterReference) SetupWebhookWithManager

func (r *DatabaseClusterReference) SetupWebhookWithManager(mgr ctrl.Manager, godoClient *godo.Client) error

func (*DatabaseClusterReference) ValidateCreate

func (r *DatabaseClusterReference) ValidateCreate() (warnings admission.Warnings, err error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*DatabaseClusterReference) ValidateDelete

func (r *DatabaseClusterReference) ValidateDelete() (warnings admission.Warnings, err error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*DatabaseClusterReference) ValidateUpdate

func (r *DatabaseClusterReference) ValidateUpdate(old runtime.Object) (warnings admission.Warnings, err error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type DatabaseClusterReferenceList

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

DatabaseClusterReferenceList contains a list of DatabaseClusterReference

func (*DatabaseClusterReferenceList) DeepCopy

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

func (*DatabaseClusterReferenceList) DeepCopyInto

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

func (*DatabaseClusterReferenceList) DeepCopyObject

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

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

type DatabaseClusterReferenceSpec

type DatabaseClusterReferenceSpec struct {
	// UUID is the UUID of an existing database.
	UUID string `json:"uuid"`
}

DatabaseClusterReferenceSpec defines the desired state of DatabaseClusterReference

func (*DatabaseClusterReferenceSpec) DeepCopy

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

func (*DatabaseClusterReferenceSpec) DeepCopyInto

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

type DatabaseClusterReferenceStatus

type DatabaseClusterReferenceStatus struct {
	// Engine is the database engine to use.
	Engine string `json:"engine,omitempty"`
	// Name is the name of the database cluster.
	Name string `json:"name,omitempty"`
	// Version is the DB version to use.
	Version string `json:"version,omitempty"`
	// NumNodes is the number of nodes in the database cluster.
	NumNodes int64 `json:"numNodes,omitempty"`
	// Size is the slug of the node size to use.
	Size string `json:"size,omitempty"`
	// Region is the slug of the DO region for the cluster.
	Region string `json:"region,omitempty"`
	// Status is the status of the database cluster.
	Status string `json:"status,omitempty"`
	// CreatedAt is the time at which the database cluster was created.
	CreatedAt metav1.Time `json:"createdAt,omitempty"`
}

DatabaseClusterReferenceStatus defines the observed state of DatabaseClusterReference

func (*DatabaseClusterReferenceStatus) DeepCopy

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

func (*DatabaseClusterReferenceStatus) DeepCopyInto

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

type DatabaseClusterSpec

type DatabaseClusterSpec struct {
	// Engine is the database engine to use.
	Engine string `json:"engine"`
	// Name is the name of the database cluster.
	Name string `json:"name"`
	// Version is the DB version to use.
	Version string `json:"version"`
	// NumNodes is the number of nodes in the database cluster.
	NumNodes int64 `json:"numNodes"`
	// Size is the slug of the node size to use.
	Size string `json:"size"`
	// Region is the slug of the DO region for the cluster.
	Region string `json:"region"`
}

DatabaseClusterSpec defines the desired state of DatabaseCluster

func (*DatabaseClusterSpec) DeepCopy

func (in *DatabaseClusterSpec) DeepCopy() *DatabaseClusterSpec

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

func (*DatabaseClusterSpec) DeepCopyInto

func (in *DatabaseClusterSpec) DeepCopyInto(out *DatabaseClusterSpec)

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

func (*DatabaseClusterSpec) ToGodoCreateRequest

func (spec *DatabaseClusterSpec) ToGodoCreateRequest() *godo.DatabaseCreateRequest

ToGodoCreateRequest returns a create request for a database that will fulfill the DatabaseClusterSpec.

func (*DatabaseClusterSpec) ToGodoValidateCreateRequest

func (spec *DatabaseClusterSpec) ToGodoValidateCreateRequest() *extgodo.DatabaseValidateCreateRequest

ToGodoValidateCreateRequest returns a validation request for a database that will fulfill the DatabaseClusterSpec.

type DatabaseClusterStatus

type DatabaseClusterStatus struct {
	// UUID is the UUID of the database cluster.
	UUID string `json:"uuid,omitempty"`
	// Status is the status of the database cluster.
	Status string `json:"status,omitempty"`
	// CreatedAt is the time at which the database cluster was created.
	CreatedAt metav1.Time `json:"createdAt,omitempty"`
}

DatabaseClusterStatus defines the observed state of DatabaseCluster

func (*DatabaseClusterStatus) DeepCopy

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

func (*DatabaseClusterStatus) DeepCopyInto

func (in *DatabaseClusterStatus) DeepCopyInto(out *DatabaseClusterStatus)

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

type DatabaseUser

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

	Spec   DatabaseUserSpec   `json:"spec,omitempty"`
	Status DatabaseUserStatus `json:"status,omitempty"`
}

DatabaseUser is the Schema for the databaseusers API

func (*DatabaseUser) DeepCopy

func (in *DatabaseUser) DeepCopy() *DatabaseUser

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

func (*DatabaseUser) DeepCopyInto

func (in *DatabaseUser) DeepCopyInto(out *DatabaseUser)

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

func (*DatabaseUser) DeepCopyObject

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

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

func (*DatabaseUser) SetupWebhookWithManager

func (r *DatabaseUser) SetupWebhookWithManager(mgr ctrl.Manager, godoClient *godo.Client) error

func (*DatabaseUser) ValidateCreate

func (r *DatabaseUser) ValidateCreate() (warnings admission.Warnings, err error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*DatabaseUser) ValidateDelete

func (r *DatabaseUser) ValidateDelete() (warnings admission.Warnings, err error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*DatabaseUser) ValidateUpdate

func (r *DatabaseUser) ValidateUpdate(old runtime.Object) (warnings admission.Warnings, err error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type DatabaseUserList

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

DatabaseUserList contains a list of DatabaseUser

func (*DatabaseUserList) DeepCopy

func (in *DatabaseUserList) DeepCopy() *DatabaseUserList

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

func (*DatabaseUserList) DeepCopyInto

func (in *DatabaseUserList) DeepCopyInto(out *DatabaseUserList)

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

func (*DatabaseUserList) DeepCopyObject

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

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

type DatabaseUserReference

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

	Spec   DatabaseUserReferenceSpec   `json:"spec,omitempty"`
	Status DatabaseUserReferenceStatus `json:"status,omitempty"`
}

DatabaseUserReference is the Schema for the databaseuserreferences API

func (*DatabaseUserReference) DeepCopy

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

func (*DatabaseUserReference) DeepCopyInto

func (in *DatabaseUserReference) DeepCopyInto(out *DatabaseUserReference)

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

func (*DatabaseUserReference) DeepCopyObject

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

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

func (*DatabaseUserReference) SetupWebhookWithManager

func (r *DatabaseUserReference) SetupWebhookWithManager(mgr ctrl.Manager, godoClient *godo.Client) error

func (*DatabaseUserReference) ValidateCreate

func (r *DatabaseUserReference) ValidateCreate() (warnings admission.Warnings, err error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*DatabaseUserReference) ValidateDelete

func (r *DatabaseUserReference) ValidateDelete() (warnings admission.Warnings, err error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*DatabaseUserReference) ValidateUpdate

func (r *DatabaseUserReference) ValidateUpdate(old runtime.Object) (warnings admission.Warnings, err error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type DatabaseUserReferenceList

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

DatabaseUserReferenceList contains a list of DatabaseUserReference

func (*DatabaseUserReferenceList) DeepCopy

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

func (*DatabaseUserReferenceList) DeepCopyInto

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

func (*DatabaseUserReferenceList) DeepCopyObject

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

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

type DatabaseUserReferenceSpec

type DatabaseUserReferenceSpec struct {
	// Cluster is a reference to the DatabaseCluster or DatabaseClusterReference
	// that represents the database cluster in which the user exists.
	Cluster corev1.TypedLocalObjectReference `json:"databaseCluster"`
	// Username is the username of the referenced user.
	Username string `json:"username"`
}

DatabaseUserReferenceSpec defines the desired state of DatabaseUserReference

func (*DatabaseUserReferenceSpec) DeepCopy

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

func (*DatabaseUserReferenceSpec) DeepCopyInto

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

type DatabaseUserReferenceStatus

type DatabaseUserReferenceStatus struct {
	// ClusterUUID is the UUID of the cluster this user is in. We keep this in
	// the status so that we can reference the user even if the referenced
	// Cluster CR is deleted.
	ClusterUUID string `json:"clusterUUID,omitempty"`
	// Role is the user's role.
	Role string `json:"role,omitempty"`
}

DatabaseUserReferenceStatus defines the observed state of DatabaseUserReference

func (*DatabaseUserReferenceStatus) DeepCopy

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

func (*DatabaseUserReferenceStatus) DeepCopyInto

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

type DatabaseUserSpec

type DatabaseUserSpec struct {
	// Cluster is a reference to the DatabaseCluster or DatabaseClusterReference
	// that represents the database cluster in which the user will be created.
	Cluster corev1.TypedLocalObjectReference `json:"databaseCluster"`
	// Username is the username for the user.
	Username string `json:"username"`
}

DatabaseUserSpec defines the desired state of DatabaseUser

func (*DatabaseUserSpec) DeepCopy

func (in *DatabaseUserSpec) DeepCopy() *DatabaseUserSpec

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

func (*DatabaseUserSpec) DeepCopyInto

func (in *DatabaseUserSpec) DeepCopyInto(out *DatabaseUserSpec)

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

type DatabaseUserStatus

type DatabaseUserStatus struct {
	// ClusterUUID is the UUID of the cluster this user is in. We keep this in
	// the status so that we can manage the user even if the referenced Cluster
	// CR is deleted.
	ClusterUUID string `json:"clusterUUID,omitempty"`
	// Role is the user's role.
	Role string `json:"role,omitempty"`
}

DatabaseUserStatus defines the observed state of DatabaseUser

func (*DatabaseUserStatus) DeepCopy

func (in *DatabaseUserStatus) DeepCopy() *DatabaseUserStatus

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

func (*DatabaseUserStatus) DeepCopyInto

func (in *DatabaseUserStatus) DeepCopyInto(out *DatabaseUserStatus)

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