config

package
v4.5.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ANNOTATION_BACKREST_RESTORE is used to annotate pgclusters that are restoring
	ANNOTATION_BACKREST_RESTORE          = "pgo-backrest-restore"
	ANNOTATION_PGHA_BOOTSTRAP_REPLICA    = "pgo-pgha-bootstrap-replica"
	ANNOTATION_CLONE_BACKREST_PVC_SIZE   = "clone-backrest-pvc-size"
	ANNOTATION_CLONE_ENABLE_METRICS      = "clone-enable-metrics"
	ANNOTATION_CLONE_PVC_SIZE            = "clone-pvc-size"
	ANNOTATION_CLONE_SOURCE_CLUSTER_NAME = "clone-source-cluster-name"
	ANNOTATION_CLONE_TARGET_CLUSTER_NAME = "clone-target-cluster-name"
	ANNOTATION_PRIMARY_DEPLOYMENT        = "primary-deployment"
	// annotation to track the cluster's current primary
	ANNOTATION_CURRENT_PRIMARY = "current-primary"
	// annotation to indicate whether a cluster has been upgraded
	ANNOTATION_IS_UPGRADED = "is-upgraded"
	// annotation to store the Operator versions upgraded from and to
	ANNOTATION_UPGRADE_INFO = "upgrade-info"
	// annotation to store the string boolean, used when checking upgrade status
	ANNOTATIONS_FALSE = "false"
	// ANNOTATION_REPO_PATH is for storing the repository path for the pgBackRest repo in a cluster
	ANNOTATION_REPO_PATH = "repo-path"
	// ANNOTATION_PG_PORT is for storing the PostgreSQL port for a cluster
	ANNOTATION_PG_PORT = "pg-port"
	// ANNOTATION_S3_BUCKET is for storing the name of the S3 bucket used by pgBackRest in
	// a cluster
	ANNOTATION_S3_BUCKET = "s3-bucket"
	// ANNOTATION_S3_ENDPOINT is for storing the name of the S3 endpoint used by pgBackRest in
	// a cluster
	ANNOTATION_S3_ENDPOINT = "s3-endpoint"
	// ANNOTATION_S3_REGION is for storing the name of the S3 region used by pgBackRest in
	// a cluster
	ANNOTATION_S3_REGION = "s3-region"
	// ANNOTATION_S3_URI_STYLE is for storing the the URI style that should be used to access a
	// pgBackRest repository
	ANNOTATION_S3_URI_STYLE = "s3-uri-style"
	// ANNOTATION_S3_VERIFY_TLS is for storing the setting that determines whether or not TLS should
	// be used to access a pgBackRest repository
	ANNOTATION_S3_VERIFY_TLS = "s3-verify-tls"
	// ANNOTATION_S3_BUCKET is for storing the SSHD port used by the pgBackRest repository
	// service in a cluster
	ANNOTATION_SSHD_PORT = "sshd-port"
	// ANNOTATION_SUPPLEMENTAL_GROUPS is for storing the supplemental groups used with a cluster
	ANNOTATION_SUPPLEMENTAL_GROUPS = "supplemental-groups"
)

annotations used by the operator

View Source
const (
	// ControllerGroupRefreshInterval is the default informer refresh interval in seconds
	// for the controllers created by the Controller Manager that require a refresh interval
	DefaultControllerGroupRefreshInterval = 60
	// NamespaceRefreshInterval is the default informer refresh interval in seconds
	// for the Operator's namespace controller
	DefaultNamespaceRefreshInterval = 60
)

The following constants define the default refresh intervals for any informers created by that require a refresh interval

View Source
const (
	// DefaultConfigMapWorkerCount defines the default number or workers for the worker queue
	// in the ConfigMap controller
	DefaultConfigMapWorkerCount = 2
	// DefaultNamespaceWorkerCount defines the default number or workers for the worker queue
	// in the Namespace controller
	DefaultNamespaceWorkerCount = 3
	// DefaultPGClusterWorkerCount defines the default number or workers for the worker queue
	// in the PGCluster controller
	DefaultPGClusterWorkerCount = 1
	// DefaultPGReplicaWorkerCount defines the default number or workers for the worker queue
	// in the PGReplica controller
	DefaultPGReplicaWorkerCount = 1
	// DefaultPGTaskWorkerCount defines the default number or workers for the worker queue
	// in the PGTask controller
	DefaultPGTaskWorkerCount = 1
)

