• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zalando / postgres-operator / 17042710574

18 Aug 2025 01:55PM UTC coverage: 42.062% (-3.4%) from 45.498%
17042710574

Pull #2943

github

web-flow
Merge 045132513 into 51135b07d
Pull Request #2943: Ensure compatibility with Spilo after WAL-E removal (support old and new versions)

14 of 15 new or added lines in 3 files covered. (93.33%)

531 existing lines in 13 files now uncovered.

6494 of 15439 relevant lines covered (42.06%)

15.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pkg/controller/operator_config.go
1
package controller
2

3
import (
4
        "context"
5
        "fmt"
6

7
        "time"
8

9
        acidv1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1"
10
        "github.com/zalando/postgres-operator/pkg/util"
11
        "github.com/zalando/postgres-operator/pkg/util/config"
12
        "github.com/zalando/postgres-operator/pkg/util/constants"
13
        "github.com/zalando/postgres-operator/pkg/util/k8sutil"
14
        metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
15
)
16

17
func (c *Controller) readOperatorConfigurationFromCRD(configObjectNamespace, configObjectName string) (*acidv1.OperatorConfiguration, error) {
×
18

×
19
        config, err := c.KubeClient.OperatorConfigurationsGetter.OperatorConfigurations(configObjectNamespace).Get(
×
20
                context.TODO(), configObjectName, metav1.GetOptions{})
×
21
        if err != nil {
×
22
                return nil, fmt.Errorf("could not get operator configuration object %q: %v", configObjectName, err)
×
23
        }
×
24

25
        return config, nil
×
26
}
27

