bump to v1.10.1 (#2410)

* bump to v1.10.1
This commit is contained in:
Felix Kunde
2023-09-07 22:46:26 +02:00
committed by GitHub
parent 781d17b85c
commit 552bd26c0f
22 changed files with 198 additions and 377 deletions
+21
View File
@@ -676,6 +676,7 @@ func TestConnectionPoolerPodSpec(t *testing.T) {
SuperUsername: superUserName,
ReplicationUsername: replicationUserName,
},
PodServiceAccountName: "postgres-pod",
ConnectionPooler: config.ConnectionPooler{
MaxDBConnections: k8sutil.Int32ToPointer(60),
ConnectionPoolerDefaultCPURequest: "100m",
@@ -725,6 +726,15 @@ func TestConnectionPoolerPodSpec(t *testing.T) {
cluster: cluster,
check: noCheck,
},
{
subTest: "pooler uses pod service account",
spec: &acidv1.PostgresSpec{
ConnectionPooler: &acidv1.ConnectionPooler{},
},
expected: nil,
cluster: cluster,
check: testServiceAccount,
},
{
subTest: "no default resources",
spec: &acidv1.PostgresSpec{
@@ -872,6 +882,17 @@ func TestConnectionPoolerDeploymentSpec(t *testing.T) {
}
}
func testServiceAccount(cluster *Cluster, podSpec *v1.PodTemplateSpec, role PostgresRole) error {
poolerServiceAccount := podSpec.Spec.ServiceAccountName
if poolerServiceAccount != cluster.OpConfig.PodServiceAccountName {
return fmt.Errorf("Pooler service account does not match, got %+v, expected %+v",
poolerServiceAccount, cluster.OpConfig.PodServiceAccountName)
}
return nil
}
func testResources(cluster *Cluster, podSpec *v1.PodTemplateSpec, role PostgresRole) error {
cpuReq := podSpec.Spec.Containers[0].Resources.Requests["cpu"]
if cpuReq.String() != cluster.OpConfig.ConnectionPooler.ConnectionPoolerDefaultCPURequest {
+1 -1
View File
@@ -174,7 +174,7 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur
// logical backup config
result.LogicalBackupSchedule = util.Coalesce(fromCRD.LogicalBackup.Schedule, "30 00 * * *")
result.LogicalBackupDockerImage = util.Coalesce(fromCRD.LogicalBackup.DockerImage, "registry.opensource.zalan.do/acid/logical-backup:v1.10.0")
result.LogicalBackupDockerImage = util.Coalesce(fromCRD.LogicalBackup.DockerImage, "registry.opensource.zalan.do/acid/logical-backup:v1.10.1")
result.LogicalBackupProvider = util.Coalesce(fromCRD.LogicalBackup.BackupProvider, "s3")
result.LogicalBackupAzureStorageAccountName = fromCRD.LogicalBackup.AzureStorageAccountName
result.LogicalBackupAzureStorageAccountKey = fromCRD.LogicalBackup.AzureStorageAccountKey
+1 -1
View File
@@ -126,7 +126,7 @@ type Scalyr struct {
// LogicalBackup defines configuration for logical backup
type LogicalBackup struct {
LogicalBackupSchedule string `name:"logical_backup_schedule" default:"30 00 * * *"`
LogicalBackupDockerImage string `name:"logical_backup_docker_image" default:"registry.opensource.zalan.do/acid/logical-backup:v1.10.0"`
LogicalBackupDockerImage string `name:"logical_backup_docker_image" default:"registry.opensource.zalan.do/acid/logical-backup:v1.10.1"`
LogicalBackupProvider string `name:"logical_backup_provider" default:"s3"`
LogicalBackupAzureStorageAccountName string `name:"logical_backup_azure_storage_account_name" default:""`
LogicalBackupAzureStorageContainer string `name:"logical_backup_azure_storage_container" default:""`