mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-05 01:42:12 +02:00
set applicationId of FES CRD by taking label from manifest
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
|
||||
@@ -108,8 +108,14 @@ func (c *Cluster) syncPostgresConfig() error {
|
||||
}
|
||||
|
||||
func (c *Cluster) generateFabricEventStream() *zalandov1alpha1.FabricEventStream {
|
||||
var applicationId string
|
||||
eventStreams := make([]zalandov1alpha1.EventStream, 0)
|
||||
|
||||
// take application label from manifest
|
||||
if spec, err := c.GetSpec(); err == nil {
|
||||
applicationId = spec.ObjectMeta.Labels["application"]
|
||||
}
|
||||
|
||||
for _, stream := range c.Spec.Streams {
|
||||
for tableName, table := range stream.Tables {
|
||||
streamSource := c.getEventStreamSource(stream, tableName, table.IdColumn)
|
||||
@@ -136,7 +142,7 @@ func (c *Cluster) generateFabricEventStream() *zalandov1alpha1.FabricEventStream
|
||||
OwnerReferences: c.ownerReferences(),
|
||||
},
|
||||
Spec: zalandov1alpha1.FabricEventStreamSpec{
|
||||
ApplicationId: "",
|
||||
ApplicationId: applicationId,
|
||||
EventStreams: eventStreams,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user