Documentation ¶
Index ¶
- Constants
- Variables
- func APIHost(cr *apiv1alpha1.PerconaServerMySQL) string
- func AddPeer(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, peer string) error
- func ConfigMap(cr *apiv1alpha1.PerconaServerMySQL, data map[string]string) *corev1.ConfigMap
- func ConfigMapData(cr *apiv1alpha1.PerconaServerMySQL) (map[string]string, error)
- func ConfigMapName(cr *apiv1alpha1.PerconaServerMySQL) string
- func Discover(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 *apiv1alpha1.PerconaServerMySQL, idx int) string
- func ForgetInstance(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, ...) error
- func Labels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string
- func MatchLabels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string
- func Name(cr *apiv1alpha1.PerconaServerMySQL) string
- func NamespacedName(cr *apiv1alpha1.PerconaServerMySQL) types.NamespacedName
- func PodName(cr *apiv1alpha1.PerconaServerMySQL, idx int) string
- func PodService(cr *apiv1alpha1.PerconaServerMySQL, t corev1.ServiceType, podName string) *corev1.Service
- func RBAC(cr *apiv1alpha1.PerconaServerMySQL) (*rbacv1.Role, *rbacv1.RoleBinding, *corev1.ServiceAccount)
- func RaftNodes(cr *apiv1alpha1.PerconaServerMySQL) []string
- func RemovePeer(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, peer string) error
- func Service(cr *apiv1alpha1.PerconaServerMySQL) *corev1.Service
- func ServiceName(cr *apiv1alpha1.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 *apiv1alpha1.PerconaServerMySQL, initImage, tlsHash string) *appsv1.StatefulSet
- func StopReplication(ctx context.Context, cliCmd clientcmd.Client, pod *corev1.Pod, host string, ...) error
- type Exposer
- type Instance
- type InstanceKey
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 APIHost ¶
func APIHost(cr *apiv1alpha1.PerconaServerMySQL) string
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 EnsureNodeIsPrimary ¶ added in v0.3.0
func FQDN ¶ added in v0.2.0
func FQDN(cr *apiv1alpha1.PerconaServerMySQL, idx int) string
func ForgetInstance ¶ added in v0.8.0
func Labels ¶
func Labels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string
Labels returns labels of orchestrator
func MatchLabels ¶
func MatchLabels(cr *apiv1alpha1.PerconaServerMySQL) map[string]string
func NamespacedName ¶
func NamespacedName(cr *apiv1alpha1.PerconaServerMySQL) types.NamespacedName
func PodName ¶ added in v0.2.0
func PodName(cr *apiv1alpha1.PerconaServerMySQL, idx int) string
func PodService ¶ added in v0.2.0
func PodService(cr *apiv1alpha1.PerconaServerMySQL, t corev1.ServiceType, podName string) *corev1.Service
func RBAC ¶ added in v0.8.0
func RBAC(cr *apiv1alpha1.PerconaServerMySQL) (*rbacv1.Role, *rbacv1.RoleBinding, *corev1.ServiceAccount)
func RaftNodes ¶ added in v0.2.0
func RaftNodes(cr *apiv1alpha1.PerconaServerMySQL) []string
func RemovePeer ¶ added in v0.2.0
func Service ¶
func Service(cr *apiv1alpha1.PerconaServerMySQL) *corev1.Service
func ServiceName ¶
func ServiceName(cr *apiv1alpha1.PerconaServerMySQL) string
func SetWriteable ¶ added in v0.8.0
func StartReplication ¶
func StatefulSet ¶
func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, tlsHash string) *appsv1.StatefulSet
Types ¶
type Exposer ¶ added in v0.2.0
type Exposer apiv1alpha1.PerconaServerMySQL
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"` }
type InstanceKey ¶
Click to show internal directories.
Click to hide internal directories.