Documentation
¶
Overview ¶
+kubebuilder:skip
Index ¶
- type AdditionalVolume
- type CloneDescription
- type ConnectionPooler
- type MaintenanceWindow
- type Patroni
- type PostgresSpec
- type PostgresStatus
- type Postgresql
- type PostgresqlList
- type PostgresqlParam
- type PreparedDatabase
- type PreparedSchema
- type ResourceDescription
- type Resources
- type Sidecar
- type StandbyDescription
- type TLSDescription
- type UserFlags
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalVolume ¶
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 ¶
func (in *AdditionalVolume) DeepCopy() *AdditionalVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalVolume.
func (*AdditionalVolume) DeepCopyInto ¶
func (in *AdditionalVolume) DeepCopyInto(out *AdditionalVolume)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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.
type ConnectionPooler ¶
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 ¶
func (in *ConnectionPooler) DeepCopy() *ConnectionPooler
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPooler.
func (*ConnectionPooler) DeepCopyInto ¶
func (in *ConnectionPooler) DeepCopyInto(out *ConnectionPooler)
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 PostgresSpec ¶
type PostgresSpec struct {
PostgresqlParam `json:"postgresql"`
Volume `json:"volume,omitempty"`
Patroni `json:"patroni,omitempty"`
Resources `json:"resources,omitempty"`
ConnectionPooler *ConnectionPooler `json:"connectionPooler,omitempty"`
TeamID string `json:"teamId"`
DockerImage string `json:"dockerImage,omitempty"`
SpiloFSGroup *int64 `json:"spiloFSGroup,omitempty"`
EnableConnectionPooler *bool `json:"enableConnectionPooler,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"`
ShmVolume *bool `json:"enableShmVolume,omitempty"`
EnableLogicalBackup bool `json:"enableLogicalBackup,omitempty"`
NumberOfInstances int32 `json:"numberOfInstances"`
Users map[string]UserFlags `json:"users"`
MaintenanceWindows []MaintenanceWindow `json:"maintenanceWindows,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"`
LogicalBackupSchedule string `json:"logicalBackupSchedule,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.
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.).
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 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 (*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.
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,omitempty"`
}
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 ¶
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 ¶
func (in *PreparedDatabase) DeepCopy() *PreparedDatabase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreparedDatabase.
func (*PreparedDatabase) DeepCopyInto ¶
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 ¶
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 ¶
func (in *PreparedSchema) DeepCopy() *PreparedSchema
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreparedSchema.
func (*PreparedSchema) DeepCopyInto ¶
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 ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resources.
func (*Resources) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sidecar.
func (*Sidecar) DeepCopyInto ¶
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"`
}
StandbyDescription...
type TLSDescription ¶
type UserFlags ¶
type UserFlags []string
UserFlags defines flags (such as superuser, nologin) that could be assigned to individual users.
func (UserFlags) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserFlags.
func (UserFlags) DeepCopyInto ¶
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,omitempty"`
SubPath string `json:"subPath,omitempty"`
}
Volume describes a single volume in the manifest.
func (*Volume) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume.
func (*Volume) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.