v1alpha1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the operator v1alpha1 API group +kubebuilder:object:generate=true +groupName=fake.kubecarrier.io

Index

Constants

View Source
const (
	DBTerminatingReason = "Deleting"
)

Variables

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

type CRDReference struct {
	Kind    string `json:"kind"`
	Version string `json:"version"`
	Group   string `json:"group"`
	Plural  string `json:"plural"`
}

CRDReference references a CustomResourceDefitition.

func (*CRDReference) DeepCopy

func (in *CRDReference) DeepCopy() *CRDReference

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

func (*CRDReference) DeepCopyInto

func (in *CRDReference) DeepCopyInto(out *CRDReference)

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

type ConditionStatus

type ConditionStatus string

ConditionStatus represents a condition's status.

const (
	// ConditionTrue represents the fact that a given condition is true
	ConditionTrue ConditionStatus = "True"

	// ConditionFalse represents the fact that a given condition is false
	ConditionFalse ConditionStatus = "False"

	// ConditionUnknown represents the fact that a given condition is unknown
	ConditionUnknown ConditionStatus = "Unknown"
)

These are valid condition statuses. "ConditionTrue" means a resource is in the condition; "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means Kubernetes can't decide if a resource is in the condition or not.

type Config

type Config struct {
	// ReadyAfterSeconds represents duration after which operator will mark DB as Ready
	ReadyAfterSeconds int `json:"readyAfterSeconds,omitempty"`
	// DeletionAfterSeconds represents duration after which operator will remove finalizer
	DeletionAfterSeconds int `json:"deletionAfterSeconds,omitempty"`
	// CreateEnable control whether create operation enabled or not
	// +kubebuilder:default:=Enabled
	Create OperationFlagType `json:"create,omitempty"`
	// UpdateEnable control whether update operation enabled or not
	// +kubebuilder:default:=Enabled
	Update OperationFlagType `json:"update,omitempty"`
	// DeleteEnable control whether delete operation enabled or not
	// +kubebuilder:default:=Enabled
	Delete OperationFlagType `json:"delete,omitempty"`
}

Config defines the e2e tests params

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

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

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

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

type Connection

type Connection struct {
	// Endpoint for this database
	Endpoint string `json:"endpoint"`

	// Database name
	Name string `json:"name"`

	// Username for this database
	Username string `json:"username"`
}

Connection defines necessary endpoints and credential for DB usage

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.

func (Connection) String

func (c Connection) String() string

type DB

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

	Spec   DBSpec   `json:"spec,omitempty"`
	Status DBStatus `json:"status,omitempty"`
}

DB is core element in e2e operator +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Connection",type="string",JSONPath=".status.connection" +kubebuilder:resource:categories=all

func (*DB) ConvertFrom

func (dst *DB) ConvertFrom(srcRaw conversion.Hub) error

func (*DB) ConvertTo

func (src *DB) ConvertTo(dstRaw conversion.Hub) error

func (*DB) DeepCopy

func (in *DB) DeepCopy() *DB

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

func (*DB) DeepCopyInto

func (in *DB) DeepCopyInto(out *DB)

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

func (*DB) DeepCopyObject

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

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

func (*DB) IsReady

func (s *DB) IsReady() bool

IsReady returns if the DB is ready.

func (*DB) SetReadyCondition

func (s *DB) SetReadyCondition() bool

func (*DB) SetTerminatingCondition

func (s *DB) SetTerminatingCondition() bool

func (*DB) SetUnReadyCondition

func (s *DB) SetUnReadyCondition() bool

type DBCondition

type DBCondition struct {
	// Type is the type of the DB condition, currently ('Ready').
	Type DBConditionType `json:"type"`
	// Status is the status of the condition, one of ('True', 'False', 'Unknown').
	Status ConditionStatus `json:"status"`
	// LastTransitionTime is the last time the condition transits from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`
	// Reason is the (brief) reason for the condition's last transition.
	Reason string `json:"reason"`
	// Message is the human readable message indicating details about last transition.
	Message string `json:"message"`
}

DBCondition contains details for the current condition of this DB.

