Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the operator v1alpha1 API group +kubebuilder:object:generate=true +groupName=fake.kubecarrier.io
Index ¶
- Constants
- Variables
- type CRDReference
- type ConditionStatus
- type Config
- type Connection
- type DB
- func (dst *DB) ConvertFrom(srcRaw conversion.Hub) error
- func (src *DB) ConvertTo(dstRaw conversion.Hub) error
- func (in *DB) DeepCopy() *DB
- func (in *DB) DeepCopyInto(out *DB)
- func (in *DB) DeepCopyObject() runtime.Object
- func (s *DB) IsReady() bool
- func (s *DB) SetReadyCondition() bool
- func (s *DB) SetTerminatingCondition() bool
- func (s *DB) SetUnReadyCondition() bool
- type DBCondition
- type DBConditionType
- type DBList
- type DBPhaseType
- type DBSpec
- type DBStatus
- type ObjectReference
- type OperationFlagType
Constants ¶
const (
DBTerminatingReason = "Deleting"
)
Variables ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
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) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DB.
func (*DB) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DB) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DB) SetReadyCondition ¶
func (*DB) SetTerminatingCondition ¶
func (*DB) SetUnReadyCondition ¶
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.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBList.
func (*DBList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DBList) DeepCopyObject ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBSpec.
func (*DBSpec) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBStatus.
func (*DBStatus) DeepCopyInto ¶
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