intermediate garbage

This commit is contained in:
Felix Kunde
2021-02-09 11:00:52 +01:00
parent e6db1892dc
commit cf67d610dd
4 changed files with 56 additions and 36 deletions
+1 -2
View File
@@ -332,8 +332,7 @@ func (c *Controller) initController() {
if c.opConfig.EnablePostgresTeamCRD {
c.loadPostgresTeams()
} else {
teamMap := make(teams.PostgresTeamMap, 0)
c.pgTeamMap = &teamMap
c.pgTeamMap.Reset()
}
if c.opConfig.DebugLogging {
+1 -3
View File
@@ -15,7 +15,6 @@ import (
acidv1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1"
"github.com/zalando/postgres-operator/pkg/cluster"
"github.com/zalando/postgres-operator/pkg/spec"
"github.com/zalando/postgres-operator/pkg/teams"
"github.com/zalando/postgres-operator/pkg/util"
"github.com/zalando/postgres-operator/pkg/util/config"
"github.com/zalando/postgres-operator/pkg/util/k8sutil"
@@ -396,8 +395,7 @@ func (c *Controller) getInfrastructureRole(
func (c *Controller) loadPostgresTeams() {
// reset team map
teamMap := make(teams.PostgresTeamMap, 0)
c.pgTeamMap = &teamMap
c.pgTeamMap.Reset()
pgTeams, err := c.KubeClient.PostgresTeamsGetter.PostgresTeams(c.opConfig.WatchedNamespace).List(context.TODO(), metav1.ListOptions{})
if err != nil {