The following constants define the default number of workers created for the worker queues created within the various controller created by the Operator

View Source
const (
	CONTAINER_IMAGE_PGO_BACKREST              = "pgo-backrest"
	CONTAINER_IMAGE_PGO_BACKREST_REPO         = "pgo-backrest-repo"
	CONTAINER_IMAGE_PGO_BACKREST_REPO_SYNC    = "pgo-backrest-repo-sync"
	CONTAINER_IMAGE_PGO_BACKREST_RESTORE      = "pgo-backrest-restore"
	CONTAINER_IMAGE_PGO_CLIENT                = "pgo-client"
	CONTAINER_IMAGE_PGO_RMDATA                = "pgo-rmdata"
	CONTAINER_IMAGE_PGO_SQL_RUNNER            = "pgo-sqlrunner"
	CONTAINER_IMAGE_CRUNCHY_ADMIN             = "crunchy-admin"
	CONTAINER_IMAGE_CRUNCHY_BACKREST_RESTORE  = "crunchy-backrest-restore"
	CONTAINER_IMAGE_CRUNCHY_POSTGRES_EXPORTER = "crunchy-postgres-exporter"
	CONTAINER_IMAGE_CRUNCHY_GRAFANA           = "crunchy-grafana"
	CONTAINER_IMAGE_CRUNCHY_PGADMIN           = "crunchy-pgadmin4"
	CONTAINER_IMAGE_CRUNCHY_PGBADGER          = "crunchy-pgbadger"
	CONTAINER_IMAGE_CRUNCHY_PGBOUNCER         = "crunchy-pgbouncer"
	CONTAINER_IMAGE_CRUNCHY_PGDUMP            = "crunchy-pgdump"
	CONTAINER_IMAGE_CRUNCHY_PGRESTORE         = "crunchy-pgrestore"
	CONTAINER_IMAGE_CRUNCHY_POSTGRES_HA       = "crunchy-postgres-ha"
	CONTAINER_IMAGE_CRUNCHY_POSTGRES_GIS_HA   = "crunchy-postgres-gis-ha"
	CONTAINER_IMAGE_CRUNCHY_PROMETHEUS        = "crunchy-prometheus"
)

a list of container images that are available

View Source
const CONFIG_PATH = "pgo.yaml"
View Source
const CustomConfigMapName = "pgo-config"
View Source
const DEFAULT_BACKREST_PORT = 2022
View Source
const DEFAULT_EXPORTER_PORT = "9187"
View Source
const DEFAULT_PATRONI_PORT = "8009"
View Source
const DEFAULT_PGADMIN_PORT = "5050"
View Source
const DEFAULT_PGBADGER_PORT = "10000"
View Source
const DEFAULT_POSTGRES_PORT = "5432"
View Source
const DEFAULT_SERVICE_TYPE = "ClusterIP"
View Source
const DefaultPgBouncerReplicas = 1

DefaultPgBouncerReplicas is the total number of Pods to place in a pgBouncer Deployment

