postgres

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterStatusUnknown      = ""
	ClusterStatusCreating     = "Creating"
	ClusterStatusUpdating     = "Updating"
	ClusterStatusUpdateFailed = "UpdateFailed"
	ClusterStatusSyncFailed   = "SyncFailed"
	ClusterStatusAddFailed    = "CreateFailed"
	ClusterStatusRunning      = "Running"
	ClusterStatusInvalid      = "Invalid"
)

ClusterStatusUnknown etc : status of a Postgres cluster known to the operator

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSGCPConfiguration

type AWSGCPConfiguration struct {
	WALES3Bucket              string `json:"wal_s3_bucket,omitempty"`
	AWSRegion                 string `json:"aws_region,omitempty"`
	WALGSBucket               string `json:"wal_gs_bucket,omitempty"`
	GCPCredentials            string `json:"gcp_credentials,omitempty"`
	LogS3Bucket               string `json:"log_s3_bucket,omitempty"`
	KubeIAMRole               string `json:"kube_iam_role,omitempty"`
	AdditionalSecretMount     string `json:"additional_secret_mount,omitempty"`
	AdditionalSecretMountPath string `json:"additional_secret_mount_path" default:"/meta/credentials"`
}

AWSGCPConfiguration defines the configuration for AWS TODO complete Google Cloud Platform (GCP) configuration

func (*AWSGCPConfiguration) DeepCopy

func (in *AWSGCPConfiguration) DeepCopy() *AWSGCPConfiguration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSGCPConfiguration.

func (*AWSGCPConfiguration) DeepCopyInto

