diff --git a/audit/pkg/config/defaults/defaultconfig.go b/audit/pkg/config/defaults/defaultconfig.go index eb3dd9de8..ed1c1a822 100644 --- a/audit/pkg/config/defaults/defaultconfig.go +++ b/audit/pkg/config/defaults/defaultconfig.go @@ -20,7 +20,7 @@ func DefaultConfig() *config.Config { }, Events: config.Events{ Endpoint: "127.0.0.1:9233", - Cluster: "test-cluster", + Cluster: "ocis-cluster", ConsumerGroup: "audit", }, Auditlog: config.Auditlog{ diff --git a/nats/pkg/command/server.go b/nats/pkg/command/server.go index c29069f1e..c1d671916 100644 --- a/nats/pkg/command/server.go +++ b/nats/pkg/command/server.go @@ -41,7 +41,7 @@ func Server(cfg *config.Config) *cli.Command { []nats.NatsOption{ nats.Host(cfg.Nats.Host), nats.Port(cfg.Nats.Port), - nats.ClusterID("ocis-cluster"), + nats.ClusterID(cfg.Nats.ClusterID), }, []nats.JetStreamOption{ nats.JetStreamStoreDir(cfg.Nats.StoreDir), diff --git a/nats/pkg/config/config.go b/nats/pkg/config/config.go index 4793831df..98e86a9e6 100644 --- a/nats/pkg/config/config.go +++ b/nats/pkg/config/config.go @@ -22,7 +22,8 @@ type Config struct { // Nats is the nats config type Nats struct { - Host string `ocisConfig:"host" env:"NATS_NATS_HOST"` - Port int `ocisConfig:"port" env:"NATS_NATS_PORT"` - StoreDir string `ocisConfig:"store_dir" env:"NATS_NATS_STORE_DIR"` + Host string `ocisConfig:"host" env:"NATS_NATS_HOST"` + Port int `ocisConfig:"port" env:"NATS_NATS_PORT"` + ClusterID string `ocisConfig:"clusterid" env:"NATS_NATS_CLUSTER_ID"` + StoreDir string `ocisConfig:"store_dir" env:"NATS_NATS_STORE_DIR"` } diff --git a/nats/pkg/config/defaults/defaultconfig.go b/nats/pkg/config/defaults/defaultconfig.go index ac7215dff..d7a37996d 100644 --- a/nats/pkg/config/defaults/defaultconfig.go +++ b/nats/pkg/config/defaults/defaultconfig.go @@ -25,9 +25,10 @@ func DefaultConfig() *config.Config { Name: "nats", }, Nats: config.Nats{ - Host: "127.0.0.1", - Port: 9233, - StoreDir: path.Join(defaults.BaseDataPath(), "nats"), + Host: "127.0.0.1", + Port: 9233, + ClusterID: "ocis-cluster", + StoreDir: path.Join(defaults.BaseDataPath(), "nats"), }, } } diff --git a/notifications/pkg/config/defaults/defaultconfig.go b/notifications/pkg/config/defaults/defaultconfig.go index 22647168c..c2cfa8334 100644 --- a/notifications/pkg/config/defaults/defaultconfig.go +++ b/notifications/pkg/config/defaults/defaultconfig.go @@ -28,7 +28,7 @@ func DefaultConfig() *config.Config { }, Events: config.Events{ Endpoint: "127.0.0.1:9233", - Cluster: "test-cluster", + Cluster: "ocis-cluster", ConsumerGroup: "notifications", }, RevaGateway: "127.0.0.1:9142",