View Source
const GLOBAL_CUSTOM_CONFIGMAP = "pgo-custom-pg-config"
View Source
const LABEL_ARCHIVE = "archive"
View Source
const LABEL_ARCHIVE_TIMEOUT = "archive-timeout"
View Source
const LABEL_AUTOFAIL = "autofail"
View Source
const LABEL_BACKREST = "pgo-backrest"
View Source
const LABEL_BACKREST_BACKUP_OPTS = "backrest-backup-opts"
View Source
const LABEL_BACKREST_COMMAND = "backrest-command"
View Source
const LABEL_BACKREST_JOB = "pgo-backrest-job"
View Source
const LABEL_BACKREST_OPTS = "backrest-opts"
View Source
const LABEL_BACKREST_PITR_TARGET = "backrest-pitr-target"
View Source
const LABEL_BACKREST_REPO_SECRET = "backrest-repo-config"
View Source
const LABEL_BACKREST_RESTORE = "pgo-backrest-restore"
View Source
const LABEL_BACKREST_RESTORE_FROM_CLUSTER = "backrest-restore-from-cluster"
View Source
const LABEL_BACKREST_RESTORE_OPTS = "backrest-restore-opts"
View Source
const LABEL_BACKREST_S3_VERIFY_TLS = "backrest-s3-verify-tls"
View Source
const LABEL_BACKREST_STORAGE_TYPE = "backrest-storage-type"
View Source
const LABEL_BACKUP_TYPE_BACKREST = "pgbackrest"
View Source
const LABEL_BACKUP_TYPE_PGDUMP = "pgdump"
View Source
const LABEL_BADGER = "crunchy-pgbadger"
View Source
const LABEL_BADGER_CCPIMAGE = "crunchy-pgbadger"
View Source
const LABEL_CCP_IMAGE_KEY = "ccp-image"
View Source
const LABEL_CCP_IMAGE_TAG_KEY = "ccp-image-tag"
View Source
const LABEL_CLAIM_NAME = "claimName"
View Source
const LABEL_CONTAINER_NAME = "containername"
View Source
const LABEL_CRUNCHY = "crunchydata"
View Source
const LABEL_CURRENT_PRIMARY = "current-primary"
View Source
const LABEL_CUSTOM_CONFIG = "custom-config"
View Source
const LABEL_DATA_ROOT = "data-root"
View Source
const LABEL_DELETE_BACKUPS = "delete-backups"
View Source
const LABEL_DELETE_DATA = "delete-data"
View Source
const LABEL_DELETE_DATA_STARTED = "delete-data-started"
View Source
const LABEL_DEPLOYMENT_NAME = "deployment-name"
View Source
const LABEL_EXPORTER = "crunchy-postgres-exporter"
View Source
const LABEL_EXPORTER_PG_USER = "ccp_monitoring"
View Source
const LABEL_FAILOVER = "failover"
View Source
const LABEL_FAILOVER_STARTED = "failover-started"
View Source
const LABEL_FALSE = "false"
View Source
const LABEL_IMAGE_PREFIX = "image-prefix"
View Source
const LABEL_INGEST = "ingest"
View Source
const LABEL_IS_BACKUP = "is-backup"
View Source
const LABEL_IS_REPLICA = "is-replica"
View Source
const LABEL_JOB_NAME = "job-name"
View Source
const LABEL_NAME = "name"

resource labels used by the operator

View Source
const LABEL_NAMESPACE = "namespace"
View Source
const LABEL_NODE_LABEL = "node-label"
View Source
const LABEL_NODE_LABEL_KEY = "NodeLabelKey"
View Source
const LABEL_NODE_LABEL_VALUE = "NodeLabelValue"
View Source
const LABEL_OPERATOR = "postgres-operator"
View Source
const LABEL_PASSWORD = "password"
View Source
const LABEL_PGADMIN = "crunchy-pgadmin"
View Source
const LABEL_PGADMIN_TASK_ADD = "pgadmin-add"
View Source
const LABEL_PGADMIN_TASK_CLUSTER = "pgadmin-cluster"
View Source
const LABEL_PGADMIN_TASK_DELETE = "pgadmin-delete"
View Source
const LABEL_PGBACKREST_DB_PATH = "pgbackrest-db-path"
View Source
const LABEL_PGBACKREST_REPO_HOST = "pgbackrest-repo-host"
View Source
const LABEL_PGBACKREST_REPO_PATH = "pgbackrest-repo-path"
View Source
const LABEL_PGBACKREST_STANZA = "pgbackrest-stanza"
View Source
const LABEL_PGBOUNCER = "crunchy-pgbouncer"
View Source
const LABEL_PGDUMP_ALL = "pgdump-all"
View Source
const LABEL_PGDUMP_COMMAND = "pgdump"
View Source
const LABEL_PGDUMP_DB = "pgdump-db"
View Source
const LABEL_PGDUMP_HOST = "pgdump-host"
View Source
const LABEL_PGDUMP_OPTS = "pgdump-opts"
View Source
const LABEL_PGDUMP_PORT = "pgdump-port"
View Source
const LABEL_PGDUMP_PVC = "pgdump-pvc"
View Source
const LABEL_PGDUMP_RESTORE = "pgdump-restore"
View Source
const LABEL_PGDUMP_USER = "pgdump-user"
View Source
const LABEL_PGHA_BACKUP_TYPE = "pgha-backup-type"
View Source
const LABEL_PGHA_BOOTSTRAP = "pgha-bootstrap"
View Source
const LABEL_PGHA_CONFIGMAP = "pgha-config"
View Source
const LABEL_PGHA_ROLE = "role"
View Source
const LABEL_PGHA_ROLE_PRIMARY = "master"
View Source
const LABEL_PGHA_ROLE_REPLICA = "replica"
View Source
const LABEL_PGHA_SCOPE = "crunchy-pgha-scope"
View Source
const LABEL_PGOUSER = "pgouser"
View Source
const LABEL_PGO_BACKREST_REPO = "pgo-backrest-repo"
View Source
const LABEL_PGO_CLONE = "pgo-clone"