func (in *AWSGCPConfiguration) DeepCopyInto(out *AWSGCPConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AdditionalVolume added in v0.19.0

type AdditionalVolume struct {
	Name             string          `json:"name"`
	MountPath        string          `json:"mountPath"`
	SubPath          string          `json:"subPath"`
	TargetContainers []string        `json:"targetContainers"`
	VolumeSource     v1.VolumeSource `json:"volumeSource"`
}

func (*AdditionalVolume) DeepCopy added in v0.19.0

func (in *AdditionalVolume) DeepCopy() *AdditionalVolume

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalVolume.

func (*AdditionalVolume) DeepCopyInto added in v0.19.0

func (in *AdditionalVolume) DeepCopyInto(out *AdditionalVolume)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CloneConfig

type CloneConfig struct {
	ClusterName string
	ClusterID   string
	Timestamp   string
}

type CloneDescription

type CloneDescription struct {
	ClusterName       string `json:"cluster,omitempty"`
	UID               string `json:"uid,omitempty"`
	EndTimestamp      string `json:"timestamp,omitempty"`
	S3WalPath         string `json:"s3_wal_path,omitempty"`
	S3Endpoint        string `json:"s3_endpoint,omitempty"`
	S3AccessKeyID     string `json:"s3_access_key_id,omitempty"`
	S3SecretAccessKey string `json:"s3_secret_access_key,omitempty"`
	S3ForcePathStyle  *bool  `json:"s3_force_path_style,omitempty" defaults:"false"`
}

CloneDescription describes which cluster the new should clone and up to which point in time

func (*CloneDescription) DeepCopy

func (in *CloneDescription) DeepCopy() *CloneDescription

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloneDescription.

func (*CloneDescription) DeepCopyInto

func (in *CloneDescription) DeepCopyInto(out *CloneDescription)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterConfig

type ClusterConfig struct {
	Name      string
	Databases []string
	Namespace string

	EnableWalArchiving   bool
	EnableWalClusterID   bool
	UseWalgRestore       bool
	BackupSchedule       string
	AwsCredentialsSecret string

	Clone *CloneConfig
}

func NewClusterConfig

func NewClusterConfig(clusterName string, dbNames ...string) ClusterConfig

type ConnectionPooler added in v0.19.0

type ConnectionPooler struct {
	NumberOfInstances *int32 `json:"numberOfInstances,omitempty"`
	Schema            string `json:"schema,omitempty"`
	User              string `json:"user,omitempty"`
	Mode              string `json:"mode,omitempty"`
	DockerImage       string `json:"dockerImage,omitempty"`
	MaxDBConnections  *int32 `json:"maxDBConnections,omitempty"`

	Resources `json:"resources,omitempty"`
}

Options for connection pooler

TODO: prepared snippets of configuration, one can choose via type, e.g. pgbouncer-large (with higher resources) or odyssey-small (with smaller resources) Type string `json:"type,omitempty"`

TODO: figure out what other important parameters of the connection pooler it makes sense to expose. E.g. pool size (min/max boundaries), max client connections etc.

func (*ConnectionPooler) DeepCopy added in v0.19.0

func (in *ConnectionPooler) DeepCopy() *ConnectionPooler

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPooler.

func (*ConnectionPooler) DeepCopyInto added in v0.19.0

func (in *ConnectionPooler) DeepCopyInto(out *ConnectionPooler)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConnectionPoolerConfiguration added in v0.19.0

type ConnectionPoolerConfiguration struct {
	NumberOfInstances    *int32 `json:"connection_pooler_number_of_instances,omitempty"`
	Schema               string `json:"connection_pooler_schema,omitempty"`
	User                 string `json:"connection_pooler_user,omitempty"`
	Image                string `json:"connection_pooler_image,omitempty"`
	Mode                 string `json:"connection_pooler_mode,omitempty"`
	MaxDBConnections     *int32 `json:"connection_pooler_max_db_connections,omitempty"`
	DefaultCPURequest    string `json:"connection_pooler_default_cpu_request,omitempty"`
	DefaultMemoryRequest string `json:"connection_pooler_default_memory_request,omitempty"`
	DefaultCPULimit      string `json:"connection_pooler_default_cpu_limit,omitempty"`
	DefaultMemoryLimit   string `json:"connection_pooler_default_memory_limit,omitempty"`
}

Defines default configuration for connection pooler

func (*ConnectionPoolerConfiguration) DeepCopy added in v0.19.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPoolerConfiguration.

func (*ConnectionPoolerConfiguration) DeepCopyInto added in v0.19.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Duration added in v0.19.0

type Duration time.Duration

Duration shortens this frequently used name

type KubernetesMetaConfiguration

type KubernetesMetaConfiguration struct {
	PodServiceAccountName string `json:"pod_service_account_name,omitempty"`
	// TODO: change it to the proper json
	PodServiceAccountDefinition            string            `json:"pod_service_account_definition,omitempty"`
	PodServiceAccountRoleBindingDefinition string            `json:"pod_service_account_role_binding_definition,omitempty"`
	PodTerminateGracePeriod                Duration          `json:"pod_terminate_grace_period,omitempty"`
	SpiloPrivileged                        bool              `json:"spilo_privileged,omitempty"`
	SpiloFSGroup                           *int64            `json:"spilo_fsgroup,omitempty"`
	WatchedNamespace                       string            `json:"watched_namespace,omitempty"`
	EnablePodDisruptionBudget              *bool             `json:"enable_pod_disruption_budget,omitempty"`
	StorageResizeMode                      string            `json:"storage_resize_mode,omitempty"`
	EnableInitContainers                   *bool             `json:"enable_init_containers,omitempty"`
	EnableSidecars                         *bool             `json:"enable_sidecars,omitempty"`
	ClusterDomain                          string            `json:"cluster_domain,omitempty"`
	PodRoleLabel                           string            `json:"pod_role_label,omitempty"`
	ClusterLabels                          map[string]string `json:"cluster_labels,omitempty"`
	InheritedLabels                        []string          `json:"inherited_labels,omitempty"`
	DownscalerAnnotations                  []string          `json:"downscaler_annotations,omitempty"`
	ClusterNameLabel                       string            `json:"cluster_name_label,omitempty"`
	NodeReadinessLabel                     map[string]string `json:"node_readiness_label,omitempty"`
	CustomPodAnnotations                   map[string]string `json:"custom_pod_annotations,omitempty"`
	// TODO: use a proper toleration structure?
	PodToleration              map[string]string `json:"toleration,omitempty"`
	PodEnvironmentSecret       string            `json:"pod_environment_secret,omitempty"`
	PodPriorityClassName       string            `json:"pod_priority_class_name,omitempty"`
	MasterPodMoveTimeout       Duration          `json:"master_pod_move_timeout,omitempty"`
	EnablePodAntiAffinity      bool              `json:"enable_pod_antiaffinity,omitempty"`
	PodAntiAffinityTopologyKey string            `json:"pod_antiaffinity_topology_key,omitempty"`
	PodManagementPolicy        string            `json:"pod_management_policy,omitempty"`
}

KubernetesMetaConfiguration defines k8s conf required for all Postgres clusters and the operator itself

func (*KubernetesMetaConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesMetaConfiguration.

func (*KubernetesMetaConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LoadBalancerConfiguration

type LoadBalancerConfiguration struct {
	DBHostedZone              string            `json:"db_hosted_zone,omitempty"`
	EnableMasterLoadBalancer  bool              `json:"enable_master_load_balancer,omitempty"`
	EnableReplicaLoadBalancer bool              `json:"enable_replica_load_balancer,omitempty"`
	CustomServiceAnnotations  map[string]string `json:"custom_service_annotations,omitempty"`
}

LoadBalancerConfiguration defines the LB configuration

func (*LoadBalancerConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerConfiguration.

func (*LoadBalancerConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LoggingRESTAPIConfiguration

type LoggingRESTAPIConfiguration struct {
	APIPort               int `json:"api_port,omitempty"`
	RingLogLines          int `json:"ring_log_lines,omitempty"`
	ClusterHistoryEntries int `json:"cluster_history_entries,omitempty"`
}

LoggingRESTAPIConfiguration defines Logging API conf

func (*LoggingRESTAPIConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingRESTAPIConfiguration.

func (*LoggingRESTAPIConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MaintenanceWindow

type MaintenanceWindow struct {
	Everyday  bool
	Weekday   time.Weekday
	StartTime metav1.Time // Start time
	EndTime   metav1.Time // End time
}

MaintenanceWindow describes the time window when the operator is allowed to do maintenance on a cluster.

func (*MaintenanceWindow) DeepCopy

func (in *MaintenanceWindow) DeepCopy() *MaintenanceWindow

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceWindow.

func (*MaintenanceWindow) DeepCopyInto

func (in *MaintenanceWindow) DeepCopyInto(out *MaintenanceWindow)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperatorConfiguration

type OperatorConfiguration struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Configuration OperatorConfigurationData `json:"configuration"`
}

OperatorConfiguration defines the specification for the OperatorConfiguration.

func (*OperatorConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorConfiguration.

func (*OperatorConfiguration) DeepCopyInto

func (in *OperatorConfiguration) DeepCopyInto(out *OperatorConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OperatorConfiguration) DeepCopyObject

func (in *OperatorConfiguration) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type OperatorConfigurationData

type OperatorConfigurationData struct {
	EnableCRDValidation     *bool    `json:"enable_crd_validation,omitempty"`
	EnableLazySpiloUpgrade  bool     `json:"enable_lazy_spilo_upgrade,omitempty"`
	EtcdHost                string   `json:"etcd_host,omitempty"`
	KubernetesUseConfigMaps bool     `json:"kubernetes_use_configmaps,omitempty"`
	DockerImage             string   `json:"docker_image,omitempty"`
	Workers                 uint32   `json:"workers,omitempty"`
	MinInstances            int32    `json:"min_instances,omitempty"`
	MaxInstances            int32    `json:"max_instances,omitempty"`
	ResyncPeriod            Duration `json:"resync_period,omitempty"`
	RepairPeriod            Duration `json:"repair_period,omitempty"`
	SetMemoryRequestToLimit bool     `json:"set_memory_request_to_limit,omitempty"`
	ShmVolume               *bool    `json:"enable_shm_volume,omitempty"`
	// deprecated in favour of SidecarContainers
	SidecarImages              map[string]string                  `json:"sidecar_docker_images,omitempty"`
	SidecarContainers          []v1.Container                     `json:"sidecars,omitempty"`
	PostgresUsersConfiguration PostgresUsersConfiguration         `json:"users"`
	Kubernetes                 KubernetesMetaConfiguration        `json:"kubernetes"`
	PostgresPodResources       PostgresPodResourcesDefaults       `json:"postgres_pod_resources"`
	Timeouts                   OperatorTimeouts                   `json:"timeouts"`
	LoadBalancer               LoadBalancerConfiguration          `json:"load_balancer"`
	AWSGCP                     AWSGCPConfiguration                `json:"aws_or_gcp"`
	OperatorDebug              OperatorDebugConfiguration         `json:"debug"`
	TeamsAPI                   TeamsAPIConfiguration              `json:"teams_api"`
	LoggingRESTAPI             LoggingRESTAPIConfiguration        `json:"logging_rest_api"`
	Scalyr                     ScalyrConfiguration                `json:"scalyr"`
	LogicalBackup              OperatorLogicalBackupConfiguration `json:"logical_backup"`
	ConnectionPooler           ConnectionPoolerConfiguration      `json:"connection_pooler"`
}

OperatorConfigurationData defines the operation config

func (*OperatorConfigurationData) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorConfigurationData.

func (*OperatorConfigurationData) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperatorConfigurationList

type OperatorConfigurationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []OperatorConfiguration `json:"items"`
}

OperatorConfigurationList is used in the k8s API calls

func (*OperatorConfigurationList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorConfigurationList.

func (*OperatorConfigurationList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OperatorConfigurationList) DeepCopyObject

func (in *OperatorConfigurationList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type OperatorDebugConfiguration

type OperatorDebugConfiguration struct {
	DebugLogging   bool `json:"debug_logging,omitempty"`
	EnableDBAccess bool `json:"enable_database_access,omitempty"`
}

OperatorDebugConfiguration defines options for the debug mode

func (*OperatorDebugConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorDebugConfiguration.

func (*OperatorDebugConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperatorLogicalBackupConfiguration

type OperatorLogicalBackupConfiguration struct {
	Schedule          string `json:"logical_backup_schedule,omitempty"`
	DockerImage       string `json:"logical_backup_docker_image,omitempty"`
	S3Bucket          string `json:"logical_backup_s3_bucket,omitempty"`
	S3Region          string `json:"logical_backup_s3_region,omitempty"`
	S3Endpoint        string `json:"logical_backup_s3_endpoint,omitempty"`
	S3AccessKeyID     string `json:"logical_backup_s3_access_key_id,omitempty"`
	S3SecretAccessKey string `json:"logical_backup_s3_secret_access_key,omitempty"`
	S3SSE             string `json:"logical_backup_s3_sse,omitempty"`
}

OperatorLogicalBackupConfiguration defines configuration for logical backup

func (*OperatorLogicalBackupConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorLogicalBackupConfiguration.

func (*OperatorLogicalBackupConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperatorTimeouts

type OperatorTimeouts struct {
	ResourceCheckInterval  Duration `json:"resource_check_interval,omitempty"`
	ResourceCheckTimeout   Duration `json:"resource_check_timeout,omitempty"`
	PodLabelWaitTimeout    Duration `json:"pod_label_wait_timeout,omitempty"`
	PodDeletionWaitTimeout Duration `json:"pod_deletion_wait_timeout,omitempty"`
	ReadyWaitInterval      Duration `json:"ready_wait_interval,omitempty"`
	ReadyWaitTimeout       Duration `json:"ready_wait_timeout,omitempty"`
}

OperatorTimeouts defines the timeout of ResourceCheck, PodWait, ReadyWait

func (*OperatorTimeouts) DeepCopy

func (in *OperatorTimeouts) DeepCopy() *OperatorTimeouts

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorTimeouts.

func (*OperatorTimeouts) DeepCopyInto

func (in *OperatorTimeouts) DeepCopyInto(out *OperatorTimeouts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Patroni

type Patroni struct {
	InitDB                map[string]string            `json:"initdb"`
	PgHba                 []string                     `json:"pg_hba"`
	TTL                   uint32                       `json:"ttl"`
	LoopWait              uint32                       `json:"loop_wait"`
	RetryTimeout          uint32                       `json:"retry_timeout"`
	MaximumLagOnFailover  uint32                       `json:"maximum_lag_on_failover"` // float32 because https://github.com/kubernetes/kubernetes/issues/30213
	Slots                 map[string]map[string]string `json:"slots"`
	SynchronousMode       bool                         `json:"synchronous_mode"`
	SynchronousModeStrict bool                         `json:"synchronous_mode_strict"`
}

Patroni contains Patroni-specific configuration

func (*Patroni) DeepCopy

func (in *Patroni) DeepCopy() *Patroni

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Patroni.

func (*Patroni) DeepCopyInto

func (in *Patroni) DeepCopyInto(out *Patroni)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PostgresPodResourcesDefaults

type PostgresPodResourcesDefaults struct {
	DefaultCPURequest    string `json:"default_cpu_request,omitempty"`
	DefaultMemoryRequest string `json:"default_memory_request,omitempty"`
	DefaultCPULimit      string `json:"default_cpu_limit,omitempty"`
	DefaultMemoryLimit   string `json:"default_memory_limit,omitempty"`
	MinCPULimit          string `json:"min_cpu_limit,omitempty"`
	MinMemoryLimit       string `json:"min_memory_limit,omitempty"`
}

PostgresPodResourcesDefaults defines the spec of default resources nolint: golint

func (*PostgresPodResourcesDefaults) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresPodResourcesDefaults.

func (*PostgresPodResourcesDefaults) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PostgresSpec

type PostgresSpec struct {
	PostgresqlParam `json:"postgresql"`
	Volume          `json:"volume,omitempty"`
	Patroni         `json:"patroni,omitempty"`
	Resources       `json:"resources,omitempty"`

	EnableConnectionPooler *bool             `json:"enableConnectionPooler,omitempty"`
	ConnectionPooler       *ConnectionPooler `json:"connectionPooler,omitempty"`

	TeamID      string `json:"teamId"`
	DockerImage string `json:"dockerImage,omitempty"`

	SpiloFSGroup *int64 `json:"spiloFSGroup,omitempty"`

	// vars that enable load balancers are pointers because it is important to know if any of them is omitted from the Postgres manifest
	// in that case the var evaluates to nil and the value is taken from the operator config
	EnableMasterLoadBalancer  *bool `json:"enableMasterLoadBalancer,omitempty"`
	EnableReplicaLoadBalancer *bool `json:"enableReplicaLoadBalancer,omitempty"`

	// deprecated load balancer settings maintained for backward compatibility
	// see "Load balancers" operator docs
	UseLoadBalancer     *bool `json:"useLoadBalancer,omitempty"`
	ReplicaLoadBalancer *bool `json:"replicaLoadBalancer,omitempty"`

	// load balancers' source ranges are the same for master and replica services
	AllowedSourceRanges []string `json:"allowedSourceRanges"`

	NumberOfInstances     int32                       `json:"numberOfInstances"`
	Users                 map[string]UserFlags        `json:"users"`
	MaintenanceWindows    []MaintenanceWindow         `json:"maintenanceWindows,omitempty"`
	Clone                 *CloneDescription           `json:"clone,omitempty"`
	ClusterName           string                      `json:"-"`
	Databases             map[string]string           `json:"databases,omitempty"`
	PreparedDatabases     map[string]PreparedDatabase `json:"preparedDatabases,omitempty"`
	Tolerations           []v1.Toleration             `json:"tolerations,omitempty"`
	Sidecars              []Sidecar                   `json:"sidecars,omitempty"`
	InitContainers        []v1.Container              `json:"initContainers,omitempty"`
	PodPriorityClassName  string                      `json:"podPriorityClassName,omitempty"`
	ShmVolume             *bool                       `json:"enableShmVolume,omitempty"`
	EnableLogicalBackup   bool                        `json:"enableLogicalBackup,omitempty"`
	LogicalBackupSchedule string                      `json:"logicalBackupSchedule,omitempty"`
	StandbyCluster        *StandbyDescription         `json:"standby,omitempty"`
	PodAnnotations        map[string]string           `json:"podAnnotations"`
	ServiceAnnotations    map[string]string           `json:"serviceAnnotations"`
	TLS                   *TLSDescription             `json:"tls"`
	Env                   []v1.EnvVar                 `json:"env,omitempty"`
	AdditionalVolumes     []AdditionalVolume          `json:"additionalVolumes,omitempty"`

	// deprecated json tags
	InitContainersOld       []v1.Container `json:"init_containers,omitempty"`
	PodPriorityClassNameOld string         `json:"pod_priority_class_name,omitempty"`
}

PostgresSpec defines the specification for the PostgreSQL TPR. nolint: golint

func (*PostgresSpec) DeepCopy

func (in *PostgresSpec) DeepCopy() *PostgresSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresSpec.

func (*PostgresSpec) DeepCopyInto

func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PostgresStatus

type PostgresStatus struct {
	PostgresClusterStatus string `json:"PostgresClusterStatus"`
}

PostgresStatus contains status of the PostgreSQL cluster (running, creation failed etc.) nolint: golint

func (*PostgresStatus) DeepCopy

func (in *PostgresStatus) DeepCopy() *PostgresStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresStatus.

func (*PostgresStatus) DeepCopyInto

func (in *PostgresStatus) DeepCopyInto(out *PostgresStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PostgresUsersConfiguration

type PostgresUsersConfiguration struct {
	SuperUsername       string `json:"super_username,omitempty"`
	ReplicationUsername string `json:"replication_username,omitempty"`
}

PostgresUsersConfiguration defines the system users of Postgres. nolint: golint

func (*PostgresUsersConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresUsersConfiguration.

func (*PostgresUsersConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Postgresql

type Postgresql struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PostgresSpec   `json:"spec"`
	Status PostgresStatus `json:"status"`
	Error  string         `json:"-"`
}

Postgresql defines PostgreSQL Custom Resource Definition Object.

func NewPostgresql

func NewPostgresql(name string) *Postgresql

func (*Postgresql) DeepCopy

func (in *Postgresql) DeepCopy() *Postgresql

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Postgresql.

func (*Postgresql) DeepCopyInto

func (in *Postgresql) DeepCopyInto(out *Postgresql)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Postgresql) DeepCopyObject

func (in *Postgresql) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (Postgresql) GetObjectKind

func (in Postgresql) GetObjectKind() schema.ObjectKind

type PostgresqlList

type PostgresqlList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Postgresql `json:"items"`
}

PostgresqlList defines a list of PostgreSQL clusters.

func (*PostgresqlList) DeepCopy

func (in *PostgresqlList) DeepCopy() *PostgresqlList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresqlList.

func (*PostgresqlList) DeepCopyInto

func (in *PostgresqlList) DeepCopyInto(out *PostgresqlList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PostgresqlList) DeepCopyObject

func (in *PostgresqlList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PostgresqlParam

type PostgresqlParam struct {
	PgVersion  string            `json:"version"`
	Parameters map[string]string `json:"parameters"`
}

PostgresqlParam describes PostgreSQL version and pairs of configuration parameter name - values.

func (*PostgresqlParam) DeepCopy

func (in *PostgresqlParam) DeepCopy() *PostgresqlParam

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresqlParam.

func (*PostgresqlParam) DeepCopyInto

func (in *PostgresqlParam) DeepCopyInto(out *PostgresqlParam)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PreparedDatabase added in v0.19.0

type PreparedDatabase struct {
	PreparedSchemas map[string]PreparedSchema `json:"schemas,omitempty"`
	DefaultUsers    bool                      `json:"defaultUsers,omitempty" defaults:"false"`
	Extensions      map[string]string         `json:"extensions,omitempty"`
}

PreparedDatabase describes elements to be bootstrapped

func (*PreparedDatabase) DeepCopy added in v0.19.0

func (in *PreparedDatabase) DeepCopy() *PreparedDatabase

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreparedDatabase.

func (*PreparedDatabase) DeepCopyInto added in v0.19.0

func (in *PreparedDatabase) DeepCopyInto(out *PreparedDatabase)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PreparedSchema added in v0.19.0

type PreparedSchema struct {
	DefaultRoles *bool `json:"defaultRoles,omitempty" defaults:"true"`
	DefaultUsers bool  `json:"defaultUsers,omitempty" defaults:"false"`
}

PreparedSchema describes elements to be bootstrapped per schema

func (*PreparedSchema) DeepCopy added in v0.19.0

func (in *PreparedSchema) DeepCopy() *PreparedSchema

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreparedSchema.

func (*PreparedSchema) DeepCopyInto added in v0.19.0

func (in *PreparedSchema) DeepCopyInto(out *PreparedSchema)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceDescription

type ResourceDescription struct {
	CPU    string `json:"cpu"`
	Memory string `json:"memory"`
}

ResourceDescription describes CPU and memory resources defined for a cluster.

func (*ResourceDescription) DeepCopy

func (in *ResourceDescription) DeepCopy() *ResourceDescription

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDescription.

func (*ResourceDescription) DeepCopyInto

func (in *ResourceDescription) DeepCopyInto(out *ResourceDescription)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Resources

type Resources struct {
	ResourceRequests ResourceDescription `json:"requests,omitempty"`
	ResourceLimits   ResourceDescription `json:"limits,omitempty"`
}

Resources describes requests and limits for the cluster resouces.

func (*Resources) DeepCopy

func (in *Resources) DeepCopy() *Resources

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resources.

func (*Resources) DeepCopyInto

func (in *Resources) DeepCopyInto(out *Resources)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScalyrConfiguration

type ScalyrConfiguration struct {
	ScalyrAPIKey        string `json:"scalyr_api_key,omitempty"`
	ScalyrImage         string `json:"scalyr_image,omitempty"`
	ScalyrServerURL     string `json:"scalyr_server_url,omitempty"`
	ScalyrCPURequest    string `json:"scalyr_cpu_request,omitempty"`
	ScalyrMemoryRequest string `json:"scalyr_memory_request,omitempty"`
	ScalyrCPULimit      string `json:"scalyr_cpu_limit,omitempty"`
	ScalyrMemoryLimit   string `json:"scalyr_memory_limit,omitempty"`
}

ScalyrConfiguration defines the configuration for ScalyrAPI

func (*ScalyrConfiguration) DeepCopy

func (in *ScalyrConfiguration) DeepCopy() *ScalyrConfiguration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScalyrConfiguration.

func (*ScalyrConfiguration) DeepCopyInto

func (in *ScalyrConfiguration) DeepCopyInto(out *ScalyrConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Sidecar

type Sidecar struct {
	Resources   `json:"resources,omitempty"`
	Name        string             `json:"name,omitempty"`
	DockerImage string             `json:"image,omitempty"`
	Ports       []v1.ContainerPort `json:"ports,omitempty"`
	Env         []v1.EnvVar        `json:"env,omitempty"`
}

Sidecar defines a container to be run in the same pod as the Postgres container.

func (*Sidecar) DeepCopy

func (in *Sidecar) DeepCopy() *Sidecar

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sidecar.

func (*Sidecar) DeepCopyInto

func (in *Sidecar) DeepCopyInto(out *Sidecar)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StandbyDescription

type StandbyDescription struct {
	S3WalPath string `json:"s3_wal_path,omitempty"`
}

StandbyCluster

func (*StandbyDescription) DeepCopy

func (in *StandbyDescription) DeepCopy() *StandbyDescription

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StandbyDescription.

func (*StandbyDescription) DeepCopyInto

func (in *StandbyDescription) DeepCopyInto(out *StandbyDescription)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TLSDescription added in v0.19.0

type TLSDescription struct {
	SecretName      string `json:"secretName,omitempty"`
	CertificateFile string `json:"certificateFile,omitempty"`
	PrivateKeyFile  string `json:"privateKeyFile,omitempty"`
	CAFile          string `json:"caFile,omitempty"`
	CASecretName    string `json:"caSecretName,omitempty"`
}

func (*TLSDescription) DeepCopy added in v0.19.0

func (in *TLSDescription) DeepCopy() *TLSDescription

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSDescription.

func (*TLSDescription) DeepCopyInto added in v0.19.0

func (in *TLSDescription) DeepCopyInto(out *TLSDescription)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TeamsAPIConfiguration

type TeamsAPIConfiguration struct {
	EnableTeamsAPI           bool              `json:"enable_teams_api,omitempty"`
	TeamsAPIUrl              string            `json:"teams_api_url,omitempty"`
	TeamAPIRoleConfiguration map[string]string `json:"team_api_role_configuration,omitempty"`
	EnableTeamSuperuser      bool              `json:"enable_team_superuser,omitempty"`
	EnableAdminRoleForUsers  bool              `json:"enable_admin_role_for_users,omitempty"`
	TeamAdminRole            string            `json:"team_admin_role,omitempty"`
	PamRoleName              string            `json:"pam_role_name,omitempty"`
	PamConfiguration         string            `json:"pam_configuration,omitempty"`
	ProtectedRoles           []string          `json:"protected_role_names,omitempty"`
	PostgresSuperuserTeams   []string          `json:"postgres_superuser_teams,omitempty"`
}

TeamsAPIConfiguration defines the configuration of TeamsAPI

func (*TeamsAPIConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamsAPIConfiguration.

func (*TeamsAPIConfiguration) DeepCopyInto

func (in *TeamsAPIConfiguration) DeepCopyInto(out *TeamsAPIConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UserFlags

type UserFlags []string

UserFlags defines flags (such as superuser, nologin) that could be assigned to individual users

func (UserFlags) DeepCopy

func (in UserFlags) DeepCopy() UserFlags

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserFlags.

func (UserFlags) DeepCopyInto

func (in UserFlags) DeepCopyInto(out *UserFlags)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Volume

type Volume struct {
	Size         string `json:"size"`
	StorageClass string `json:"storageClass"`
	SubPath      string `json:"subPath,omitempty"`
}

Volume describes a single volume in the manifest.

func (*Volume) DeepCopy

func (in *Volume) DeepCopy() *Volume

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume.

func (*Volume) DeepCopyInto

func (in *Volume) DeepCopyInto(out *Volume)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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