diff --git a/pkg/cluster/util.go b/pkg/cluster/util.go index a3c0f5676..4350f9d56 100644 --- a/pkg/cluster/util.go +++ b/pkg/cluster/util.go @@ -227,9 +227,7 @@ func (c *Cluster) logServiceChanges(role PostgresRole, old, new *v1.Service, isU } } -func getPostgresContainer(podSpec *v1.PodSpec) v1.Container { - var pgContainer v1.Container - +func getPostgresContainer(podSpec *v1.PodSpec) (pgContainer v1.Container) { for _, container := range podSpec.Containers { if container.Name == constants.PostgresContainerName { pgContainer = container