Skip to content

Commit

Permalink
chore: expose port parameter for scylla manager's DB
Browse files Browse the repository at this point in the history
  • Loading branch information
karol-kokoszka committed Nov 13, 2023
1 parent 375d9d7 commit e7fd0b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cmd/scylla-manager/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ func gocqlClusterConfig(c config.Config) *gocql.ClusterConfig {
}
cluster.PoolConfig.HostSelectionPolicy = gocql.TokenAwareHostPolicy(fallback)
}
if c.Database.Port != 0 {
cluster.Port = c.Database.Port
}

return cluster
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/config/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type DBConfig struct {
ReplicationFactor int `yaml:"replication_factor"`
Timeout time.Duration `yaml:"timeout"`
TokenAware bool `yaml:"token_aware"`
Port int `yaml:"port"`

// InitAddr specifies address used to create manager keyspace and tables.
InitAddr string
Expand Down Expand Up @@ -77,6 +78,7 @@ func DefaultConfig() Config {
ReplicationFactor: 1,
Timeout: 1 * time.Second,
TokenAware: true,
Port: 9042,
},
SSL: SSLConfig{
Validate: true,
Expand Down
1 change: 1 addition & 0 deletions testing/scylla-manager/scylla-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ database:
hosts:
- 192.168.200.100
timeout: 1s
port: 9041

0 comments on commit e7fd0b1

Please sign in to comment.