pxc

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func PodAffinity(af *api.PodAffinity, app api.App) *corev1.Affinity

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 PodFQDN added in v1.19.0

func PodFQDN(pod string, sts *appsv1.StatefulSet) string

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.

Directories

Path Synopsis
app

Jump to

Keyboard shortcuts

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