Skip to content

Commit c908a52

Browse files
dsessler7cbandy
andcommitted
Update internal/pgbackrest/config.go
Co-authored-by: Chris Bandy <bandy.chris@gmail.com>
1 parent 067c3d2 commit c908a52

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

internal/pgbackrest/config.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -472,12 +472,8 @@ func serverConfig(cluster *v1beta1.PostgresCluster) iniSectionSet {
472472
// going to workaround the issue by allowing the user to add an annotation to
473473
// enable IPv6. We will check for that annotation here and override the
474474
// "tls-server-address" setting accordingly.
475-
annotations := cluster.GetAnnotations()
476-
if annotations != nil {
477-
if ipVersion, exists := annotations[naming.PGBackRestIPVersion]; exists &&
478-
strings.ToLower(ipVersion) == "ipv6" {
479-
global.Set("tls-server-address", "::")
480-
}
475+
if strings.ToLower(cluster.Annotations[naming.PGBackRestIPVersion]) == "ipv6" {
476+
global.Set("tls-server-address", "::")
481477
}
482478

483479
// The client certificate for this cluster is allowed to connect for any stanza.

0 commit comments

Comments
 (0)