a general label for grouping all the tasks...helps with cleanups

View Source
const LABEL_PGO_CLONE_STEP_1 = "pgo-clone-step-1"

the individualized step labels

View Source
const LABEL_PGO_CLONE_STEP_2 = "pgo-clone-step-2"
View Source
const LABEL_PGO_CLONE_STEP_3 = "pgo-clone-step-3"
View Source
const LABEL_PGO_CREATED_BY = "pgo-created-by"
View Source
const LABEL_PGO_INSTALLATION_NAME = "pgo-installation-name"
View Source
const LABEL_PGO_PGOROLE = "pgo-pgorole"
View Source
const LABEL_PGO_PGOUSER = "pgo-pgouser"
View Source
const LABEL_PGO_UPDATED_BY = "pgo-updated-by"
View Source
const LABEL_PGO_VERSION = "pgo-version"
View Source
const LABEL_PGPOLICY = "pgpolicy"
View Source
const LABEL_PGREMOVE = "pgremove"
View Source
const LABEL_PGRESTORE_COMMAND = "pgrestore"
View Source
const LABEL_PGRESTORE_DB = "pgrestore-db"
View Source
const LABEL_PGRESTORE_FROM_CLUSTER = "pgrestore-from-cluster"
View Source
const LABEL_PGRESTORE_FROM_PVC = "pgrestore-from-pvc"
View Source
const LABEL_PGRESTORE_HOST = "pgrestore-host"
View Source
const LABEL_PGRESTORE_OPTS = "pgrestore-opts"
View Source
const LABEL_PGRESTORE_PITR_TARGET = "pgrestore-pitr-target"
View Source
const LABEL_PGRESTORE_PORT = "pgrestore-port"
View Source
const LABEL_PGRESTORE_USER = "pgrestore-user"
View Source
const LABEL_PGTASK = "pg-task"
View Source
const LABEL_PG_CLUSTER = "pg-cluster"
View Source
const LABEL_PG_CLUSTER_IDENTIFIER = "pg-cluster-id"
View Source
const LABEL_PG_DATABASE = "pgo-pg-database"
View Source
const LABEL_POD_ANTI_AFFINITY = "pg-pod-anti-affinity"
View Source
const LABEL_POD_NAME = "podname"
View Source
const LABEL_PVCNAME = "pvcname"
View Source
const LABEL_PVC_NAME = "pvc-name"
View Source
const LABEL_REPLICA_COUNT = "replica-count"
View Source
const LABEL_REPLICA_NAME = "replica-name"
View Source
const LABEL_RESTORE_TYPE_PGRESTORE = "pgrestore"
View Source
const LABEL_RMDATA = "pgrmdata"
View Source
const LABEL_ROLENAME = "rolename"
View Source
const LABEL_SELECTOR = "selector"
View Source
const LABEL_SERVICE_NAME = "service-name"
View Source
const LABEL_SERVICE_TYPE = "service-type"
View Source
const LABEL_SESSION_ID = "sessionid"
View Source
const LABEL_SHUTDOWN = "shutdown"
View Source
const LABEL_STARTUP = "startup"
View Source
const LABEL_STORAGE_CONFIG = "storage-config"
View Source
const LABEL_SYNC_REPLICATION = "sync-replication"
View Source
const LABEL_TARGET = "target"
View Source
const LABEL_TRUE = "true"
View Source
const LABEL_UPGRADE = "upgrade"

label for the pgcluster upgrade

