rework internal structure to be closer to CRD

This commit is contained in:
Felix Kunde
2020-10-14 18:10:15 +02:00
parent 9f0e1f703b
commit 0f86eff13e
7 changed files with 179 additions and 148 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ import (
"github.com/zalando/postgres-operator/pkg/apiserver"
"github.com/zalando/postgres-operator/pkg/cluster"
acidv1informer "github.com/zalando/postgres-operator/pkg/generated/informers/externalversions/acid.zalan.do/v1"
"github.com/zalando/postgres-operator/pkg/postgresteams"
"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/constants"
@@ -34,7 +34,7 @@ import (
type Controller struct {
config spec.ControllerConfig
opConfig *config.Config
pgTeamMap *postgresteams.PostgresTeamMap
pgTeamMap *teams.PostgresTeamMap
logger *logrus.Entry
KubeClient k8sutil.KubernetesClient
+2 -2
View File
@@ -14,8 +14,8 @@ 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/postgresteams"
"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,7 +396,7 @@ func (c *Controller) getInfrastructureRole(
}
func (c *Controller) loadPostgresTeams(obj interface{}) {
var pgTeamMap postgresteams.PostgresTeamMap
var pgTeamMap teams.PostgresTeamMap
pgTeam, ok := obj.(*acidv1.PostgresTeam)
if !ok {