patch dendrite microservices with bind config (#795)

This PR adds a block in the dendrite config for the services to bind to. The microservices should bind to the addresses in the bind block, and will be contacted at the address in the listen block.

This fixes an issue with the microservices and kubernetes services.
This commit is contained in:
aditsachde 2019-10-02 05:29:27 -04:00 committed by Andrew Morgan
parent 3e2bb8bf2f
commit 7d77538ca4
12 changed files with 52 additions and 10 deletions

View file

@ -35,5 +35,6 @@ func main() {
base, accountDB, deviceDB, federation, alias, query, cache,
)
base.SetupAndServeHTTP(string(base.Cfg.Listen.FederationSender))
base.SetupAndServeHTTP(string(base.Cfg.Bind.AppServiceAPI), string(base.Cfg.Listen.AppServiceAPI))
}

View file

@ -45,5 +45,6 @@ func main() {
alias, input, query, typingInputAPI, asQuery, transactions.New(), fedSenderAPI,
)
base.SetupAndServeHTTP(string(base.Cfg.Listen.ClientAPI))
base.SetupAndServeHTTP(string(base.Cfg.Bind.ClientAPI), string(base.Cfg.Listen.ClientAPI))
}

View file

@ -39,5 +39,6 @@ func main() {
alias, input, query, asQuery,
)
base.SetupAndServeHTTP(string(base.Cfg.Listen.FederationAPI))
base.SetupAndServeHTTP(string(base.Cfg.Bind.FederationAPI), string(base.Cfg.Listen.FederationAPI))
}

View file

@ -32,5 +32,6 @@ func main() {
base, federation, query,
)
base.SetupAndServeHTTP(string(base.Cfg.Listen.FederationSender))
base.SetupAndServeHTTP(string(base.Cfg.Bind.FederationSender), string(base.Cfg.Listen.FederationSender))
}

View file

@ -28,5 +28,6 @@ func main() {
mediaapi.SetupMediaAPIComponent(base, deviceDB)
base.SetupAndServeHTTP(string(base.Cfg.Listen.MediaAPI))
base.SetupAndServeHTTP(string(base.Cfg.Bind.MediaAPI), string(base.Cfg.Listen.MediaAPI))
}

View file

@ -28,5 +28,6 @@ func main() {
publicroomsapi.SetupPublicRoomsAPIComponent(base, deviceDB)
base.SetupAndServeHTTP(string(base.Cfg.Listen.PublicRoomsAPI))
base.SetupAndServeHTTP(string(base.Cfg.Bind.PublicRoomsAPI), string(base.Cfg.Listen.PublicRoomsAPI))
}

View file

@ -28,5 +28,6 @@ func main() {
roomserver.SetupRoomServerComponent(base)
base.SetupAndServeHTTP(string(base.Cfg.Listen.RoomServer))
base.SetupAndServeHTTP(string(base.Cfg.Bind.RoomServer), string(base.Cfg.Listen.RoomServer))
}

View file

@ -31,5 +31,6 @@ func main() {
syncapi.SetupSyncAPIComponent(base, deviceDB, accountDB, query)
base.SetupAndServeHTTP(string(base.Cfg.Listen.SyncAPI))
base.SetupAndServeHTTP(string(base.Cfg.Bind.SyncAPI), string(base.Cfg.Listen.SyncAPI))
}

View file

@ -32,5 +32,6 @@ func main() {
typingserver.SetupTypingServerComponent(base, cache.NewTypingCache())
base.SetupAndServeHTTP(string(base.Cfg.Listen.TypingServer))
base.SetupAndServeHTTP(string(base.Cfg.Bind.TypingServer), string(base.Cfg.Listen.TypingServer))
}