orchestrator

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentName = "orc"

	ConfigFileName = "orchestrator.conf.json"

	CredsMountPath = "/etc/orchestrator/orchestrator-users-secret"
)

Variables

View Source
var ErrEmptyResponse = errors.New("empty response")

Functions

func AddPeer added in v0.2.0

func AddPeer(ctx context.Context, apiHost string, peer string) error

func AddPeerExec added in v0.6.0

func AddPeerExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, peer string) error

func ConfigMap added in v0.2.0

func ConfigMap(cr *apiv1alpha1.PerconaServerMySQL, data map[string]string) *corev1.ConfigMap

func ConfigMapData added in v0.2.0

func ConfigMapData(cr *apiv1alpha1.PerconaServerMySQL) (map[string]string, error)

func ConfigMapName added in v0.2.0

func ConfigMapName(cr *apiv1alpha1.PerconaServerMySQL) string

func Discover added in v0.4.0

func Discover(ctx context.Context, apiHost, host string, port int) error

func DiscoverExec added in v0.6.0

func DiscoverExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int) error

func EnsureNodeIsPrimary added in v0.3.0

func EnsureNodeIsPrimary(ctx context.Context, apiHost, clusterHint, host string, port int) error

func EnsureNodeIsPrimaryExec added in v0.6.0

func EnsureNodeIsPrimaryExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, clusterHint, host string, port int) error

func FQDN added in v0.2.0

func Labels

Labels returns labels of orchestrator

func MatchLabels

func MatchLabels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string

func Name

Name returns component name

func PodName added in v0.2.0

func PodName(cr *apiv1alpha1.PerconaServerMySQL, idx int) string

func PodService added in v0.2.0

func RaftNodes added in v0.2.0

func RaftNodes(cr *apiv1alpha1.PerconaServerMySQL) []string

func RemovePeer added in v0.2.0

func RemovePeer(ctx context.Context, apiHost string, peer string) error

func RemovePeerExec added in v0.6.0

func RemovePeerExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, peer string) error

func ServiceName

func ServiceName(cr *apiv1alpha1.PerconaServerMySQL) string

func SetWriteableExec added in v0.6.0

func SetWriteableExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int) error

func StartReplication

func StartReplication(ctx context.Context, apiHost, host string, port int32) error

func StartReplicationExec added in v0.6.0

func StartReplicationExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int32) error

func StatefulSet

func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage string) *appsv1.StatefulSet

func StopReplication

func StopReplication(ctx context.Context, apiHost, host string, port int32) error

func StopReplicationExec added in v0.6.0

func StopReplicationExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, port int32) error

Types

type Exposer added in v0.2.0

func (*Exposer) Exposed added in v0.2.0

func (e *Exposer) Exposed() bool

func (*Exposer) Labels added in v0.2.0

func (e *Exposer) Labels() map[string]string

func (*Exposer) Name added in v0.2.0

func (e *Exposer) Name(index string) string

func (*Exposer) SaveOldMeta added in v0.4.0

func (e *Exposer) SaveOldMeta() bool

func (*Exposer) Service added in v0.2.0

func (e *Exposer) Service(name string) *corev1.Service

func (*Exposer) Size added in v0.2.0

func (e *Exposer) Size() int32

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"`
}

func ClusterPrimary

func ClusterPrimary(ctx context.Context, apiHost, clusterHint string) (*Instance, error)

func ClusterPrimaryExec added in v0.6.0

func ClusterPrimaryExec(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, clusterHint string) (*Instance, error)

type InstanceKey

type InstanceKey struct {
	Hostname string `json:"Hostname"`
	Port     int32  `json:"Port"`
}

Jump to

Keyboard shortcuts

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