Documentation
¶
Index ¶
- Constants
- Variables
- func AddPeer(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, peer string) error
- func BeginDowntime(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, ...) error
- func ConfigMap(cr *apiv1.PerconaServerMySQL, data map[string]string) *corev1.ConfigMap
- func ConfigMapData(cr *apiv1.PerconaServerMySQL) (map[string]string, error)
- func ConfigMapName(cr *apiv1.PerconaServerMySQL) string
- func Discover(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, ...) error
- func EndDowntime(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, ...) error
- func EnsureNodeIsPrimary(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, ...) error
- func FQDN(cr *apiv1.PerconaServerMySQL, idx int) string
- func ForgetInstance(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, ...) error
- func GetReadyPod(ctx context.Context, cl client.Client, cluster *apiv1.PerconaServerMySQL) (*corev1.Pod, error)
- func Labels(cr *apiv1.PerconaServerMySQL) map[string]string
- func MatchLabels(cr *apiv1.PerconaServerMySQL) map[string]string
- func Name(cr *apiv1.PerconaServerMySQL) string
- func NamespacedName(cr *apiv1.PerconaServerMySQL) types.NamespacedName
- func PodName(cr *apiv1.PerconaServerMySQL, idx int) string
- func PodService(cr *apiv1.PerconaServerMySQL, t corev1.ServiceType, podName string) *corev1.Service
- func RBAC(cr *apiv1.PerconaServerMySQL) (*rbacv1.Role, *rbacv1.RoleBinding, *corev1.ServiceAccount)
- func RaftNodes(cr *apiv1.PerconaServerMySQL) []string
- func RemovePeer(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, peer string) error
- func Service(cr *apiv1.PerconaServerMySQL) *corev1.Service
- func ServiceName(cr *apiv1.PerconaServerMySQL) string
- func SetWriteable(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, ...) error
- func StartReplication(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, ...) error
- func StatefulSet(cr *apiv1.PerconaServerMySQL, initImage, configHash, tlsHash string) *appsv1.StatefulSet
- func StopReplication(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, ...) error
- type Component
- func (c *Component) Labels() map[string]string
- func (c *Component) MatchLabels() map[string]string
- func (c *Component) Name() string
- func (c *Component) Object(ctx context.Context, cl client.Client) (client.Object, error)
- func (c *Component) PerconaServerMySQL() *apiv1.PerconaServerMySQL
- func (c *Component) PodSpec() *apiv1.PodSpec
- type Exposer
- type Instance
- type InstanceKey
Constants ¶
View Source
const ( AppName = "orchestrator" ConfigFileName = "orchestrator.conf.json" CredsMountPath = "/etc/orchestrator/orchestrator-users-secret" )
Variables ¶
Functions ¶
func BeginDowntime ¶ added in v0.12.0
func ConfigMapData ¶ added in v0.2.0
func ConfigMapData(cr *apiv1.PerconaServerMySQL) (map[string]string, error)
func ConfigMapName ¶ added in v0.2.0
func ConfigMapName(cr *apiv1.PerconaServerMySQL) string
func EndDowntime ¶ added in v0.12.0
func EnsureNodeIsPrimary ¶ added in v0.3.0
func ForgetInstance ¶ added in v0.8.0
func GetReadyPod ¶ added in v0.12.0
func Labels ¶
func Labels(cr *apiv1.PerconaServerMySQL) map[string]string
Labels returns labels of orchestrator
func MatchLabels ¶
func MatchLabels(cr *apiv1.PerconaServerMySQL) map[string]string
func NamespacedName ¶
func NamespacedName(cr *apiv1.PerconaServerMySQL) types.NamespacedName
func PodService ¶ added in v0.2.0
func PodService(cr *apiv1.PerconaServerMySQL, t corev1.ServiceType, podName string) *corev1.Service
func RBAC ¶ added in v0.8.0
func RBAC(cr *apiv1.PerconaServerMySQL) (*rbacv1.Role, *rbacv1.RoleBinding, *corev1.ServiceAccount)
func RaftNodes ¶ added in v0.2.0
func RaftNodes(cr *apiv1.PerconaServerMySQL) []string
func RemovePeer ¶ added in v0.2.0
func ServiceName ¶
func ServiceName(cr *apiv1.PerconaServerMySQL) string
func SetWriteable ¶ added in v0.8.0
func StartReplication ¶
func StatefulSet ¶
func StatefulSet(cr *apiv1.PerconaServerMySQL, initImage, configHash, tlsHash string) *appsv1.StatefulSet
Types ¶
type Component ¶ added in v0.12.0
type Component apiv1.PerconaServerMySQL
func (*Component) MatchLabels ¶ added in v0.12.0
func (*Component) PerconaServerMySQL ¶ added in v0.12.0
func (c *Component) PerconaServerMySQL() *apiv1.PerconaServerMySQL
type Exposer ¶ added in v0.2.0
type Exposer apiv1.PerconaServerMySQL
func (*Exposer) MatchLabels ¶ added in v0.12.0
func (*Exposer) SaveOldMeta ¶ added in v0.4.0
type Instance ¶
type Instance struct { Key InstanceKey `json:"Key"` Alias string `json:"InstanceAlias"` MasterKey InstanceKey `json:"MasterKey"` Replicas []InstanceKey `json:"Replicas"` ReadOnly bool `json:"ReadOnly"` Problems []string `json:"Problems"` IsDowntimed bool `json:"IsDowntimed"` DowntimeReason string `json:"DowntimeReason"` DowntimeOwner string `json:"DowntimeOwner"` DowntimeEndTimestamp string `json:"DowntimeEndTimestamp"` ElapsedDowntime time.Duration `json:"ElapsedDowntime"` }
type InstanceKey ¶
Click to show internal directories.
Click to hide internal directories.