Address review comments

This commit is contained in:
Sergey Dudoladov
2019-01-11 11:40:53 +01:00
parent 64e1640f11
commit 5811175f9f
7 changed files with 24 additions and 30 deletions
@@ -152,8 +152,8 @@ type OperatorConfigurationUsers struct {
type Duration time.Duration
type OperatorLogicalBackupConfiguration struct {
EnableLogicalBackup bool `json:"enable_logical_backup,omitempty"`
LogicalBackupSchedule string `json:"logical_backup_schedule,omitempty"`
LogicalBackupDockerImage string `json:"logical_backup_docker_image,omitempty"`
LogicalBackupS3Bucket string `json:"logical_backup_s3_bucket,omitempty"`
Enable bool `json:"enable_logical_backup,omitempty"`
Schedule string `json:"logical_backup_schedule,omitempty"`
DockerImage string `json:"logical_backup_docker_image,omitempty"`
S3Bucket string `json:"logical_backup_s3_bucket,omitempty"`
}
+4 -7
View File
@@ -25,7 +25,6 @@ type PostgresSpec struct {
Volume `json:"volume,omitempty"`
Patroni `json:"patroni,omitempty"`
Resources `json:"resources,omitempty"`
LogicalBackup `json:"logical_backup,omitempty"`
TeamID string `json:"teamId"`
DockerImage string `json:"dockerImage,omitempty"`
@@ -53,6 +52,10 @@ type PostgresSpec struct {
Sidecars []Sidecar `json:"sidecars,omitempty"`
PodPriorityClassName string `json:"pod_priority_class_name,omitempty"`
ShmVolume *bool `json:"enableShmVolume,omitempty"`
// LogicalBackup contains config of a k8s cron job responsible for running pg_dumpall
EnableLogicalBackup bool `json:"enableLogicalBackup,omitempty"`
LogicalBackupSchedule string `json:"logicalBackupSchedule,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -128,9 +131,3 @@ type UserFlags []string
// PostgresStatus contains status of the PostgreSQL cluster (running, creation failed etc.)
type PostgresStatus string
// LogicalBackup contains config of a k8s cron job responsible for running pg_dumpall
type LogicalBackup struct {
EnableLogicalBackup bool `json:"enable_logical_backup,omitempty"`
LogicalBackupSchedule string `json:"logical_backup_schedule,omitempty"`
}
+4 -4
View File
@@ -97,10 +97,10 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur
result.ScalyrCPULimit = fromCRD.Scalyr.ScalyrCPULimit
result.ScalyrMemoryLimit = fromCRD.Scalyr.ScalyrMemoryLimit
result.EnableLogicalBackup = fromCRD.LogicalBackup.EnableLogicalBackup
result.LogicalBackupSchedule = fromCRD.LogicalBackup.LogicalBackupSchedule
result.LogicalBackupDockerImage = fromCRD.LogicalBackup.LogicalBackupDockerImage
result.LogicalBackupS3Bucket = fromCRD.LogicalBackup.LogicalBackupS3Bucket
result.EnableLogicalBackup = fromCRD.LogicalBackup.Enable
result.LogicalBackupSchedule = fromCRD.LogicalBackup.Schedule
result.LogicalBackupDockerImage = fromCRD.LogicalBackup.DockerImage
result.LogicalBackupS3Bucket = fromCRD.LogicalBackup.S3Bucket
return result
}