Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +groupName=example.com
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type ClusterMode
- type ClusterSpec
- type ConfigMap
- type GaleraTemplate
- type Mariadb
- type MariadbList
- type MariadbSpec
- type MasterStatus
- type Mysql
- type MysqlList
- type MysqlSpec
- type MysqlTemplate
- type Placement
- type PlacementSpec
- type PodPolicy
- type ResourceSpec
- type ServerCondition
- type ServerConditionType
- type ServerPhase
- type ServerSpec
- type ServerStatus
- type SlaveStatus
Constants ¶
const ( CustomResourceGroup = "example.com" Version = "v1alpha1" MariadbResourceKind = "Mariadb" MysqlResourceKind = "Mysql" )
Variables ¶
var ( SchemeBuilder runtime.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: samplecontroller.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type ClusterMode ¶
type ClusterMode string
const ( Galera ClusterMode = "Galera" ClusterCGE ClusterMode = "ClusterCGE" None ClusterMode = "None" )
type ClusterSpec ¶
func (*ClusterSpec) DeepCopy ¶
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GaleraTemplate ¶
type GaleraTemplate struct { ClusterName string `json:"clusterName,omitempty"` Count *int32 `json:"count,omitempty` }
func (*GaleraTemplate) DeepCopy ¶
func (in *GaleraTemplate) DeepCopy() *GaleraTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GaleraTemplate.
func (*GaleraTemplate) DeepCopyInto ¶
func (in *GaleraTemplate) DeepCopyInto(out *GaleraTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Mariadb ¶
type Mariadb struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec MariadbSpec `json:"spec"` }
func (*Mariadb) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mariadb.
func (*Mariadb) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Mariadb) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MariadbList ¶
type MariadbList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Mariadb `json:"items"` }
func (*MariadbList) DeepCopy ¶
func (in *MariadbList) DeepCopy() *MariadbList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MariadbList.
func (*MariadbList) DeepCopyInto ¶
func (in *MariadbList) DeepCopyInto(out *MariadbList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MariadbList) DeepCopyObject ¶
func (in *MariadbList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MariadbSpec ¶
type MariadbSpec struct { MysqlTemplate *MysqlTemplate `json:"mysqlTemplate"` GaleraTemplate *GaleraTemplate `json:"galeraTemplate"` Mode ClusterMode `json:"clusterMode,omitempty"` Image string `json:"image,omitempty"` // The path on the host where config and data can be persisted. DataDirHostPath string `json:"dataDirHostPath,omitempty"` // The placement-related configuration to pass to kubernetes (affinity, node selector, tolerations). Placement PlacementSpec `json:"placement,omitempty"` // HostNetwork to enable host network HostNetwork bool `json:"hostNetwork,omitempty"` // Resources set resource requests and limits Resources ResourceSpec `json:"resources,omitempty"` }
func (*MariadbSpec) DeepCopy ¶
func (in *MariadbSpec) DeepCopy() *MariadbSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MariadbSpec.
func (*MariadbSpec) DeepCopyInto ¶
func (in *MariadbSpec) DeepCopyInto(out *MariadbSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MasterStatus ¶
type MasterStatus struct { Ready []string `json:"ready,omitempty"` Unready []string `json:"unready,omitempty"` }
func (*MasterStatus) DeepCopy ¶
func (in *MasterStatus) DeepCopy() *MasterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterStatus.
func (*MasterStatus) DeepCopyInto ¶
func (in *MasterStatus) DeepCopyInto(out *MasterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Mysql ¶
type Mysql struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ServerSpec `json:"spec"` Status ServerStatus `json:"status"` }
func (*Mysql) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mysql.
func (*Mysql) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Mysql) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MysqlList ¶
type MysqlList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` Items []Mysql `json:"items"` }
func (*MysqlList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlList.
func (*MysqlList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MysqlList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MysqlSpec ¶
type MysqlSpec struct { StatefulSetName string `json:"statefulsetName"` ServiceName string `json:"serviceName"` ConfigMap ConfigMap `json:"configMap"` }
func (*MysqlSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlSpec.
func (*MysqlSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MysqlTemplate ¶
type MysqlTemplate struct { StatefulSetName string `json:"statefulSetName,omitempty"` ServiceName string `json:"serviceName,omitempty"` }
func (*MysqlTemplate) DeepCopy ¶
func (in *MysqlTemplate) DeepCopy() *MysqlTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MysqlTemplate.
func (*MysqlTemplate) DeepCopyInto ¶
func (in *MysqlTemplate) DeepCopyInto(out *MysqlTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Placement ¶
type Placement struct { metav1.TypeMeta `json:",inline"` NodeAffinity *v1.NodeAffinity `json:"nodeAffinity,omitempty"` PodAffinity *v1.PodAffinity `json:"podAffinity,omitempty"` PodAntiAffinity *v1.PodAntiAffinity `json:"podAntiAffinity,omitempty"` Tolerations []v1.Toleration `json:"tolerations,omitemtpy"` }
Placement encapsulates the various kubernetes options that control where pods are scheduled and executed.
func (*Placement) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.
func (*Placement) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Placement) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PlacementSpec ¶
type PlacementSpec struct { metav1.TypeMeta `json:",inline"` All Placement `json:"all,omitempty"` API Placement `json:"api,omitempty"` SERVER Placement `json:"server,omitempty"` DB Placement `json:"db,omitempty"` }
func (*PlacementSpec) DeepCopy ¶
func (in *PlacementSpec) DeepCopy() *PlacementSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementSpec.
func (*PlacementSpec) DeepCopyInto ¶
func (in *PlacementSpec) DeepCopyInto(out *PlacementSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PlacementSpec) DeepCopyObject ¶
func (in *PlacementSpec) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodPolicy ¶
type PodPolicy struct {
Resources v1.ResourceRequirements `json:"resources,omitempty"`
}
func (*PodPolicy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodPolicy.
func (*PodPolicy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSpec ¶
type ResourceSpec struct { API v1.ResourceRequirements `json:"api,omitempty"` SERVER v1.ResourceRequirements `json:"server,omitempty"` DB v1.ResourceRequirements `json:"mgr,omitempty"` }
func (*ResourceSpec) DeepCopy ¶
func (in *ResourceSpec) DeepCopy() *ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (*ResourceSpec) DeepCopyInto ¶
func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerCondition ¶
type ServerCondition struct { Type ServerConditionType `json:"type"` Reason string `json:"reason,omitempty"` }
func (*ServerCondition) DeepCopy ¶
func (in *ServerCondition) DeepCopy() *ServerCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerCondition.
func (*ServerCondition) DeepCopyInto ¶
func (in *ServerCondition) DeepCopyInto(out *ServerCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerConditionType ¶
type ServerConditionType string
const ( ServerConditionAddSeedMaster ServerConditionType = "AddingSeedMaster" ServerConditionRemoveSeedMaster ServerConditionType = "removingSeedMaster" ServerConditionJoinMaster ServerConditionType = "JoiningMaster" ServerConditionRemoveMaster ServerConditionType = "removingMaster" ServerConditionAddSlave ServerConditionType = "AddingSlave" ServerConditionRemoveSlave ServerConditionType = "removingSlave" ServerConditionReady ServerConditionType = "Ready" )
type ServerPhase ¶
type ServerPhase string
const ( ServerCreatingPhase ServerPhase = "Creating" ServerStoppingPhase ServerPhase = "Stopping" ServerRunningPhase ServerPhase = "Running" ServerFailedPhase ServerPhase = "Failed" )
type ServerSpec ¶
type ServerSpec struct { MysqlSpec MysqlSpec `json:"mysqlSpec"` ClusterSpec ClusterSpec `json:"clusterSpec"` BaseImage string `json:"baseImage,omitempty"` Version string `json:"version,omitempty"` Paused bool `json:"paused,omitempty"` Pod *PodPolicy `json:"pod,omitempty"` }
func (*ServerSpec) DeepCopy ¶
func (in *ServerSpec) DeepCopy() *ServerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerSpec.
func (*ServerSpec) DeepCopyInto ¶
func (in *ServerSpec) DeepCopyInto(out *ServerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerStatus ¶
type ServerStatus struct { Phase ServerPhase `json:"phase"` Conditions []ServerCondition `json:"conditions"` SlaveStatus SlaveStatus `json:"slaves"` MasterStatus MasterStatus `json:"masters"` }
func (*ServerStatus) DeepCopy ¶
func (in *ServerStatus) DeepCopy() *ServerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerStatus.
func (*ServerStatus) DeepCopyInto ¶
func (in *ServerStatus) DeepCopyInto(out *ServerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SlaveStatus ¶
type SlaveStatus struct { Ready []string `json:"ready,omitempty"` Unready []string `json:"unready,omitempty"` }
func (*SlaveStatus) DeepCopy ¶
func (in *SlaveStatus) DeepCopy() *SlaveStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlaveStatus.
func (*SlaveStatus) DeepCopyInto ¶
func (in *SlaveStatus) DeepCopyInto(out *SlaveStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.