reflect code review

This commit is contained in:
Felix Kunde 2021-10-01 18:50:40 +02:00
parent 9abd6f7fcc
commit c8d89f9c65
3 changed files with 6 additions and 6 deletions

View File

@ -15,9 +15,7 @@ const (
var (
schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
// AddToScheme applies all the stored functions to the scheme. A non-nil error
// indicates that one function failed and the attempt was abandoned.
AddToScheme = schemeBuilder.AddToScheme
AddToScheme = schemeBuilder.AddToScheme
)
func init() {

View File

@ -362,7 +362,7 @@ func (c *Cluster) Create() error {
c.createConnectionPooler(c.installLookupFunction)
if err = c.syncStreams(); err != nil {
return fmt.Errorf("could not create streams: %v", err)
c.logger.Errorf("could not create streams: %v", err)
}
return nil

View File

@ -79,7 +79,7 @@ func (c *Cluster) syncPostgresConfig() error {
}
if len(slots) > 0 {
c.logger.Debugf("setting wal level to 'logical' in Postgres configuration")
c.logger.Debugf("setting wal level to 'logical' in Postgres configuration to allow for decoding changes")
for slotName, slot := range slots {
c.logger.Debugf("creating logical replication slot %q in database %q", slotName, slot["database"])
}
@ -90,7 +90,7 @@ func (c *Cluster) syncPostgresConfig() error {
pods, err := c.listPods()
if err != nil || len(pods) == 0 {
return err
c.logger.Warnf("could not list pods of the statefulset: %v", err)
}
for i, pod := range pods {
podName := util.NameFromMeta(pods[i].ObjectMeta)
@ -135,6 +135,8 @@ func (c *Cluster) generateFabricEventStream() *zalandov1alpha1.FabricEventStream
Name: c.Name,
Namespace: c.Namespace,
Annotations: c.AnnotationsToPropagate(c.annotationsSet(nil)),
// make cluster StatefulSet the owner (like with connection pooler objects)
OwnerReferences: c.ownerReferences(),
},
Spec: zalandov1alpha1.FabricEventStreamSpec{
ApplicationId: "",