convention

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PortAccess  = "mysql"
	PortMetrics = "metrics"
	PortProbe   = "probe"
)
View Source
const (
	ConfigMyCnfTemplate = "my.cnf.template"
	ConfigMyCnfOverride = "my.cnf.override"
)
View Source
const (
	ContainerEngine   = "engine"
	ContainerExporter = "exporter"
	ContainerProber   = "prober"
)
View Source
const SuperAccount = "admin"

Variables

This section is empty.

Functions

func ConstLabels

func ConstLabels(xstore *polardbxv1.XStore) map[string]string

func ConstPodLabels

func ConstPodLabels(xstore *polardbxv1.XStore, nodeSet *polardbxv1xstore.NodeSet) map[string]string

func DefaultRoleOf

func DefaultRoleOf(nodeRole polardbxv1xstore.NodeRole) string

func GetGenerationLabelValue

func GetGenerationLabelValue(object client.Object) (int64, error)

func GetXStoreServiceName

func GetXStoreServiceName(xstore *polardbxv1.XStore) string

func IsGenerationOutdated

func IsGenerationOutdated(xstore *polardbxv1.XStore, object client.Object) (bool, error)

func LabelGeneration

func LabelGeneration(xstore *polardbxv1.XStore) map[string]string

func NewConfigMapName

func NewConfigMapName(xstore *polardbxv1.XStore, cmType ConfigMapType) string

func NewHeadlessServiceName

func NewHeadlessServiceName(podName string) string

func NewJobName

func NewJobName(xstore *polardbxv1.XStore, name string) string

func NewPodName

func NewPodName(xstore *polardbxv1.XStore, nodeSet *polardbxv1xstore.NodeSet, index int) string

func NewSecretName

func NewSecretName(xstore *polardbxv1.XStore) string

func NewServiceName

func NewServiceName(xstore *polardbxv1.XStore, serviceType ServiceType) string

func PodIndexInNodeSet

func PodIndexInNodeSet(podName string) (int, error)

Types

type ConfigMapType

type ConfigMapType string
const (
	ConfigMapTypeConfig ConfigMapType = "config"
	ConfigMapTypeShared ConfigMapType = "shared"
	ConfigMapTypeTask   ConfigMapType = "task"
)

type ServiceType

type ServiceType string
const (
	ServiceTypeReadWrite ServiceType = "readwrite"
	ServiceTypeReadOnly  ServiceType = "readonly"
	ServiceTypeMetrics   ServiceType = "metrics"
	ServiceTypeHeadless  ServiceType = "headless"
)

Jump to

Keyboard shortcuts

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