func (*DBCondition) DeepCopy

func (in *DBCondition) DeepCopy() *DBCondition

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

func (*DBCondition) DeepCopyInto

func (in *DBCondition) DeepCopyInto(out *DBCondition)

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

func (DBCondition) True

func (c DBCondition) True() bool

True returns whether .Status == "True"

type DBConditionType

type DBConditionType string

DBConditionType represents a DBCondition value.

const (
	// DBReady represents a DB condition is in ready state.
	DBReady DBConditionType = "Ready"
)

type DBList

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

+kubebuilder:object:root=true DBList contains a list of DB

func (*DBList) DeepCopy

func (in *DBList) DeepCopy() *DBList

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

func (*DBList) DeepCopyInto

func (in *DBList) DeepCopyInto(out *DBList)

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

func (*DBList) DeepCopyObject

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

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

type DBPhaseType

type DBPhaseType string

DBPhaseType represents all conditions as a single string for printing by using kubectl commands.

const (
	DBPhaseReady       DBPhaseType = "Ready"
	DBPhaseNotReady    DBPhaseType = "NotReady"
	DBPhaseUnknown     DBPhaseType = "Unknown"
	DBPhaseTerminating DBPhaseType = "Terminating"
)

Values of DBPhaseType.

type DBSpec

type DBSpec struct {
	// RootPassword is root account password for this data. Leave blank for auto-generation
	RootPassword string `json:"rootPassword,omitempty"`

	// DatabaseName of the created database at start up
	// +kubebuilder:validation:MinLength=1
	DatabaseName string `json:"databaseName"`

	// DatabaseUser for created database
	DatabaseUser string `json:"databaseUser"`

	// DatabasePassword for the created database. Leave blank for auto-generation
	DatabasePassword string `json:"databasePassword,omitempty"`

	// Config is E2E tests params
	Config Config `json:"config,omitempty"`
}

DBSpec defines the desired state of DB

func (*DBSpec) DeepCopy

func (in *DBSpec) DeepCopy() *DBSpec

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

func (*DBSpec) DeepCopyInto

func (in *DBSpec) DeepCopyInto(out *DBSpec)

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

type DBStatus

type DBStatus struct {
	// ObservedGeneration is the most recent generation observed for this FakeDB by the controller.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions represents the latest available observations of a FakeDB's current state.
	Conditions []DBCondition `json:"conditions,omitempty"`
	// DEPRECATED.
	// Phase represents the current lifecycle state of this object.
	// Consider this field DEPRECATED, it will be removed as soon as there
	// is a mechanism to map conditions to strings when printing the property.
	// This is only for display purpose, for everything else use conditions.
	Phase DBPhaseType `json:"phase,omitempty"`
	// Connection is the connection string for FakeDB
	Connection *Connection `json:"connection,omitempty"`
}

DBStatus defines the observed state of DB

func (*DBStatus) DeepCopy

func (in *DBStatus) DeepCopy() *DBStatus

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

func (*DBStatus) DeepCopyInto

func (in *DBStatus) DeepCopyInto(out *DBStatus)

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

func (*DBStatus) GetCondition

func (s *DBStatus) GetCondition(t DBConditionType) (condition DBCondition, exists bool)

GetCondition returns the Condition of the given condition type, if it exists.

func (*DBStatus) SetCondition

func (s *DBStatus) SetCondition(condition DBCondition)

SetCondition replaces or adds the given condition.

type ObjectReference

type ObjectReference struct {
	Name string `json:"name"`
}

ObjectReference describes the link to another object in the same namespace

func (*ObjectReference) DeepCopy

func (in *ObjectReference) DeepCopy() *ObjectReference

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

func (*ObjectReference) DeepCopyInto

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

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

type OperationFlagType

type OperationFlagType string

OperationFlagType represents a enable/disable flag

const (
	OperationFlagEnabled  OperationFlagType = "Enabled"
	OperationFlagDisabled OperationFlagType = "Disabled"
)

Values of OperationFlagType.

func (OperationFlagType) Enabled

func (o OperationFlagType) Enabled() bool

Jump to

Keyboard shortcuts

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