Documentation
¶
Index ¶
- Variables
- func GetHostForSidecarBackup(ctx context.Context, cl client.Client, cr *api.PerconaXtraDBCluster) (string, error)
- func GetPrimaryPod(ctx context.Context, cl client.Client, cr *api.PerconaXtraDBCluster) (string, error)
- func GetProxyConnection(ctx context.Context, cr *api.PerconaXtraDBCluster, cl client.Client) (queries.Database, error)
- func NewServiceHAProxy(cr *api.PerconaXtraDBCluster) *corev1.Service
- func NewServiceHAProxyReplicas(cr *api.PerconaXtraDBCluster) *corev1.Service
- func NewServicePXC(cr *api.PerconaXtraDBCluster) *corev1.Service
- func NewServicePXCUnready(cr *api.PerconaXtraDBCluster) *corev1.Service
- func NewServiceProxySQL(cr *api.PerconaXtraDBCluster) *corev1.Service
- func NewServiceProxySQLUnready(cr *api.PerconaXtraDBCluster) *corev1.Service
- func PodAffinity(af *api.PodAffinity, app api.App) *corev1.Affinity
- func PodDisruptionBudget(cr *api.PerconaXtraDBCluster, spec *api.PodDisruptionBudgetSpec, ...) *policyv1.PodDisruptionBudget
- func PodFQDN(pod string, sts *appsv1.StatefulSet) string
- func PodTopologySpreadConstraints(tscs []corev1.TopologySpreadConstraint, ls map[string]string) []corev1.TopologySpreadConstraint
- func StatefulSet(ctx context.Context, cl client.Client, sfs api.StatefulApp, ...) (*appsv1.StatefulSet, error)
Constants ¶
This section is empty.
Variables ¶
var NoProxyDetectedError = errors.New("can't detect enabled proxy, please enable HAProxy or ProxySQL")
Functions ¶
func GetHostForSidecarBackup ¶ added in v1.19.0
func GetHostForSidecarBackup( ctx context.Context, cl client.Client, cr *api.PerconaXtraDBCluster, ) (string, error)
GetHostForSidecarBackup returns a pod that can be used for performing backups via xtradb sidecar
func GetPrimaryPod ¶ added in v1.19.0
func GetPrimaryPod( ctx context.Context, cl client.Client, cr *api.PerconaXtraDBCluster, ) (string, error)
GetPrimaryPod returns the primary pod
func GetProxyConnection ¶ added in v1.19.0
func GetProxyConnection(ctx context.Context, cr *api.PerconaXtraDBCluster, cl client.Client) (queries.Database, error)
GetProxyConnection returns a new connection through the proxy (ProxySQL or HAProxy)
func NewServiceHAProxy ¶ added in v1.5.0
func NewServiceHAProxy(cr *api.PerconaXtraDBCluster) *corev1.Service
NewServiceHAProxy creates the haproxy service using the primary expose configuration.
func NewServiceHAProxyReplicas ¶ added in v1.5.0
func NewServiceHAProxyReplicas(cr *api.PerconaXtraDBCluster) *corev1.Service
NewServiceHAProxyReplicas creates the haproxy service using the replicas expose configuration.
func NewServicePXC ¶ added in v0.3.0
func NewServicePXC(cr *api.PerconaXtraDBCluster) *corev1.Service
NewServicePXC creates a headless service for pxc pods.
func NewServicePXCUnready ¶ added in v0.3.0
func NewServicePXCUnready(cr *api.PerconaXtraDBCluster) *corev1.Service
NewServicePXCUnready creates a headless service with a "tolerate-unready-endpoints" annotation to allow unready pods to still be included in the DNS resolution.
func NewServiceProxySQL ¶ added in v0.2.0
func NewServiceProxySQL(cr *api.PerconaXtraDBCluster) *corev1.Service
NewServiceProxySQL creates the proxysql service.
func NewServiceProxySQLUnready ¶ added in v0.3.0
func NewServiceProxySQLUnready(cr *api.PerconaXtraDBCluster) *corev1.Service
NewServiceProxySQLUnready creates a headless service with a "tolerate-unready-endpoints" annotation to allow unready pods to still be included in the DNS resolution.
func PodAffinity ¶ added in v0.2.0
PodAffinity returns podAffinity options for the pod
func PodDisruptionBudget ¶ added in v0.3.0
func PodDisruptionBudget(cr *api.PerconaXtraDBCluster, spec *api.PodDisruptionBudgetSpec, labels map[string]string) *policyv1.PodDisruptionBudget
func PodTopologySpreadConstraints ¶ added in v1.14.0
func PodTopologySpreadConstraints(tscs []corev1.TopologySpreadConstraint, ls map[string]string) []corev1.TopologySpreadConstraint
func StatefulSet ¶ added in v0.2.0
func StatefulSet( ctx context.Context, cl client.Client, sfs api.StatefulApp, podSpec *api.PodSpec, cr *api.PerconaXtraDBCluster, secret *corev1.Secret, initImageName string, vg api.CustomVolumeGetter, ) (*appsv1.StatefulSet, error)
StatefulSet returns StatefulSet according to app to podSpec provided.
Types ¶
This section is empty.