operator

package
v4.2.0-alpha.1+incompa... Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AFFINITY_NOTINOperator = "NotIn"
View Source
const AffinityInOperator = "In"

consolidate with cluster.affinityTemplateFields

View Source
const DefaultArchiveTimeout = "60"
View Source
const DefaultPgHaConfigMapSuffix = "pgha-default-config"

Variables

View Source
var CRUNCHY_DEBUG bool
View Source
var EventTCPAddress = "localhost:4150"
View Source
var InstallationName string
View Source
var NAMESPACE string
View Source
var PgoNamespace string

Functions

func AddDefaultPostgresHaConfigMap

func AddDefaultPostgresHaConfigMap(clientset *kubernetes.Clientset, cluster *crv1.Pgcluster, isInit, createDefaultPghaConf bool,
	namespace string) error

Creates a configMap containing 'crunchy-postgres-ha' configuration settings. aA default crunchy-postgres-ha configuration file is included if a default config file is not providing using a custom configMap.

func GetAffinity

func GetAffinity(nodeLabelKey, nodeLabelValue string, affoperator string) string

GetAffinity ...

func GetBadgerAddon

func GetBadgerAddon(clientset *kubernetes.Clientset, namespace string, cluster *crv1.Pgcluster, pgbadger_target string) string

func GetCollectAddon

func GetCollectAddon(clientset *kubernetes.Clientset, namespace string, spec *crv1.PgclusterSpec) string

func GetCollectVolume

func GetCollectVolume(clientset *kubernetes.Clientset, cl *crv1.Pgcluster, namespace string) string

sets the proper collect secret in the deployment spec if collect is enabled

func GetConfVolume

func GetConfVolume(clientset *kubernetes.Clientset, cl *crv1.Pgcluster, namespace string) string

consolidate with cluster.GetConfVolume

func GetContainerResourcesJSON

func GetContainerResourcesJSON(resources *crv1.PgContainerResources) string

GetContainerResources ...

func GetLabelsFromMap

func GetLabelsFromMap(labels map[string]string) string

needs to be consolidated with cluster.GetLabelsFromMap GetLabelsFromMap ...

func GetPgbackrestEnvVars

func GetPgbackrestEnvVars(backrestEnabled, clusterName, depName, port, storageType string) string

consolidate with cluster.GetPgbackrestEnvVars

func GetPgbackrestS3EnvVars

func GetPgbackrestS3EnvVars(backrestLabel, backRestStorageTypeLabel string,
	clientset *kubernetes.Clientset, ns string) string

func GetPgmonitorEnvVars

func GetPgmonitorEnvVars(metricsEnabled string) string

func GetReplicaAffinity

func GetReplicaAffinity(clusterLabels, replicaLabels map[string]string) string

GetReplicaAffinity ... use NotIn as an operator when a node-label is not specified on the replica, use the node labels from the primary in this case use In as an operator when a node-label is specified on the replica use the node labels from the replica in this case

func GetRepoType

func GetRepoType(backrestStorageType string) string

GetRepoType returns the proper repo type to set in container based on the backrest storage type provided

func Initialize

func Initialize(clientset *kubernetes.Clientset)

func IsLocalAndS3Storage

func IsLocalAndS3Storage(backrestStorageType string) bool

IsLocalAndS3Storage a boolean indicating whether or not local and s3 storage should be enabled for pgBackRest based on the backrestStorageType string provided

func UpdatePghaDefaultConfigInitFlag

func UpdatePghaDefaultConfigInitFlag(clientset *kubernetes.Clientset, initVal bool, clusterName, namespace string)

UpdatePghaDefaultConfigInitFlag sets the init value for the pgha config file to true or false depending on the vlaue provided

Types

type DeploymentTemplateFields

type DeploymentTemplateFields struct {
	Name                string
	ClusterName         string
	Port                string
	CCPImagePrefix      string
	CCPImageTag         string
	CCPImage            string
	Database            string
	DeploymentLabels    string
	PodLabels           string
	DataPathOverride    string
	ArchiveMode         string
	ArchivePVCName      string
	XLOGDir             string
	BackrestPVCName     string
	PVCName             string
	RootSecretName      string
	UserSecretName      string
	PrimarySecretName   string
	SecurityContext     string
	ContainerResources  string
	NodeSelector        string
	ConfVolume          string
	CollectAddon        string
	CollectVolume       string
	BadgerAddon         string
	PgbackrestEnvVars   string
	PgbackrestS3EnvVars string
	PgmonitorEnvVars    string
	ScopeLabel          string
	//next 2 are for the replica deployment only
	Replicas    string
	PrimaryHost string
	// PgBouncer deployment only
	PgbouncerPass string
	IsInit        bool
}

needs to be consolidated with cluster.DeploymentTemplateFields DeploymentTemplateFields ...

type PgbackrestEnvVarsTemplateFields

type PgbackrestEnvVarsTemplateFields struct {
	PgbackrestStanza            string
	PgbackrestDBPath            string
	PgbackrestRepo1Path         string
	PgbackrestRepo1Host         string
	PgbackrestRepo1Type         string
	PgbackrestLocalAndS3Storage bool
	PgbackrestPGPort            string
}

type PgbackrestS3EnvVarsTemplateFields

type PgbackrestS3EnvVarsTemplateFields struct {
	PgbackrestS3Bucket    string
	PgbackrestS3Endpoint  string
	PgbackrestS3Region    string
	PgbackrestS3Key       string
	PgbackrestS3KeySecret string
}

type PgmonitorEnvVarsTemplateFields

type PgmonitorEnvVarsTemplateFields struct {
	PgmonitorPassword string
}

type PostgresHaTemplateFields

type PostgresHaTemplateFields struct {
	LogStatement            string
	LogMinDurationStatement string
	ArchiveTimeout          string
}

Directories

Path Synopsis
Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment
Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment Package cluster holds the cluster CRD logic and definitions A cluster is comprised of a primary service, replica service, primary deployment, and replica deployment

Jump to

Keyboard shortcuts

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