Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Parameterise webui URL #70

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions factory/config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ configuration:
url: http://dummy
authKeysDbName: authentication
authUrl: http://dummy
webuiUri: webui:9876
plmnSupportList:
- plmnId:
mcc: "208"
Expand Down
1 change: 1 addition & 0 deletions factory/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type Configuration struct {
Sbi *Sbi `yaml:"sbi"`
Mongodb *Mongodb `yaml:"mongodb"`
NrfUri string `yaml:"nrfUri"`
WebuiUri string `yaml:"webuiUri"`
PlmnSupportList []PlmnSupportItem `yaml:"plmnSupportList,omitempty"`
}

Expand Down
5 changes: 4 additions & 1 deletion factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ func InitConfigFactory(f string) error {
if UdrConfig.Configuration.Mongodb.AuthKeysDbName == "" {
UdrConfig.Configuration.Mongodb.AuthKeysDbName = "authentication"
}
if UdrConfig.Configuration.WebuiUri == "" {
UdrConfig.Configuration.WebuiUri = "webui:9876"
}
roc := os.Getenv("MANAGED_BY_CONFIG_POD")
if roc == "true" {
initLog.Infoln("MANAGED_BY_CONFIG_POD is true")
commChannel := client.ConfigWatcher()
commChannel := client.ConfigWatcher(UdrConfig.Configuration.WebuiUri)
ConfigUpdateDbTrigger = make(chan *UpdateDb, 10)
go UdrConfig.updateConfig(commChannel, ConfigUpdateDbTrigger)
} else {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/gin-gonic/gin v1.9.1
github.com/google/uuid v1.6.0
github.com/mitchellh/mapstructure v1.5.0
github.com/omec-project/config5g v1.3.0
github.com/omec-project/config5g v1.3.1
github.com/omec-project/http2_util v1.2.0
github.com/omec-project/logger_util v1.2.0
github.com/omec-project/openapi v1.2.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ github.com/montanaflynn/stats v0.6.6 h1:Duep6KMIDpY4Yo11iFsvyqJDyfzLF9+sndUKT+v6
github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
github.com/omec-project/config5g v1.3.0 h1:e/oMZlQsef8bOpHT56uAMKIag3epCOW0jpmyadFC+30=
github.com/omec-project/config5g v1.3.0/go.mod h1:h6eaDdWEY7432L9rZAg1Za6HrvFvDWRNolAn5GK/5No=
github.com/omec-project/config5g v1.3.1 h1:hSvFHXh/J0mslsWR82PPnmpF0WzkmLa6AOdvEPve9e8=
github.com/omec-project/config5g v1.3.1/go.mod h1:lN/Jc2BZkE/smOGPCXxeo1dJ7s+s9Wgp34crNLH4YeE=
github.com/omec-project/http2_util v1.2.0 h1:ggQ1GjY2x6VRpKuRhZj0t9dh6eISY6LRBv4rlMD++8s=
github.com/omec-project/http2_util v1.2.0/go.mod h1:KLgvU3o7qmG/i5XO/qITscFql2tWCAmjE6glX+dxe7M=
github.com/omec-project/logger_conf v1.1.1 h1:qo0cF5gnPfth8wy+I/QjiOx+F5jB6h4GLSOdyS+ted8=
Expand Down