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 (
	SecretKeyEncodeKey = "security.encode-key"
	SecretKeyRootCrt   = "root.crt"
	SecretKeyServerKey = "server.key"
	SecretKeyServerCrt = "server.crt"
)
View Source
const (
	ConfigKeyForCN = "cn.dynamic"
	ConfigKeyForDN = "dn.override"
)
View Source
const (
	PortAccess  = "mysql"
	PortMetrics = "metrics"
	PortDebug   = "debug"
)
View Source
const (
	ContainerInit     = "init"
	ContainerEngine   = "engine"
	ContainerExporter = "exporter"
	ContainerProber   = "prober"
)
View Source
const RootAccount = "polardbx_root"

Variables

This section is empty.

Functions

func ConstLabels

func ConstLabels(polardbx *polardbxv1.PolarDBXCluster) map[string]string

func ConstLabelsForCDC

func ConstLabelsForCDC(polardbx *polardbxv1.PolarDBXCluster) map[string]string

func ConstLabelsForCN

func ConstLabelsForCN(polardbx *polardbxv1.PolarDBXCluster, cnType string) map[string]string

func ConstLabelsForDN

func ConstLabelsForDN(polardbx *polardbxv1.PolarDBXCluster, index int) map[string]string

func ConstLabelsForGMS

func ConstLabelsForGMS(polardbx *polardbxv1.PolarDBXCluster) map[string]string

func ConstLabelsWithRole

func ConstLabelsWithRole(polardbx *polardbxv1.PolarDBXCluster, role string) map[string]string

func CopyMetadataForUpdate

func CopyMetadataForUpdate(dest, src *metav1.ObjectMeta, generation int64)

func GetGenerationLabelValue

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

func GetPolarDBXServiceName

func GetPolarDBXServiceName(polardbx *polardbxv1.PolarDBXCluster) string

func LabelGeneration

func LabelGeneration(polardbx *polardbxv1.PolarDBXCluster) map[string]string

func MustParseIndexFromDN

func MustParseIndexFromDN(xstore *polardbxv1.XStore) int

func NewConfigMapName

func NewConfigMapName(polardbx *polardbxv1.PolarDBXCluster, cmType ConfigMapType) string

func NewDNName

func NewDNName(polardbx *polardbxv1.PolarDBXCluster, i int) string

func NewDeploymentName

func NewDeploymentName(polardbx *polardbxv1.PolarDBXCluster, role string, group string) string

func NewGMSName

func NewGMSName(polardbx *polardbxv1.PolarDBXCluster) string

func NewSecretName

func NewSecretName(polardbx *polardbxv1.PolarDBXCluster, secretType SecretType) string

func NewServiceName

func NewServiceName(polardbx *polardbxv1.PolarDBXCluster, serviceType ServiceType) string

func ParseGroupFromDeployment

func ParseGroupFromDeployment(deploy *appsv1.Deployment) string

func ParseIndexFromDN

func ParseIndexFromDN(xstore *polardbxv1.XStore) (int, error)

Types

type ConfigMapType

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

type SecretType

type SecretType string
const (
	SecretTypeAccount  SecretType = "account"
	SecretTypeSecurity SecretType = "security"
)

type ServiceType

type ServiceType string
const (
	ServiceTypeReadWrite  ServiceType = "readwrite"
	ServiceTypeReadOnly   ServiceType = "readonly"
	ServiceTypeMetrics    ServiceType = "metrics"
	ServiceTypeCDCMetrics ServiceType = "cdc-metrics"
)

Jump to

Keyboard shortcuts

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