v1alpha1

package
v0.0.0-...-41ca10b Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the infra v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/k8s-sqldb-operator/pkg/apis/infra +k8s:defaulter-gen=TypeMeta +groupName=infra.example.com

Package v1alpha1 contains API Schema definitions for the infra v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/k8s-sqldb-operator/pkg/apis/infra +k8s:defaulter-gen=TypeMeta +groupName=infra.example.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "infra.example.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)

Functions

This section is empty.

Types

type BackupPhase

type BackupPhase string
const (
	// Backup has succeeded.
	BackupSucceeded BackupPhase = "BackupSucceeded"

	// Backup has failed.
	BackupFailed BackupPhase = "BackupFailed"
)

type DBDisk

type DBDisk struct {
	// Disk type.
	// Currently support only "ZonalPersistentDisk" type for demo purpose.
	// Default to "ZonalPersistentDisk" if not specified.
	// +optional
	Type *DiskType `json:"type,omitempty"`

	// Disk size in GB.
	// Default to 1 if not specified.
	// +optional
	SizeGB *int32 `json:"sizeGB,omitempty"`
}

type DBPhase

type DBPhase string
const (
	// Deployment of database instances is in progress.
	ServerDeploymentInProgress DBPhase = "ServerDeploymentInProgress"

	// Deployment of database instances has completed.
	// The database instances are ready to accept requests.
	ServerReady DBPhase = "ServerReady"

	// Database instances have been restored from a backup file.
	// The database instances are ready to accept requests.
	ServerRestored DBPhase = "ServerRestored"
)

type DBType

type DBType string
const (
	// PostgreSQL database.
	PostgreSQL DBType = "PostgreSQL"
)

type DiskType

type DiskType string
const (
	// Zonal standard persistent disk.
	ZonalPersistentDisk DiskType = "ZonalPersistentDisk"
)

type SqlBackup

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

	// Specification of the desired behavior of SqlBackup.
	// +optional
	Spec SqlBackupSpec `json:"spec,omitempty"`

	// Most recently observed status of SqlBackup.
	// This data may be out of date by some window of time.
	// Populated by the system.
	// Read-only.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
	// +optional
	Status SqlBackupStatus `json:"status,omitempty"`
}

SqlBackup is the Schema for the sqlbackups API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="status of the backup" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

type SqlBackupList

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

SqlBackupList contains a list of SqlBackup

type SqlBackupSpec

type SqlBackupSpec struct {
	// Name of SqlDB resource that has its database instances performed backup with.
	SqlDBName string `json:"sqlDBName"`

	// Backup file name.
	// Default to "db.dump" if not specified.
	// +optional
	FileName *string `json:"fileName,omitempty"`
}

SqlBackupSpec defines the desired state of SqlBackup

type SqlBackupStatus

type SqlBackupStatus struct {
	// Backup status.
	// +optional
	Phase BackupPhase `json:"phase,omitempty"`
}

SqlBackupStatus defines the observed state of SqlBackup

type SqlDB

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

	// Specification of the desired behavior of SqlDB.
	// +optional
	Spec SqlDBSpec `json:"spec,omitempty"`

	// Most recently observed status of SqlDB.
	// This data may be out of date by some window of time.
	// Populated by the system.
	// Read-only.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
	// +optional
	Status SqlDBStatus `json:"status,omitempty"`
}

SqlDB is the Schema for the sqldbs API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".spec.replicas",description="The number of replicas launched" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="status of the DB" +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".status.endpoint",description="Endpoint to access the DB" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

type SqlDBList

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

SqlDBList contains a list of SqlDB

type SqlDBSpec

type SqlDBSpec struct {
	// Sql database type.
	// Currently only support "PostgreSQL" type.
	Type DBType `json:"type"`

	// Version of the database (e.g., "1.5.1", "latest").
	// Default to "latest" if not specified.
	// +optional
	Version *string `json:"version,omitempty"`

	// Number of database instances.
	// Default to 1 if not specified.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// Details of underlying disk that stores SQL dumps.
	Disk DBDisk `json:"disk"`

	// Name of SqlBackup resource.
	// If specified, it means restoring the database instances loaded with backup data.
	// +optional
	BackupName *string `json:"backupName,omitempty"`
}

SqlDBSpec defines the desired state of SqlDB

type SqlDBStatus

type SqlDBStatus struct {
	// Status of deployment of database instances.
	// +optional
	Phase DBPhase `json:"phase,omitempty"`

	// Endpoint exposes the SQLDB instance.
	Endpoint string `json:"endpoint,omitempty"`
}

SqlDBStatus defines the observed state of SqlDB

Jump to

Keyboard shortcuts

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