constants

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 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"
	K8sAPIPath            = "/apis"

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

General kubernetes-related constants

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

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

Connection pooler specific constants

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

	PatroniPGParametersParameterName = "parameters"

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

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

	RunVolumeName = "postgresql-run"
	RunVolumePath = "/var/run/postgresql"
)

PostgreSQL specific constants

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

Roles specific constants

View Source
const (
	EventStreamCRDApiVersion     = "zalando.org/v1"
	EventStreamCRDKind           = "FabricEventStream"
	EventStreamCRDName           = "fabriceventstreams.zalando.org"
	EventStreamSourcePGType      = "PostgresLogicalReplication"
	EventStreamSourceSlotPrefix  = "fes"
	EventStreamSourcePluginType  = "pgoutput"
	EventStreamSourceAuthType    = "DatabaseAuthenticationSecret"
	EventStreamFlowPgGenericType = "PostgresWalToGenericNakadiEvent"
	EventStreamSinkNakadiType    = "Nakadi"
	EventStreamRecoveryNoneType  = "None"
	EventStreamRecoveryDLQType   = "DeadLetter"
	EventStreamRecoverySuffix    = "dead-letter-queue"
)

PostgreSQL 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