v1alpha1

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	PhaseUnknown  = ""
	PhasePending  = "Pending"
	PhaseCreating = "Creating"
	PhaseReady    = "Ready"
	PhaseDeleting = "Deleting"
)

Variables

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

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

	Spec   BridgeClusterSpec   `json:"spec,omitempty"`
	Status BridgeClusterStatus `json:"status,omitempty"`
}

BridgeCluster is the Schema for the bridgeclusters API

func (*BridgeCluster) DeepCopy

func (in *BridgeCluster) DeepCopy() *BridgeCluster

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

func (*BridgeCluster) DeepCopyInto

func (in *BridgeCluster) DeepCopyInto(out *BridgeCluster)

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

func (*BridgeCluster) DeepCopyObject

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

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

type BridgeClusterList

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

BridgeClusterList contains a list of BridgeCluster

func (*BridgeClusterList) DeepCopy

func (in *BridgeClusterList) DeepCopy() *BridgeClusterList

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

func (*BridgeClusterList) DeepCopyInto

func (in *BridgeClusterList) DeepCopyInto(out *BridgeClusterList)

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

func (*BridgeClusterList) DeepCopyObject

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

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

type BridgeClusterSpec

type BridgeClusterSpec struct {

	// represents the cluster name within Crunchy Bridge, must be unique per team
	// +kubebuilder:validation:MinLength=5
	Name string `json:"name"`
	// identifies the target team in which to create the cluster.
	// Defaults to the personal team of the operator's Crunchy Bridge account
	// +optional
	TeamID string `json:"team_id"`
	// identifies the Crunchy Bridge provioning plan (e.g. hobby-2, standard-8)
	Plan string `json:"plan"`
	// identifies the size of PostgreSQL database volume in gigabytes
	// +kubebuilder:validation:Minimum=10
	// +kubebuilder:validation:Maximum=65535
	StorageGB int `json:"storage"`
	// identifies the desired cloud infrastructure provider
	// +kubebuilder:validation:Enum=aws;gcp;azure
	Provider string `json:"provider"`
	// identifies the requested deployment region within the provider (e.g. us-east-1)
	Region string `json:"region"`
	// selects the major version of PostgreSQL to deploy (e.g. 12, 13)
	// +kubebuilder:validation:Minimum=12
	PGMajorVer int `json:"pg_major_version"`
	// flags whether to deploy the additional nodes to enable high availability
	// +optional
	HighAvail bool `json:"enable_ha"`
}

defines the desired state of BridgeCluster

func (*BridgeClusterSpec) DeepCopy

func (in *BridgeClusterSpec) DeepCopy() *BridgeClusterSpec

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

func (*BridgeClusterSpec) DeepCopyInto

func (in *BridgeClusterSpec) DeepCopyInto(out *BridgeClusterSpec)

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

type BridgeClusterStatus

type BridgeClusterStatus struct {

	// represents the cluster creation phase:
	//     pending - creation not yet started
	//     creating - provisioning in progress
	//     ready - cluster provisioning complete
	Phase string `json:"phase"`
	// last status update from the controller, does not correlate to cluster.updated_at
	Updated string `json:"last_update"`
	// represents cluster detail from Crunchy Bridge
	Cluster ClusterStatus `json:"cluster"`
	// provides non-user specific connection information
	Connect Connection `json:"connection"`
}

defines the observed state of BridgeCluster

func (*BridgeClusterStatus) DeepCopy

func (in *BridgeClusterStatus) DeepCopy() *BridgeClusterStatus

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

func (*BridgeClusterStatus) DeepCopyInto

func (in *BridgeClusterStatus) DeepCopyInto(out *BridgeClusterStatus)

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

type ClusterStatus

