Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the operator v1 API group +kubebuilder:object:generate=true +groupName=fake.kubecarrier.io
Index ¶
- Constants
- Variables
- type Backup
- type BackupCondition
- type BackupConditionType
- type BackupList
- type BackupPhaseType
- type BackupSpec
- type BackupStatus
- type CRDReference
- type ConditionStatus
- type Config
- type DB
- type DBCondition
- type DBConditionType
- type DBList
- type DBPhaseType
- type DBSpec
- type DBStatus
- type ObjectReference
- type OperationFlagType
- type Snapshot
- func (in *Snapshot) DeepCopy() *Snapshot
- func (in *Snapshot) DeepCopyInto(out *Snapshot)
- func (in *Snapshot) DeepCopyObject() runtime.Object
- func (s *Snapshot) IsReady() bool
- func (s *Snapshot) SetReadyCondition() bool
- func (s *Snapshot) SetTerminatingCondition() bool
- func (s *Snapshot) SetUnReadyCondition() bool
- type SnapshotCondition
- type SnapshotConditionType
- type SnapshotList
- type SnapshotPhaseType
- type SnapshotSpec
- type SnapshotStatus
Constants ¶
const (
BackupTerminatingReason = "Deleting"
)
const (
DBTerminatingReason = "Deleting"
)
const (
SnapshotTerminatingReason = "Deleting"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "fake.kubecarrier.io", Version: "v1"} // 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 Backup ¶
type Backup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec BackupSpec `json:"spec,omitempty"` Status BackupStatus `json:"status,omitempty"` }
Backup is backup of the DB element for 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:resource:categories=all
func (*Backup) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backup.
func (*Backup) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Backup) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Backup) SetReadyCondition ¶
func (*Backup) SetTerminatingCondition ¶
func (*Backup) SetUnReadyCondition ¶
type BackupCondition ¶
type BackupCondition struct { // Type is the type of the Backup condition, currently ('Ready'). Type BackupConditionType `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"` }
BackupCondition contains details for the current condition of this Backup.
func (*BackupCondition) DeepCopy ¶
func (in *BackupCondition) DeepCopy() *BackupCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupCondition.
func (*BackupCondition) DeepCopyInto ¶
func (in *BackupCondition) DeepCopyInto(out *BackupCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (BackupCondition) True ¶
func (c BackupCondition) True() bool
True returns whether .Status == "True"
type BackupConditionType ¶
type BackupConditionType string
BackupConditionType represents a BackupCondition value.
const ( // BackupReady represents a Backup condition is in ready state. BackupReady BackupConditionType = "Ready" )
type BackupList ¶
type BackupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Backup `json:"items"` }
+kubebuilder:object:root=true BackupList contains a list of Backup
func (*BackupList) DeepCopy ¶
func (in *BackupList) DeepCopy() *BackupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupList.
func (*BackupList) DeepCopyInto ¶
func (in *BackupList) DeepCopyInto(out *BackupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupList) DeepCopyObject ¶
func (in *BackupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackupPhaseType ¶
type BackupPhaseType string
BackupPhaseType represents all conditions as a single string for printing by using kubectl commands.
const ( BackupPhaseReady BackupPhaseType = "Ready" BackupPhaseNotReady BackupPhaseType = "NotReady" BackupPhaseUnknown BackupPhaseType = "Unknown" BackupPhaseTerminating BackupPhaseType = "Terminating" )
Values of BackupPhaseType.
type BackupSpec ¶
type BackupSpec struct {
DBName string `json:"dbName"`
}
BackupSpec defines the desired state of Backup
func (*BackupSpec) DeepCopy ¶
func (in *BackupSpec) DeepCopy() *BackupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSpec.
func (*BackupSpec) DeepCopyInto ¶
func (in *BackupSpec) DeepCopyInto(out *BackupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupStatus ¶
type BackupStatus struct { // ObservedGeneration is the most recent generation observed for this Backup by the controller. ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Conditions represents the latest available observations of a Backup's current state. Conditions []BackupCondition `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 BackupPhaseType `json:"phase,omitempty"` }
BackupStatus defines the observed state of Backup
func (*BackupStatus) DeepCopy ¶
func (in *BackupStatus) DeepCopy() *BackupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupStatus.
func (*BackupStatus) DeepCopyInto ¶
func (in *BackupStatus) DeepCopyInto(out *BackupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupStatus) GetCondition ¶
func (s *BackupStatus) GetCondition(t BackupConditionType) (condition BackupCondition, exists bool)
GetCondition returns the Condition of the given condition type, if it exists.
func (*BackupStatus) SetCondition ¶
func (s *BackupStatus) SetCondition(condition BackupCondition)
SetCondition replaces or adds the given condition.
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 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:storageversion +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) 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 string `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
type Snapshot ¶
type Snapshot struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SnapshotSpec `json:"spec,omitempty"` Status SnapshotStatus `json:"status,omitempty"` }
Snapshot is snapshot of the DB element for 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:resource:categories=all
func (*Snapshot) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshot.
func (*Snapshot) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Snapshot) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Snapshot) SetReadyCondition ¶
func (*Snapshot) SetTerminatingCondition ¶
func (*Snapshot) SetUnReadyCondition ¶
type SnapshotCondition ¶
type SnapshotCondition struct { // Type is the type of the Snapshot condition, currently ('Ready'). Type SnapshotConditionType `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"` }
SnapshotCondition contains details for the current condition of this Snapshot.
func (*SnapshotCondition) DeepCopy ¶
func (in *SnapshotCondition) DeepCopy() *SnapshotCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotCondition.
func (*SnapshotCondition) DeepCopyInto ¶
func (in *SnapshotCondition) DeepCopyInto(out *SnapshotCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SnapshotCondition) True ¶
func (c SnapshotCondition) True() bool
True returns whether .Status == "True"
type SnapshotConditionType ¶
type SnapshotConditionType string
SnapshotConditionType represents a SnapshotCondition value.
const ( // SnapshotReady represents a Snapshot condition is in ready state. SnapshotReady SnapshotConditionType = "Ready" )
type SnapshotList ¶
type SnapshotList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Snapshot `json:"items"` }
+kubebuilder:object:root=true SnapshotList contains a list of Snapshot
func (*SnapshotList) DeepCopy ¶
func (in *SnapshotList) DeepCopy() *SnapshotList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotList.
func (*SnapshotList) DeepCopyInto ¶
func (in *SnapshotList) DeepCopyInto(out *SnapshotList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SnapshotList) DeepCopyObject ¶
func (in *SnapshotList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SnapshotPhaseType ¶
type SnapshotPhaseType string
SnapshotPhaseType represents all conditions as a single string for printing by using kubectl commands.
const ( SnapshotPhaseReady SnapshotPhaseType = "Ready" SnapshotPhaseNotReady SnapshotPhaseType = "NotReady" SnapshotPhaseUnknown SnapshotPhaseType = "Unknown" SnapshotPhaseTerminating SnapshotPhaseType = "Terminating" )
Values of SnapshotPhaseType.
type SnapshotSpec ¶
type SnapshotSpec struct { // DBName is the name of the source DB DBName string `json:"dbName,omitempty"` }
SnapshotSpec defines the desired state of Snapshot
func (*SnapshotSpec) DeepCopy ¶
func (in *SnapshotSpec) DeepCopy() *SnapshotSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotSpec.
func (*SnapshotSpec) DeepCopyInto ¶
func (in *SnapshotSpec) DeepCopyInto(out *SnapshotSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SnapshotStatus ¶
type SnapshotStatus struct { // ObservedGeneration is the most recent generation observed for this Snapshot by the controller. ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Conditions represents the latest available observations of a Snapshot's current state. Conditions []SnapshotCondition `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 SnapshotPhaseType `json:"phase,omitempty"` // Date when snapshot was taken Date metav1.Time `json:"date,omitempty"` }
SnapshotStatus defines the observed state of Snapshot
func (*SnapshotStatus) DeepCopy ¶
func (in *SnapshotStatus) DeepCopy() *SnapshotStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotStatus.
func (*SnapshotStatus) DeepCopyInto ¶
func (in *SnapshotStatus) DeepCopyInto(out *SnapshotStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SnapshotStatus) GetCondition ¶
func (s *SnapshotStatus) GetCondition(t SnapshotConditionType) (condition SnapshotCondition, exists bool)
GetCondition returns the Condition of the given condition type, if it exists.
func (*SnapshotStatus) SetCondition ¶
func (s *SnapshotStatus) SetCondition(condition SnapshotCondition)
SetCondition replaces or adds the given condition.