replace dash with underscroe for slot name

This commit is contained in:
Felix Kunde 2021-12-14 18:48:32 +01:00
parent 8690cc90e8
commit ff1ac1da4f
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ func getOutboxTable(tableName, idColumn string) zalandov1alpha1.EventStreamTable
func (c *Cluster) getStreamConnection(database, user, appId string) zalandov1alpha1.Connection { func (c *Cluster) getStreamConnection(database, user, appId string) zalandov1alpha1.Connection {
return zalandov1alpha1.Connection{ return zalandov1alpha1.Connection{
Url: fmt.Sprintf("jdbc:postgresql://%s.%s/%s?user=%s&ssl=true&sslmode=require", c.Name, c.Namespace, database, user), Url: fmt.Sprintf("jdbc:postgresql://%s.%s/%s?user=%s&ssl=true&sslmode=require", c.Name, c.Namespace, database, user),
SlotName: constants.EventStreamSourceSlotPrefix + "_" + database + "_" + appId, SlotName: constants.EventStreamSourceSlotPrefix + "_" + database + "_" + strings.Replace(appId, "-", "_", -1),
DBAuth: zalandov1alpha1.DBAuth{ DBAuth: zalandov1alpha1.DBAuth{
Type: constants.EventStreamSourceAuthType, Type: constants.EventStreamSourceAuthType,
Name: c.credentialSecretNameForCluster(user, c.Name), Name: c.credentialSecretNameForCluster(user, c.Name),