v1alpha1

package
v0.0.0-...-fc21188 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=example.com

Index

Constants

View Source
const (
	CustomResourceGroup = "example.com"
	Version             = "v1alpha1"

	MariadbResourceKind = "Mariadb"
	MysqlResourceKind   = "Mysql"
)

Variables

View Source
var (
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: samplecontroller.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

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

type ClusterSpec struct {
	Count     int32     `json:"count"`
	ConfigMap ConfigMap `json:"configMap"`
}

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 ConfigMap

type ConfigMap string

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

func (in *Mariadb) DeepCopy() *Mariadb

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

func (*Mariadb) DeepCopyInto

func (in *Mariadb) DeepCopyInto(out *Mariadb)

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

func (*Mariadb) DeepCopyObject

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

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

func (in *Mysql) DeepCopy() *Mysql

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

func (*Mysql) DeepCopyInto

func (in *Mysql) DeepCopyInto(out *Mysql)

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

func (*Mysql) DeepCopyObject

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

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

func (in *MysqlList) DeepCopy() *MysqlList

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

func (*MysqlList) DeepCopyInto

func (in *MysqlList) DeepCopyInto(out *MysqlList)

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

func (*MysqlList) DeepCopyObject

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

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

func (in *MysqlSpec) DeepCopy() *MysqlSpec

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

func (*MysqlSpec) DeepCopyInto

func (in *MysqlSpec) DeepCopyInto(out *MysqlSpec)

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

func (in *Placement) DeepCopy() *Placement

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

func (*Placement) DeepCopyInto

func (in *Placement) DeepCopyInto(out *Placement)

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

func (*Placement) DeepCopyObject

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

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

func (in *PodPolicy) DeepCopy() *PodPolicy

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

func (*PodPolicy) DeepCopyInto

func (in *PodPolicy) DeepCopyInto(out *PodPolicy)

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.

Jump to

Keyboard shortcuts

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