28
// importConfigurationFromCRD is a transitional function that converts CRD configuration to the one based on the configmap
29
func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigurationData) *config.Config {
×
30
        result := &config.Config{}
×
31

×
32
        // general config
×
33
        result.EnableCRDRegistration = util.CoalesceBool(fromCRD.EnableCRDRegistration, util.True())
×
34
        result.EnableCRDValidation = util.CoalesceBool(fromCRD.EnableCRDValidation, util.True())
×
35
        result.CRDCategories = util.CoalesceStrArr(fromCRD.CRDCategories, []string{"all"})
×
36
        result.EnableLazySpiloUpgrade = fromCRD.EnableLazySpiloUpgrade
×
37
        result.EnablePgVersionEnvVar = fromCRD.EnablePgVersionEnvVar
×
38
        result.EnableSpiloWalPathCompat = fromCRD.EnableSpiloWalPathCompat
×
39
        result.EnableTeamIdClusternamePrefix = fromCRD.EnableTeamIdClusternamePrefix
×
40
        result.EtcdHost = fromCRD.EtcdHost
×
41
        result.KubernetesUseConfigMaps = fromCRD.KubernetesUseConfigMaps
×
42
        result.DockerImage = util.Coalesce(fromCRD.DockerImage, "ghcr.io/zalando/spilo-17:4.0-p2")
×
43
        result.Workers = util.CoalesceUInt32(fromCRD.Workers, 8)
×
44
        result.MinInstances = fromCRD.MinInstances
×
45
        result.MaxInstances = fromCRD.MaxInstances
×
46
        result.IgnoreInstanceLimitsAnnotationKey = fromCRD.IgnoreInstanceLimitsAnnotationKey
×
47
        result.ResyncPeriod = util.CoalesceDuration(time.Duration(fromCRD.ResyncPeriod), "30m")
×
48
        result.RepairPeriod = util.CoalesceDuration(time.Duration(fromCRD.RepairPeriod), "5m")
×
49
        result.SetMemoryRequestToLimit = fromCRD.SetMemoryRequestToLimit
×
50
        result.ShmVolume = util.CoalesceBool(fromCRD.ShmVolume, util.True())
×
51
        result.SidecarImages = fromCRD.SidecarImages
×
52
        result.SidecarContainers = fromCRD.SidecarContainers
×
53

×
54
        // user config
×
55
        result.SuperUsername = util.Coalesce(fromCRD.PostgresUsersConfiguration.SuperUsername, "postgres")
×
56
        result.ReplicationUsername = util.Coalesce(fromCRD.PostgresUsersConfiguration.ReplicationUsername, "standby")
×
57
        result.AdditionalOwnerRoles = fromCRD.PostgresUsersConfiguration.AdditionalOwnerRoles
×
58
        result.EnablePasswordRotation = fromCRD.PostgresUsersConfiguration.EnablePasswordRotation
×
59
        result.PasswordRotationInterval = util.CoalesceUInt32(fromCRD.PostgresUsersConfiguration.PasswordRotationInterval, 90)
×
60
        result.PasswordRotationUserRetention = util.CoalesceUInt32(fromCRD.PostgresUsersConfiguration.DeepCopy().PasswordRotationUserRetention, 180)
×
61

×
62
        // major version upgrade config
×
63
        result.MajorVersionUpgradeMode = util.Coalesce(fromCRD.MajorVersionUpgrade.MajorVersionUpgradeMode, "manual")
×
64
        result.MajorVersionUpgradeTeamAllowList = fromCRD.MajorVersionUpgrade.MajorVersionUpgradeTeamAllowList
×
65
        result.MinimalMajorVersion = util.Coalesce(fromCRD.MajorVersionUpgrade.MinimalMajorVersion, "13")
×
66
        result.TargetMajorVersion = util.Coalesce(fromCRD.MajorVersionUpgrade.TargetMajorVersion, "17")
×
67

×
68
        // kubernetes config
×
69
        result.EnableOwnerReferences = util.CoalesceBool(fromCRD.Kubernetes.EnableOwnerReferences, util.False())
×
70
        result.CustomPodAnnotations = fromCRD.Kubernetes.CustomPodAnnotations
×
71
        result.PodServiceAccountName = util.Coalesce(fromCRD.Kubernetes.PodServiceAccountName, "postgres-pod")
×
72
        result.PodServiceAccountDefinition = fromCRD.Kubernetes.PodServiceAccountDefinition
×
73
        result.PodServiceAccountRoleBindingDefinition = fromCRD.Kubernetes.PodServiceAccountRoleBindingDefinition
×
74
        result.PodEnvironmentConfigMap = fromCRD.Kubernetes.PodEnvironmentConfigMap
×
75
        result.PodEnvironmentSecret = fromCRD.Kubernetes.PodEnvironmentSecret
×
76
        result.PodTerminateGracePeriod = util.CoalesceDuration(time.Duration(fromCRD.Kubernetes.PodTerminateGracePeriod), "5m")
×
77
        result.SpiloPrivileged = fromCRD.Kubernetes.SpiloPrivileged
×
78
        result.SpiloAllowPrivilegeEscalation = util.CoalesceBool(fromCRD.Kubernetes.SpiloAllowPrivilegeEscalation, util.True())
×
79
        result.SpiloRunAsUser = fromCRD.Kubernetes.SpiloRunAsUser
×
80
        result.SpiloRunAsGroup = fromCRD.Kubernetes.SpiloRunAsGroup
×
81
        result.SpiloFSGroup = fromCRD.Kubernetes.SpiloFSGroup
×
82
        result.AdditionalPodCapabilities = fromCRD.Kubernetes.AdditionalPodCapabilities
×
83
        result.ClusterDomain = util.Coalesce(fromCRD.Kubernetes.ClusterDomain, "cluster.local")
×
84
        result.WatchedNamespace = fromCRD.Kubernetes.WatchedNamespace
×
85
        result.PDBNameFormat = fromCRD.Kubernetes.PDBNameFormat
×
86
        result.PDBMasterLabelSelector = util.CoalesceBool(fromCRD.Kubernetes.PDBMasterLabelSelector, util.True())
×
87
        result.EnablePodDisruptionBudget = util.CoalesceBool(fromCRD.Kubernetes.EnablePodDisruptionBudget, util.True())
×
88
        result.StorageResizeMode = util.Coalesce(fromCRD.Kubernetes.StorageResizeMode, "pvc")
×
89
        result.EnableInitContainers = util.CoalesceBool(fromCRD.Kubernetes.EnableInitContainers, util.True())
×
90
        result.EnableSidecars = util.CoalesceBool(fromCRD.Kubernetes.EnableSidecars, util.True())
×
91
        result.SharePgSocketWithSidecars = util.CoalesceBool(fromCRD.Kubernetes.SharePgSocketWithSidecars, util.False())
×
92
        result.SecretNameTemplate = fromCRD.Kubernetes.SecretNameTemplate
×
93
        result.OAuthTokenSecretName = fromCRD.Kubernetes.OAuthTokenSecretName
×
94
        result.EnableCrossNamespaceSecret = fromCRD.Kubernetes.EnableCrossNamespaceSecret
×
95
        result.EnableFinalizers = util.CoalesceBool(fromCRD.Kubernetes.EnableFinalizers, util.False())
×
96

×
97
        result.InfrastructureRolesSecretName = fromCRD.Kubernetes.InfrastructureRolesSecretName
×
98
        if fromCRD.Kubernetes.InfrastructureRolesDefs != nil {
×
99
                result.InfrastructureRoles = []*config.InfrastructureRole{}
×
100
                for _, secret := range fromCRD.Kubernetes.InfrastructureRolesDefs {
×
101
                        result.InfrastructureRoles = append(
×
102
                                result.InfrastructureRoles,
×
103
                                &config.InfrastructureRole{
×
104
                                        SecretName:  secret.SecretName,
×
105
                                        UserKey:     secret.UserKey,
×
106
                                        RoleKey:     secret.RoleKey,
×
107
                                        PasswordKey: secret.PasswordKey,
×
108
                                })
×
109
                }
×
110
        }
111

112
        result.PodRoleLabel = util.Coalesce(fromCRD.Kubernetes.PodRoleLabel, "spilo-role")
×
113
        result.ClusterLabels = util.CoalesceStrMap(fromCRD.Kubernetes.ClusterLabels, map[string]string{"application": "spilo"})
×
114
        result.InheritedLabels = fromCRD.Kubernetes.InheritedLabels
×
115
        result.InheritedAnnotations = fromCRD.Kubernetes.InheritedAnnotations
×
116
        result.DownscalerAnnotations = fromCRD.Kubernetes.DownscalerAnnotations
×
117
        result.IgnoredAnnotations = fromCRD.Kubernetes.IgnoredAnnotations
×
118
        result.ClusterNameLabel = util.Coalesce(fromCRD.Kubernetes.ClusterNameLabel, "cluster-name")
×
119
        result.DeleteAnnotationDateKey = fromCRD.Kubernetes.DeleteAnnotationDateKey
×
120
        result.DeleteAnnotationNameKey = fromCRD.Kubernetes.DeleteAnnotationNameKey
×
121
        result.NodeReadinessLabel = fromCRD.Kubernetes.NodeReadinessLabel
×
122
        result.NodeReadinessLabelMerge = fromCRD.Kubernetes.NodeReadinessLabelMerge
×
123
        result.PodPriorityClassName = fromCRD.Kubernetes.PodPriorityClassName
×
124
        result.PodManagementPolicy = util.Coalesce(fromCRD.Kubernetes.PodManagementPolicy, "ordered_ready")
×
125
        result.PersistentVolumeClaimRetentionPolicy = fromCRD.Kubernetes.PersistentVolumeClaimRetentionPolicy
×
126
        result.EnableSecretsDeletion = util.CoalesceBool(fromCRD.Kubernetes.EnableSecretsDeletion, util.True())
×
127
        result.EnablePersistentVolumeClaimDeletion = util.CoalesceBool(fromCRD.Kubernetes.EnablePersistentVolumeClaimDeletion, util.True())
×
128
        result.EnableReadinessProbe = fromCRD.Kubernetes.EnableReadinessProbe
×
129
        result.MasterPodMoveTimeout = util.CoalesceDuration(time.Duration(fromCRD.Kubernetes.MasterPodMoveTimeout), "10m")
×
130
        result.EnablePodAntiAffinity = fromCRD.Kubernetes.EnablePodAntiAffinity
×
131
        result.PodAntiAffinityTopologyKey = util.Coalesce(fromCRD.Kubernetes.PodAntiAffinityTopologyKey, "kubernetes.io/hostname")
×
132
        result.PodAntiAffinityPreferredDuringScheduling = fromCRD.Kubernetes.PodAntiAffinityPreferredDuringScheduling
×
133
        result.PodToleration = fromCRD.Kubernetes.PodToleration
×
134

×
135
        // Postgres Pod resources
×
136
        result.DefaultCPURequest = fromCRD.PostgresPodResources.DefaultCPURequest
×
137
        result.DefaultMemoryRequest = fromCRD.PostgresPodResources.DefaultMemoryRequest
×
138
        result.DefaultCPULimit = fromCRD.PostgresPodResources.DefaultCPULimit
×
139
        result.DefaultMemoryLimit = fromCRD.PostgresPodResources.DefaultMemoryLimit
×
140
        result.MinCPULimit = fromCRD.PostgresPodResources.MinCPULimit
×
141
        result.MinMemoryLimit = fromCRD.PostgresPodResources.MinMemoryLimit
×
142
        result.MaxCPURequest = fromCRD.PostgresPodResources.MaxCPURequest
×
143
        result.MaxMemoryRequest = fromCRD.PostgresPodResources.MaxMemoryRequest
×
144

×
145
        // timeout config
×
146
        result.ResourceCheckInterval = util.CoalesceDuration(time.Duration(fromCRD.Timeouts.ResourceCheckInterval), "3s")
×
147
        result.ResourceCheckTimeout = util.CoalesceDuration(time.Duration(fromCRD.Timeouts.ResourceCheckTimeout), "10m")
×
148
        result.PodLabelWaitTimeout = util.CoalesceDuration(time.Duration(fromCRD.Timeouts.PodLabelWaitTimeout), "10m")
×
149
        result.PodDeletionWaitTimeout = util.CoalesceDuration(time.Duration(fromCRD.Timeouts.PodDeletionWaitTimeout), "10m")
×
150
        result.ReadyWaitInterval = util.CoalesceDuration(time.Duration(fromCRD.Timeouts.ReadyWaitInterval), "4s")
×
151
        result.ReadyWaitTimeout = util.CoalesceDuration(time.Duration(fromCRD.Timeouts.ReadyWaitTimeout), "30s")
×
152
        result.PatroniAPICheckInterval = util.CoalesceDuration(time.Duration(fromCRD.Timeouts.PatroniAPICheckInterval), "1s")
×
153
        result.PatroniAPICheckTimeout = util.CoalesceDuration(time.Duration(fromCRD.Timeouts.PatroniAPICheckTimeout), "5s")
×
154

×
155
        // load balancer config
×
156
        result.DbHostedZone = util.Coalesce(fromCRD.LoadBalancer.DbHostedZone, "db.example.com")
×
157
        result.EnableMasterLoadBalancer = fromCRD.LoadBalancer.EnableMasterLoadBalancer
×
158
        result.EnableMasterPoolerLoadBalancer = fromCRD.LoadBalancer.EnableMasterPoolerLoadBalancer
×
159
        result.EnableReplicaLoadBalancer = fromCRD.LoadBalancer.EnableReplicaLoadBalancer
×
160
        result.EnableReplicaPoolerLoadBalancer = fromCRD.LoadBalancer.EnableReplicaPoolerLoadBalancer
×
161
        result.CustomServiceAnnotations = fromCRD.LoadBalancer.CustomServiceAnnotations
×
162
        result.MasterDNSNameFormat = fromCRD.LoadBalancer.MasterDNSNameFormat
×
163
        result.MasterLegacyDNSNameFormat = fromCRD.LoadBalancer.MasterLegacyDNSNameFormat
×
164
        result.ReplicaDNSNameFormat = fromCRD.LoadBalancer.ReplicaDNSNameFormat
×
165
        result.ReplicaLegacyDNSNameFormat = fromCRD.LoadBalancer.ReplicaLegacyDNSNameFormat
×
166
        result.ExternalTrafficPolicy = util.Coalesce(fromCRD.LoadBalancer.ExternalTrafficPolicy, "Cluster")
×
167

×
168
        // AWS or GCP config
×
NEW
169
        result.WALS3Bucket = fromCRD.AWSGCP.WALS3Bucket
×
170
        result.AWSRegion = fromCRD.AWSGCP.AWSRegion
×
171
        result.LogS3Bucket = fromCRD.AWSGCP.LogS3Bucket
×
172
        result.KubeIAMRole = fromCRD.AWSGCP.KubeIAMRole
×
173
        result.WALGSBucket = fromCRD.AWSGCP.WALGSBucket
×
174
        result.GCPCredentials = fromCRD.AWSGCP.GCPCredentials
×
175
        result.WALAZStorageAccount = fromCRD.AWSGCP.WALAZStorageAccount
×
176
        result.AdditionalSecretMount = fromCRD.AWSGCP.AdditionalSecretMount
×
177
        result.AdditionalSecretMountPath = fromCRD.AWSGCP.AdditionalSecretMountPath
×
178
        result.EnableEBSGp3Migration = fromCRD.AWSGCP.EnableEBSGp3Migration
×
179
        result.EnableEBSGp3MigrationMaxSize = util.CoalesceInt64(fromCRD.AWSGCP.EnableEBSGp3MigrationMaxSize, 1000)
×
180

×
181
        // logical backup config
×
182
        result.LogicalBackupSchedule = util.Coalesce(fromCRD.LogicalBackup.Schedule, "30 00 * * *")
×
183
        result.LogicalBackupDockerImage = util.Coalesce(fromCRD.LogicalBackup.DockerImage, "ghcr.io/zalando/postgres-operator/logical-backup:v1.14.0")
×
184
        result.LogicalBackupProvider = util.Coalesce(fromCRD.LogicalBackup.BackupProvider, "s3")
×
185
        result.LogicalBackupAzureStorageAccountName = fromCRD.LogicalBackup.AzureStorageAccountName
×
186
        result.LogicalBackupAzureStorageAccountKey = fromCRD.LogicalBackup.AzureStorageAccountKey
×
187
        result.LogicalBackupAzureStorageContainer = fromCRD.LogicalBackup.AzureStorageContainer
×
188
        result.LogicalBackupS3Bucket = fromCRD.LogicalBackup.S3Bucket
×
189
        result.LogicalBackupS3BucketPrefix = util.Coalesce(fromCRD.LogicalBackup.S3BucketPrefix, "spilo")
×
190
        result.LogicalBackupS3Region = fromCRD.LogicalBackup.S3Region
×
191
        result.LogicalBackupS3Endpoint = fromCRD.LogicalBackup.S3Endpoint
×
192
        result.LogicalBackupS3AccessKeyID = fromCRD.LogicalBackup.S3AccessKeyID
×
193
        result.LogicalBackupS3SecretAccessKey = fromCRD.LogicalBackup.S3SecretAccessKey
×
194
        result.LogicalBackupS3SSE = fromCRD.LogicalBackup.S3SSE
×
195
        result.LogicalBackupS3RetentionTime = fromCRD.LogicalBackup.RetentionTime
×
196
        result.LogicalBackupGoogleApplicationCredentials = fromCRD.LogicalBackup.GoogleApplicationCredentials
×
197
        result.LogicalBackupJobPrefix = util.Coalesce(fromCRD.LogicalBackup.JobPrefix, "logical-backup-")
×
198
        result.LogicalBackupCronjobEnvironmentSecret = fromCRD.LogicalBackup.CronjobEnvironmentSecret
×
199
        result.LogicalBackupCPURequest = fromCRD.LogicalBackup.CPURequest
×
200
        result.LogicalBackupMemoryRequest = fromCRD.LogicalBackup.MemoryRequest
×
201
        result.LogicalBackupCPULimit = fromCRD.LogicalBackup.CPULimit
×
202
        result.LogicalBackupMemoryLimit = fromCRD.LogicalBackup.MemoryLimit
×
203

×
204
        // debug config
×
205
        result.DebugLogging = fromCRD.OperatorDebug.DebugLogging
×
206
        result.EnableDBAccess = fromCRD.OperatorDebug.EnableDBAccess
×
207

×
208
        // Teams API config
×
209
        result.EnableTeamsAPI = fromCRD.TeamsAPI.EnableTeamsAPI
×
210
        result.TeamsAPIUrl = util.Coalesce(fromCRD.TeamsAPI.TeamsAPIUrl, "https://teams.example.com/api/")
×
211
        result.TeamAPIRoleConfiguration = util.CoalesceStrMap(fromCRD.TeamsAPI.TeamAPIRoleConfiguration, map[string]string{"log_statement": "all"})
×
212
        result.EnableTeamSuperuser = fromCRD.TeamsAPI.EnableTeamSuperuser
×
213
        result.EnableAdminRoleForUsers = fromCRD.TeamsAPI.EnableAdminRoleForUsers
×
214
        result.TeamAdminRole = fromCRD.TeamsAPI.TeamAdminRole
×
215
        result.PamRoleName = util.Coalesce(fromCRD.TeamsAPI.PamRoleName, "zalandos")
×
216
        result.PamConfiguration = util.Coalesce(fromCRD.TeamsAPI.PamConfiguration, "https://info.example.com/oauth2/tokeninfo?access_token= uid realm=/employees")
×
217
        result.ProtectedRoles = util.CoalesceStrArr(fromCRD.TeamsAPI.ProtectedRoles, []string{"admin", "cron_admin"})
×
218
        result.PostgresSuperuserTeams = fromCRD.TeamsAPI.PostgresSuperuserTeams
×
219
        result.EnablePostgresTeamCRD = fromCRD.TeamsAPI.EnablePostgresTeamCRD
×
220
        result.EnablePostgresTeamCRDSuperusers = fromCRD.TeamsAPI.EnablePostgresTeamCRDSuperusers
×
221
        result.EnableTeamMemberDeprecation = fromCRD.TeamsAPI.EnableTeamMemberDeprecation
×
222
        result.RoleDeletionSuffix = util.Coalesce(fromCRD.TeamsAPI.RoleDeletionSuffix, "_deleted")
×
223

×
224
        // logging REST API config
×
225
        result.APIPort = util.CoalesceInt(fromCRD.LoggingRESTAPI.APIPort, 8080)
×
226
        result.RingLogLines = util.CoalesceInt(fromCRD.LoggingRESTAPI.RingLogLines, 100)
×
227
        result.ClusterHistoryEntries = util.CoalesceInt(fromCRD.LoggingRESTAPI.ClusterHistoryEntries, 1000)
×
228

×
229
        // Scalyr config
×
230
        result.ScalyrAPIKey = fromCRD.Scalyr.ScalyrAPIKey
×
231
        result.ScalyrImage = fromCRD.Scalyr.ScalyrImage
×
232
        result.ScalyrServerURL = fromCRD.Scalyr.ScalyrServerURL
×
233
        result.ScalyrCPURequest = fromCRD.Scalyr.ScalyrCPURequest
×
234
        result.ScalyrMemoryRequest = fromCRD.Scalyr.ScalyrMemoryRequest
×
235
        result.ScalyrCPULimit = fromCRD.Scalyr.ScalyrCPULimit
×
236
        result.ScalyrMemoryLimit = fromCRD.Scalyr.ScalyrMemoryLimit
×
237

×
238
        // Patroni config
×
239
        result.EnablePatroniFailsafeMode = util.CoalesceBool(fromCRD.Patroni.FailsafeMode, util.False())
×
240

×
241
        // Connection pooler. Looks like we can't use defaulting in CRD before 1.17,
×
242
        // so ensure default values here.
×
243
        result.ConnectionPooler.NumberOfInstances = util.CoalesceInt32(
×
244
                fromCRD.ConnectionPooler.NumberOfInstances,
×
245
                k8sutil.Int32ToPointer(2))
×
246

×
247
        result.ConnectionPooler.NumberOfInstances = util.MaxInt32(
×
248
                result.ConnectionPooler.NumberOfInstances,
×
249
                k8sutil.Int32ToPointer(2))
×
250

×
251
        result.ConnectionPooler.Schema = util.Coalesce(
×
252
                fromCRD.ConnectionPooler.Schema,
×
253
                constants.ConnectionPoolerSchemaName)
×
254

×
255
        result.ConnectionPooler.User = util.Coalesce(
×
256
                fromCRD.ConnectionPooler.User,
×
257
                constants.ConnectionPoolerUserName)
×
258

×
259
        if result.ConnectionPooler.User == result.SuperUsername {
×
260
                msg := "connection pool user is not allowed to be the same as super user, username: %s"
×
261
                panic(fmt.Errorf(msg, result.ConnectionPooler.User))
×
262
        }
263

264
        result.ConnectionPooler.Image = util.Coalesce(
×
265
                fromCRD.ConnectionPooler.Image,
×
266
                "registry.opensource.zalan.do/acid/pgbouncer")
×
267

×
268
        result.ConnectionPooler.Mode = util.Coalesce(
×
269
                fromCRD.ConnectionPooler.Mode,
×
270
                constants.ConnectionPoolerDefaultMode)
×
271

×
272
        result.ConnectionPooler.ConnectionPoolerDefaultCPURequest = fromCRD.ConnectionPooler.DefaultCPURequest
×
273
        result.ConnectionPooler.ConnectionPoolerDefaultMemoryRequest = fromCRD.ConnectionPooler.DefaultMemoryRequest
×
274
        result.ConnectionPooler.ConnectionPoolerDefaultCPULimit = fromCRD.ConnectionPooler.DefaultCPULimit
×
275
        result.ConnectionPooler.ConnectionPoolerDefaultMemoryLimit = fromCRD.ConnectionPooler.DefaultMemoryLimit
×
276

×
277
        result.ConnectionPooler.MaxDBConnections = util.CoalesceInt32(
×
278
                fromCRD.ConnectionPooler.MaxDBConnections,
×
279
                k8sutil.Int32ToPointer(constants.ConnectionPoolerMaxDBConnections))
×
280

×
281
        return result
×
282
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc