reflect code review
This commit is contained in:
parent
9abd6f7fcc
commit
c8d89f9c65
|
|
@ -15,8 +15,6 @@ const (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
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
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -362,7 +362,7 @@ func (c *Cluster) Create() error {
|
||||||
c.createConnectionPooler(c.installLookupFunction)
|
c.createConnectionPooler(c.installLookupFunction)
|
||||||
|
|
||||||
if err = c.syncStreams(); err != nil {
|
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
|
return nil
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ func (c *Cluster) syncPostgresConfig() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(slots) > 0 {
|
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 {
|
for slotName, slot := range slots {
|
||||||
c.logger.Debugf("creating logical replication slot %q in database %q", slotName, slot["database"])
|
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()
|
pods, err := c.listPods()
|
||||||
if err != nil || len(pods) == 0 {
|
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 {
|
for i, pod := range pods {
|
||||||
podName := util.NameFromMeta(pods[i].ObjectMeta)
|
podName := util.NameFromMeta(pods[i].ObjectMeta)
|
||||||
|
|
@ -135,6 +135,8 @@ func (c *Cluster) generateFabricEventStream() *zalandov1alpha1.FabricEventStream
|
||||||
Name: c.Name,
|
Name: c.Name,
|
||||||
Namespace: c.Namespace,
|
Namespace: c.Namespace,
|
||||||
Annotations: c.AnnotationsToPropagate(c.annotationsSet(nil)),
|
Annotations: c.AnnotationsToPropagate(c.annotationsSet(nil)),
|
||||||
|
// make cluster StatefulSet the owner (like with connection pooler objects)
|
||||||
|
OwnerReferences: c.ownerReferences(),
|
||||||
},
|
},
|
||||||
Spec: zalandov1alpha1.FabricEventStreamSpec{
|
Spec: zalandov1alpha1.FabricEventStreamSpec{
|
||||||
ApplicationId: "",
|
ApplicationId: "",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue