constants

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AdminUser       = "moco-admin"
	AgentUser       = "moco-agent"
	ReplicationUser = "moco-repl"
	CloneDonorUser  = "moco-clone-donor"
	ReadOnlyUser    = "moco-readonly"
	WritableUser    = "moco-writable"
)

MySQL user names for MOCO

View Source
const (
	ReadOnlyMyCnf = ReadOnlyUser + "-my.cnf"
	WritableMyCnf = WritableUser + "-my.cnf"
	AdminMyCnf    = AdminUser + "-my.cnf"
)

my.cnf filenames for different kind of users.

View Source
const (
	// MySQLDataPath is the path of MySQL data dir.
	MySQLDataPath = "/var/lib/mysql"

	// MySQLConfPath is the path of MySQL conf dir.
	MySQLConfPath = "/etc/mysql"

	// MySQLInitConfPath is the path of MySQL conf dir generated by moco-init.
	MySQLInitConfPath = "/etc/mysql-conf.d"

	// MySQLConfName is the filename of my.cnf.
	MySQLConfName = "my.cnf"

	// RunPath is the path of variable files which concerns MySQLd.
	RunPath = "/run"

	// LogDirPath is the path of /var/log/mysql.
	LogDirPath = "/var/log/mysql"

	// MySQLSlowLogName is the filename of slow query log for MySQL.
	MySQLSlowLogName = "mysql.slow"

	// TmpPath is the path for /tmp.
	TmpPath = "/tmp"

	// MyCnfSecretPath is the path for my.cnf formated credentials for CLI
	MyCnfSecretPath = "/mysql-credentials"
)
View Source
const (
	// FluentBitConfigName is a filename for fluent-bit conf.
	FluentBitConfigName = "fluent-bit.conf"

	// FluentBitConfigPath is the path for fluent-bit config directory.
	FluentBitConfigPath = "/fluent-bit/etc"
)
View Source
const (
	PodNameEnvKey      = "POD_NAME"
	PodNamespaceEnvKey = "POD_NAMESPACE"
	ClusterNameEnvKey  = "CLUSTER_NAME"
)

Environment variables

View Source
const (
	CloneSourceHostKey         = "HOST"
	CloneSourcePortKey         = "PORT"
	CloneSourceUserKey         = "USER"
	CloneSourcePasswordKey     = "PASSWORD"
	CloneSourceInitUserKey     = "INIT_USER"
	CloneSourceInitPasswordKey = "INIT_PASSWORD"
)

Secret keys to clone data from an external mysqld

View Source
const (
	AgentContainerName             = "agent"
	InitContainerName              = "moco-init"
	MysqldContainerName            = "mysqld"
	SlowQueryLogAgentContainerName = "slow-log"
)

container names

View Source
const (
	MySQLDataVolumeName               = "mysql-data"
	MySQLConfVolumeName               = "mysql-conf"
	MySQLInitConfVolumeName           = "mysql-conf-d"
	MySQLConfSecretVolumeName         = "my-cnf-secret"
	RunVolumeName                     = "run"
	VarLogVolumeName                  = "var-log"
	TmpVolumeName                     = "tmp"
	SlowQueryLogAgentConfigVolumeName = "slow-fluent-bit-config"
	MOCOBinVolumeName                 = "moco-bin"
)

volume names

View Source
const (
	LabelAppInstance  = "app.kubernetes.io/instance"
	LabelAppNamespace = "app.kubernetes.io/instance-namespace"
	LabelAppName      = "app.kubernetes.io/name"
	AppName           = "mysql"
	LabelAppComponent = "app.kubernetes.io/component"
	ComponentMySQLD   = "mysqld"
	ComponentBackup   = "backup"

	LabelMocoRole = "moco.cybozu.com/role"
	RolePrimary   = "primary"
	RoleReplica   = "replica"
)

label keys and values

View Source
const (
	AnnDemote        = "moco.cybozu.com/demote"
	AnnSecretVersion = "moco.cybozu.com/secret-version"
)

annotation keys and values

View Source
const (
	// MySQLPort is the port number for MySQL
	MySQLPort     = 3306
	MySQLPortName = "mysql"

	// MySQLXPort is the port number for MySQL XProtocol
	MySQLXPort     = 33060
	MySQLXPortName = "mysqlx"

	// MySQLAdminPort is the port number for MySQL Admin
	MySQLAdminPort     = 33062
	MySQLAdminPortName = "mysql-admin"

	// MySQLHealthPort is the port number to check readiness and liveness of mysqld.
	MySQLHealthPort     = 9081
	MySQLHealthPortName = "health"

	// AgentPort is the port number for agent container
	AgentPort     = 9080
	AgentPortName = "agent"

	// AgentMetricsPort is the port number for agent container
	AgentMetricsPort     = 8080
	AgentMetricsPortName = "agent-metrics"
)
View Source
const (
	InitCommand = "moco-init"
)

command names

View Source
const MySQLClusterFinalizer = "moco.cybozu.com/mysqlcluster"

MySQLClusterFinalizer is the finalizer specifier for MySQLCluster.

View Source
const PreStopSeconds = "20"

PreStop sleep duration

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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