type ClusterStatus struct {
	// represents the Crunchy Bridge cluster identifier
	ID string `json:"id"`
	// represents the cluster name provided in the request
	Name string `json:"name"`
	// represents the ID of the team which owns the cluster
	TeamID string `json:"team_id"`

	// represents the plan-allocated CPUs for the cluster
	CPU int `json:"cpu"`
	// represents the plan-allocated memory in gigabytes
	MemoryGB int `json:"memory"`
	// represents the database volume size in gigabytes
	StorageGB int `json:"storage"`
	// represents the PostgreSQL major version number
	PGMajorVer int `json:"major_version"`
	// represents whether the cluster has high availability enabled
	HighAvail bool `json:"ha_enabled"`

	// represents the cluster creation time as known to Crunchy Bridge
	Created string `json:"created_at"`
	// represents the last change time internal to Crunchy Bridge
	Updated string `json:"updated_at"`

	// represents the infrastructure provider for the cluster
	ProviderID string `json:"provider_id"`
	// represents the region location for the cluster
	RegionID string `json:"region_id"`
}

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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

type Connection

type Connection struct {
	// represents the database connection string without user information
	// (e.g.postgres://p.fepkwudi6.example.com:5432/postgres)
	URI string `json:"connect_string"`
	// identifies the name of the database role from which bound user accounts
	// inherit their permissions.
	// Applications should use SET ROLE to ensure DDL executed can be shared
	// among binding roles
	ParentDBRole string `json:"parent_db_role"`
	// identifies the initial database created with the cluster
	DatabaseName string `json:"database_name"`
}

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 DatabaseRole

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

	Spec   DatabaseRoleSpec   `json:"spec,omitempty"`
	Status DatabaseRoleStatus `json:"status,omitempty"`
}

DatabaseRole is the Schema for the databaseroles API

func (*DatabaseRole) DeepCopy

func (in *DatabaseRole) DeepCopy() *DatabaseRole

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

func (*DatabaseRole) DeepCopyInto

func (in *DatabaseRole) DeepCopyInto(out *DatabaseRole)

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

func (*DatabaseRole) DeepCopyObject

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

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

type DatabaseRoleList

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

DatabaseRoleList contains a list of DatabaseRole

func (*DatabaseRoleList) DeepCopy

func (in *DatabaseRoleList) DeepCopy() *DatabaseRoleList

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

func (*DatabaseRoleList) DeepCopyInto

func (in *DatabaseRoleList) DeepCopyInto(out *DatabaseRoleList)

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

func (*DatabaseRoleList) DeepCopyObject

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

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

type DatabaseRoleSpec

type DatabaseRoleSpec struct {

	// identifies the cluster on which this role exists
	ClusterID string `json:"cluster_id"`
	// identifies the requested role name, defaults to a system-generated
	// name if not provided
	// +optional
	RoleName string `json:"role_name"`
}

DatabaseRoleSpec defines the desired state of DatabaseRole

func (*DatabaseRoleSpec) DeepCopy

func (in *DatabaseRoleSpec) DeepCopy() *DatabaseRoleSpec

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

func (*DatabaseRoleSpec) DeepCopyInto

func (in *DatabaseRoleSpec) DeepCopyInto(out *DatabaseRoleSpec)

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

type DatabaseRoleStatus

type DatabaseRoleStatus struct {

	// represents the creation state of the request
	Phase string `json:"phase"`
	// represents the creation time for the role
	Created string `json:"created_at"`
	// represents the role provisioned for this request
	RoleName string `json:"role_name"`
	// represents the secret associated with this role
	CredentialRef NamespacedName `json:"credential_ref"`
}

DatabaseRoleStatus defines the observed state of DatabaseRole

func (*DatabaseRoleStatus) DeepCopy

func (in *DatabaseRoleStatus) DeepCopy() *DatabaseRoleStatus

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

func (*DatabaseRoleStatus) DeepCopyInto

func (in *DatabaseRoleStatus) DeepCopyInto(out *DatabaseRoleStatus)

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

type NamespacedName

type NamespacedName struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

Namespaced name is a light representation of a name in a namespace

func (*NamespacedName) DeepCopy

func (in *NamespacedName) DeepCopy() *NamespacedName

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

func (*NamespacedName) DeepCopyInto

func (in *NamespacedName) DeepCopyInto(out *NamespacedName)

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