View Source
const LABEL_USERNAME = "username"
View Source
const LABEL_VENDOR = "vendor"
View Source
const LABEL_VERSION = "version"
View Source
const LABEL_VOLUME_NAME = "volume-name"
View Source
const LABEL_WORKFLOW_ID = "workflowid" // NOTE: this now matches crv1.PgtaskWorkflowID
View Source
const LOAD_BALANCER_SERVICE_TYPE = "LoadBalancer"
View Source
const NODEPORT_SERVICE_TYPE = "NodePort"
View Source
const PGOBackrestRoleBindingPath = "pgo-backrest-role-binding.json"
View Source
const PGOBackrestRolePath = "pgo-backrest-role.json"
View Source
const PGOBackrestServiceAccountPath = "pgo-backrest-sa.json"
View Source
const PGODefaultServiceAccountPath = "pgo-default-sa.json"
View Source
const PGOPgRoleBindingPath = "pgo-pg-role-binding.json"
View Source
const PGOPgRolePath = "pgo-pg-role.json"
View Source
const PGOPgServiceAccountPath = "pgo-pg-sa.json"
View Source
const PGOTargetRoleBindingPath = "pgo-target-role-binding.json"
View Source
const PGOTargetRolePath = "pgo-target-role.json"
View Source
const PGOTargetServiceAccountPath = "pgo-target-sa.json"
View Source
const VOLUME_PGBACKREST_REPO_MOUNT_PATH = "/backrestrepo"
View Source
const VOLUME_PGBACKREST_REPO_NAME = "backrestrepo"

volume configuration settings used by the pgBackRest repo mount

View Source
const VOLUME_POSTGRESQL_DATA = "pgdata"

volume configuration settings used by the PostgreSQL data directory and mount

View Source
const VOLUME_POSTGRESQL_DATA_MOUNT_PATH = "/pgdata"
View Source
const VOLUME_SSHD_MOUNT_PATH = "/sshd"
View Source
const VOLUME_SSHD_NAME = "sshd"

volume configuration settings used by the SSHD secret

View Source
const VOLUME_TABLESPACE_NAME_PREFIX = "tablespace-"

the pattern for the volume name used on a tablespace, which follows "tablespace-<tablespaceName>"

View Source
const VOLUME_TABLESPACE_PATH_PREFIX = "/tablespaces/"

the pattern for the path used to mount the volume of a tablespace, which follows "/tablespace/<pvcName>"

View Source
const VOLUME_TABLESPACE_PVC_NAME_FORMAT = "%s-tablespace-%s"

the pattern for the name of a tablespace PVC, which is off the form: "<clusterName>-tablespace-<tablespaceName>"

Variables

View Source
var (
	// DefaultBackrestRepoResourceMemory is the default value of the resource
	// request for memory for a pgBackRest repository
	DefaultBackrestResourceMemory = resource.MustParse("48Mi")
	// DefaultInstanceResourceMemory is the default value of the resource request
	// for memory for a PostgreSQL instance in a cluster
	DefaultInstanceResourceMemory = resource.MustParse("512Mi")
	// DefaultPgBouncerResourceMemory is the default value of the resource request
	// for memory of a pgBouncer instance
	DefaultPgBouncerResourceMemory = resource.MustParse("24Mi")
	// DefaultExporterResourceMemory is the default value of the resource request
	// for memory of a Crunchy Postgres Exporter instance
	DefaultExporterResourceMemory = resource.MustParse("24Mi")
)

Default resource values for deploying a PostgreSQL cluster. These values are utilized if the user has not provided these values either through configuration or from one-off API/CLI calls.

These values were determined by either program defaults (e.g. the PostgreSQL one) and/or loose to vigorous experimentation and profiling

