reflect code review
This commit is contained in:
parent
23cb1c0d50
commit
9390ae3630
|
|
@ -19,7 +19,6 @@ var (
|
|||
outOfCluster bool
|
||||
version string
|
||||
config spec.ControllerConfig
|
||||
controllerID string
|
||||
)
|
||||
|
||||
func mustParseDuration(d string) time.Duration {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ lacks access rights to any of them (except K8s system namespaces like
|
|||
'list pods' execute at the cluster scope and fail at the first violation of
|
||||
access rights.
|
||||
|
||||
## Operators with defined ownership on certain Postgres clusters
|
||||
## Operators with defined ownership of certain Postgres clusters
|
||||
|
||||
By default, multiple operators can only run together in one K8s cluster when
|
||||
isolated into their [own namespaces](administrator.md#specify-the-namespace-to-watch).
|
||||
|
|
|
|||
|
|
@ -51,13 +51,9 @@ func (c *Controller) listClusters(options metav1.ListOptions) (*acidv1.Postgresq
|
|||
c.logger.Debugf("watch only clusters with controllerID %q", c.controllerID)
|
||||
}
|
||||
for _, pg := range list.Items {
|
||||
if pg.Error != "" {
|
||||
continue
|
||||
if pg.Error == "" && c.hasOwnership(&pg) {
|
||||
pgList.Items = append(pgList.Items, pg)
|
||||
}
|
||||
if !c.hasOwnership(&pg) {
|
||||
continue
|
||||
}
|
||||
pgList.Items = append(pgList.Items, pg)
|
||||
}
|
||||
|
||||
return &pgList, err
|
||||
|
|
|
|||
Loading…
Reference in New Issue