mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-05 19:29:40 +02:00
Address feedback
Rename application for connection pool (ideally in the future make it configurable). Take into accounts nils for MaxInt32
This commit is contained in:
+1
-1
@@ -424,7 +424,7 @@ func (c *Cluster) connPoolLabelsSelector() *metav1.LabelSelector {
|
||||
|
||||
extraLabels := labels.Set(map[string]string{
|
||||
"connection-pool": c.connPoolName(),
|
||||
"application": "connection-pool",
|
||||
"application": "db-connection-pool",
|
||||
})
|
||||
|
||||
connPoolLabels = labels.Merge(connPoolLabels, c.labelsSet(false))
|
||||
|
||||
@@ -149,7 +149,22 @@ func CoalesceInt32(val, defaultVal *int32) *int32 {
|
||||
return val
|
||||
}
|
||||
|
||||
// Return maximum of two integers provided via pointers. If one value is not
|
||||
// defined, return the other one. If both are not defined, result is also
|
||||
// undefined, caller needs to check for that.
|
||||
func MaxInt32(a, b *int32) *int32 {
|
||||
if a == nil && b == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if a == nil {
|
||||
return b
|
||||
}
|
||||
|
||||
if b == nil {
|
||||
return a
|
||||
}
|
||||
|
||||
if *a > *b {
|
||||
return a
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user