View Source
var AffinityTemplate *template.Template
View Source
var BackrestRestorejobTemplate *template.Template
View Source
var BackrestjobTemplate *template.Template
View Source
var BadgerTemplate *template.Template
View Source
var BootstrapTemplate *template.Template
View Source
var ContainerResourcesTemplate *template.Template
View Source
var DeploymentTemplate *template.Template
View Source
var ExporterTemplate *template.Template
View Source
var PVCMatchLabelsTemplate *template.Template
View Source
var PVCStorageClassTemplate *template.Template
View Source
var PVCTemplate *template.Template
View Source
var PgAdminServiceTemplate *template.Template
View Source
var PgAdminTemplate *template.Template
View Source
var PgDumpBackupJobTemplate *template.Template
View Source
var PgRestoreJobTemplate *template.Template
View Source
var PgbackrestEnvVarsTemplate *template.Template
View Source
var PgbackrestS3EnvVarsTemplate *template.Template
View Source
var PgbouncerConfTemplate *template.Template
View Source
var PgbouncerHBATemplate *template.Template
View Source
var PgbouncerTemplate *template.Template
View Source
var PgbouncerUsersTemplate *template.Template
View Source
var PgmonitorEnvVarsTemplate *template.Template
View Source
var PgoBackrestRepoServiceTemplate *template.Template
View Source
var PgoBackrestRepoTemplate *template.Template
View Source
var PgoBackrestRoleBindingTemplate *template.Template
View Source
var PgoBackrestRoleTemplate *template.Template
View Source
var PgoBackrestServiceAccountTemplate *template.Template
View Source
var PgoDefaultServiceAccountTemplate *template.Template
View Source
var PgoPgRoleBindingTemplate *template.Template
View Source
var PgoPgRoleTemplate *template.Template
View Source
var PgoPgServiceAccountTemplate *template.Template
View Source
var PgoTargetRoleBindingTemplate *template.Template
View Source
var PgoTargetRoleTemplate *template.Template
View Source
var PgoTargetServiceAccountTemplate *template.Template
View Source
var PodAntiAffinityTemplate *template.Template
View Source
var PolicyJobTemplate *template.Template
View Source
var RelatedImageMap = map[string]string{
	"RELATED_IMAGE_PGO_BACKREST":              CONTAINER_IMAGE_PGO_BACKREST,
	"RELATED_IMAGE_PGO_BACKREST_REPO":         CONTAINER_IMAGE_PGO_BACKREST_REPO,
	"RELATED_IMAGE_PGO_BACKREST_REPO_SYNC":    CONTAINER_IMAGE_PGO_BACKREST_REPO_SYNC,
	"RELATED_IMAGE_PGO_BACKREST_RESTORE":      CONTAINER_IMAGE_PGO_BACKREST_RESTORE,
	"RELATED_IMAGE_PGO_CLIENT":                CONTAINER_IMAGE_PGO_CLIENT,
	"RELATED_IMAGE_PGO_RMDATA":                CONTAINER_IMAGE_PGO_RMDATA,
	"RELATED_IMAGE_PGO_SQL_RUNNER":            CONTAINER_IMAGE_PGO_SQL_RUNNER,
	"RELATED_IMAGE_CRUNCHY_ADMIN":             CONTAINER_IMAGE_CRUNCHY_ADMIN,
	"RELATED_IMAGE_CRUNCHY_BACKREST_RESTORE":  CONTAINER_IMAGE_CRUNCHY_BACKREST_RESTORE,
	"RELATED_IMAGE_CRUNCHY_POSTGRES_EXPORTER": CONTAINER_IMAGE_CRUNCHY_POSTGRES_EXPORTER,
	"RELATED_IMAGE_CRUNCHY_PGADMIN":           CONTAINER_IMAGE_CRUNCHY_PGADMIN,
	"RELATED_IMAGE_CRUNCHY_PGBADGER":          CONTAINER_IMAGE_CRUNCHY_PGBADGER,
	"RELATED_IMAGE_CRUNCHY_PGBOUNCER":         CONTAINER_IMAGE_CRUNCHY_PGBOUNCER,
	"RELATED_IMAGE_CRUNCHY_PGDUMP":            CONTAINER_IMAGE_CRUNCHY_PGDUMP,
	"RELATED_IMAGE_CRUNCHY_PGRESTORE":         CONTAINER_IMAGE_CRUNCHY_PGRESTORE,
	"RELATED_IMAGE_CRUNCHY_POSTGRES_HA":       CONTAINER_IMAGE_CRUNCHY_POSTGRES_HA,
	"RELATED_IMAGE_CRUNCHY_POSTGRES_GIS_HA":   CONTAINER_IMAGE_CRUNCHY_POSTGRES_GIS_HA,
}

a map of the "RELATED_IMAGE_*" environmental variables to their defined container image names, which allows certain packagers to inject the full definition for where to pull a container image from

See: https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/contributors/design-proposals/related-images.md

View Source
var RmdatajobTemplate *template.Template
View Source
var ServiceTemplate *template.Template

Functions

func PostgreSQLWALPath

func PostgreSQLWALPath(cluster string) string

PostgreSQLWALPath returns the absolute path to a mounted WAL directory.

func PostgreSQLWALVolumeMount

func PostgreSQLWALVolumeMount() core_v1.VolumeMount

PostgreSQLWALVolumeMount returns the VolumeMount for the PostgreSQL WAL directory.

Types

type ClusterStruct

type ClusterStruct struct {
	CCPImagePrefix                 string
	CCPImageTag                    string
	Policies                       string
	Metrics                        bool
	Badger                         bool
	Port                           string
	PGBadgerPort                   string
	ExporterPort                   string
	User                           string
	Database                       string
	PasswordAgeDays                string
	PasswordLength                 string
	Replicas                       string
	ServiceType                    string
	BackrestPort                   int
	BackrestS3Bucket               string
	BackrestS3Endpoint             string
	BackrestS3Region               string
	BackrestS3URIStyle             string
	BackrestS3VerifyTLS            string
	DisableAutofail                bool
	PgmonitorPassword              string
	EnableCrunchyadm               bool
	DisableReplicaStartFailReinit  bool
	PodAntiAffinity                string
	PodAntiAffinityPgBackRest      string
	PodAntiAffinityPgBouncer       string
	SyncReplication                bool
	DefaultInstanceResourceMemory  resource.Quantity `json:"DefaultInstanceMemory"`
	DefaultBackrestResourceMemory  resource.Quantity `json:"DefaultBackrestMemory"`
	DefaultPgBouncerResourceMemory resource.Quantity `json:"DefaultPgBouncerMemory"`
	DefaultExporterResourceMemory  resource.Quantity `json:"DefaultExporterMemory"`
	DisableFSGroup                 bool
}

type PgoConfig

type PgoConfig struct {
	BasicAuth       string
	Cluster         ClusterStruct
	Pgo             PgoStruct
	PrimaryStorage  string
	WALStorage      string
	BackupStorage   string
	ReplicaStorage  string
	BackrestStorage string
	Storage         map[string]StorageStruct
}

func (*PgoConfig) CheckEnv

func (c *PgoConfig) CheckEnv()

CheckEnv is mostly used for the OLM deployment use case when someone wants to deploy with OLM, use the baked-in configuration, but use a different set of images, by setting these env vars in the OLM CSV, users can override the baked in images

func (*PgoConfig) DefaultTemplate

func (c *PgoConfig) DefaultTemplate(path string) (string, error)

DefaultTemplate attempts to load a default configuration template file

func (*PgoConfig) GetConfig

func (c *PgoConfig) GetConfig(clientset kubernetes.Interface, namespace string) error

func (*PgoConfig) GetPodAntiAffinitySpec

func (c *PgoConfig) GetPodAntiAffinitySpec(cluster, pgBackRest, pgBouncer crv1.PodAntiAffinityType) (crv1.PodAntiAffinitySpec, error)

GetPodAntiAffinitySpec accepts possible user-defined values for what the pod anti-affinity spec should be, which include rules for: - PostgreSQL instances - pgBackRest - pgBouncer

func (*PgoConfig) GetStorageSpec

func (c *PgoConfig) GetStorageSpec(name string) (crv1.PgStorageSpec, error)

func (*PgoConfig) LoadTemplate

func (c *PgoConfig) LoadTemplate(cMap *v1.ConfigMap, path string) (*template.Template, error)

LoadTemplate will load a JSON template from a path

func (*PgoConfig) Validate

func (c *PgoConfig) Validate() error

type PgoStruct

type PgoStruct struct {
	Audit                          bool
	ConfigMapWorkerCount           *int
	ControllerGroupRefreshInterval *int
	DisableReconcileRBAC           bool
	NamespaceRefreshInterval       *int
	NamespaceWorkerCount           *int
	PGClusterWorkerCount           *int
	PGOImagePrefix                 string
	PGOImageTag                    string
	PGReplicaWorkerCount           *int
	PGTaskWorkerCount              *int
}

PgoStruct defines various configuration settings for the PostgreSQL Operator

type StorageStruct

type StorageStruct struct {
	AccessMode         string
	Size               string
	StorageType        string
	StorageClass       string
	SupplementalGroups string
	MatchLabels        string
}

Jump to

Keyboard shortcuts

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