constants

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 1 Imported by: 9

Documentation

Index

Constants

View Source
const (
	ZalandoDNSNameAnnotation           = "external-dns.alpha.kubernetes.io/hostname"
	ElbTimeoutAnnotationName           = "service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout"
	ElbTimeoutAnnotationValue          = "3600"
	KubeIAmAnnotation                  = "iam.amazonaws.com/role"
	VolumeStorateProvisionerAnnotation = "pv.kubernetes.io/provisioned-by"
	PostgresqlControllerAnnotationKey  = "acid.zalan.do/controller"
)

Names and values in Kubernetes annotation for services, statefulsets and volumes

View Source
const (
	// EBS related constants
	EBSVolumeIDStart = "/vol-"
	EBSProvisioner   = "kubernetes.io/aws-ebs"
	//https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_VolumeModification.html
	EBSVolumeStateModifying     = "modifying"
	EBSVolumeStateOptimizing    = "optimizing"
	EBSVolumeStateFailed        = "failed"
	EBSVolumeStateCompleted     = "completed"
	EBSVolumeResizeWaitInterval = 2 * time.Second
	EBSVolumeResizeWaitTimeout  = 30 * time.Second
)

AWS specific constants used by other modules

View Source
const (
	PostgresContainerName = "postgres"
	PostgresContainerIdx  = 0
	K8sAPIPath            = "/apis"

	QueueResyncPeriodPod  = 5 * time.Minute
	QueueResyncPeriodTPR  = 5 * time.Minute
	QueueResyncPeriodNode = 5 * time.Minute
)

General kubernetes-related constants

View Source
const (
	ConnectionPoolerUserName             = "pooler"
	ConnectionPoolerSchemaName           = "pooler"
	ConnectionPoolerDefaultType          = "pgbouncer"
	ConnectionPoolerDefaultMode          = "transaction"
	ConnectionPoolerDefaultCpuRequest    = "500m"
	ConnectionPoolerDefaultCpuLimit      = "1"
	ConnectionPoolerDefaultMemoryRequest = "100Mi"
	ConnectionPoolerDefaultMemoryLimit   = "100Mi"

	ConnectionPoolerContainer            = 0
	ConnectionPoolerMaxDBConnections     = 60
	ConnectionPoolerMaxClientConnections = 10000
	ConnectionPoolerMinInstances         = 2
)

Connection pooler specific constants

View Source
const (
	DataVolumeName    = "pgdata"
	PostgresDataMount = "/home/postgres/pgdata"
	PostgresDataPath  = PostgresDataMount + "/pgroot"

	PostgresConnectRetryTimeout = 2 * time.Minute
	PostgresConnectTimeout      = 15 * time.Second

	ShmVolumeName = "dshm"
	ShmVolumePath = "/dev/shm"
)

PostgreSQL specific constants

View Source
const (
	PasswordLength              = 64
	SuperuserKeyName            = "superuser"
	ConnectionPoolerUserKeyName = "pooler"
	ReplicationUserKeyName      = "replication"
	RoleFlagSuperuser           = "SUPERUSER"
	RoleFlagInherit             = "INHERIT"
	RoleFlagLogin               = "LOGIN"
	RoleFlagNoLogin             = "NOLOGIN"
	RoleFlagCreateRole          = "CREATEROLE"
	RoleFlagCreateDB            = "CREATEDB"
	RoleFlagReplication         = "REPLICATION"
	RoleFlagByPassRLS           = "BYPASSRLS"
	OwnerRoleNameSuffix         = "_owner"
	ReaderRoleNameSuffix        = "_reader"
	WriterRoleNameSuffix        = "_writer"
	UserRoleNameSuffix          = "_user"
)

Roles specific constants

View Source
const (
	Gigabyte = 1073741824
)

Measurement-unit definitions

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