[#1563] config: Replace 127.0.0.1
with localhost
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
4a8dfd0ce4
commit
12dc5c3395
14 changed files with 26 additions and 26 deletions
|
@ -41,8 +41,8 @@ const (
|
|||
)
|
||||
|
||||
const (
|
||||
defaultControlEndpoint = "127.0.0.1:8090"
|
||||
defaultDataEndpoint = "127.0.0.1"
|
||||
defaultControlEndpoint = "localhost:8090"
|
||||
defaultDataEndpoint = "localhost"
|
||||
)
|
||||
|
||||
// RootCmd is a root command of config section.
|
||||
|
|
|
@ -37,10 +37,10 @@ func newConfig(path string) (*viper.Viper, error) {
|
|||
func defaultConfiguration(cfg *viper.Viper) {
|
||||
cfg.SetDefault("logger.level", "info")
|
||||
|
||||
cfg.SetDefault("profiler.address", "")
|
||||
cfg.SetDefault("profiler.address", "localhost:9090")
|
||||
cfg.SetDefault("profiler.shutdown_timeout", "30s")
|
||||
|
||||
cfg.SetDefault("metrics.address", "")
|
||||
cfg.SetDefault("metrics.address", "localhost:6060")
|
||||
cfg.SetDefault("metrics.shutdown_timeout", "30s")
|
||||
|
||||
cfg.SetDefault("without_mainnet", false)
|
||||
|
|
|
@ -26,7 +26,7 @@ func TestControlSection(t *testing.T) {
|
|||
|
||||
var fileConfigTest = func(c *config.Config) {
|
||||
require.Equal(t, pubs, controlconfig.AuthorizedKeys(c))
|
||||
require.Equal(t, "127.0.0.1:8090", controlconfig.GRPC(c).Endpoint())
|
||||
require.Equal(t, "localhost:8090", controlconfig.GRPC(c).Endpoint())
|
||||
}
|
||||
|
||||
configtest.ForEachFileType(path, fileConfigTest)
|
||||
|
|
|
@ -26,7 +26,7 @@ func TestMetricsSection(t *testing.T) {
|
|||
addr := metricsconfig.Address(c)
|
||||
|
||||
require.Equal(t, 15*time.Second, to)
|
||||
require.Equal(t, "127.0.0.1:9090", addr)
|
||||
require.Equal(t, "localhost:9090", addr)
|
||||
}
|
||||
|
||||
configtest.ForEachFileType(path, fileConfigTest)
|
||||
|
|
|
@ -26,7 +26,7 @@ func TestProfilerSection(t *testing.T) {
|
|||
addr := profilerconfig.Address(c)
|
||||
|
||||
require.Equal(t, 15*time.Second, to)
|
||||
require.Equal(t, "127.0.0.1:6060", addr)
|
||||
require.Equal(t, "localhost:6060", addr)
|
||||
}
|
||||
|
||||
configtest.ForEachFileType(path, fileConfigTest)
|
||||
|
|
|
@ -14,7 +14,7 @@ NEOFS_IR_MAINNET_DIAL_TIMEOUT=5s
|
|||
NEOFS_IR_MORPH_ENDPOINT_CLIENT="wss://mainchain1.fs.neo.org:30333/ws wss://mainchain2.fs.neo.org:30333/ws"
|
||||
|
||||
NEOFS_IR_CONTROL_AUTHORIZED_KEYS="035839e45d472a3b7769a2a1bd7d54c4ccd4943c3b40f547870e83a8fcbfb3ce11 028f42cfcb74499d7b15b35d9bff260a1c8d27de4f446a627406a382d8961486d6"
|
||||
NEOFS_IR_CONTROL_GRPC_ENDPOINT=127.0.0.1:8090
|
||||
NEOFS_IR_CONTROL_GRPC_ENDPOINT=localhost:8090
|
||||
|
||||
NEOFS_IR_GOVERNANCE_DISABLE=false
|
||||
|
||||
|
@ -82,10 +82,10 @@ NEOFS_IR_CONTRACTS_ALPHABET_DOBRO=e6122b65d45c8feeb04455d67814394c147ed4d1
|
|||
NEOFS_IR_CONTRACTS_ALPHABET_YEST=cdbca5cb5d48a4472923844d0e3ee6328cf86d38
|
||||
NEOFS_IR_CONTRACTS_ALPHABET_ZHIVETE=f584699bc2ff457d339fb09f16217042c1a42101
|
||||
|
||||
NEOFS_IR_PROFILER_ADDRESS=127.0.0.1:6060
|
||||
NEOFS_IR_PROFILER_ADDRESS=localhost:6060
|
||||
NEOFS_IR_PROFILER_SHUTDOWN_TIMEOUT=30s
|
||||
|
||||
NEOFS_IR_METRICS_ADDRESS=127.0.0.1:9090
|
||||
NEOFS_IR_METRICS_ADDRESS=localhost:9090
|
||||
NEOFS_IR_METRICS_SHUTDOWN_TIMEOUT=30s
|
||||
|
||||
NEOFS_IR_SETTLEMENT_BASIC_INCOME_RATE=100
|
||||
|
|
|
@ -31,7 +31,7 @@ control:
|
|||
- 035839e45d472a3b7769a2a1bd7d54c4ccd4943c3b40f547870e83a8fcbfb3ce11
|
||||
- 028f42cfcb74499d7b15b35d9bff260a1c8d27de4f446a627406a382d8961486d6
|
||||
grpc:
|
||||
endpoint: 127.0.0.1:8090 # Endpoint that is listened by the control service; disabled by default
|
||||
endpoint: localhost:8090 # Endpoint that is listened by the control service; disabled by default
|
||||
|
||||
governance:
|
||||
disable: false # Disable synchronization of sidechain committee and mainchain role management contract; ignore if mainchain is disabled
|
||||
|
@ -124,11 +124,11 @@ contracts:
|
|||
zhivete: f584699bc2ff457d339fb09f16217042c1a42101 # Optional: override address of zhivete contract in sidechain
|
||||
|
||||
profiler:
|
||||
address: 127.0.0.1:6060 # Endpoint for application pprof profiling; disabled by default
|
||||
address: localhost:6060 # Endpoint for application pprof profiling; disabled by default
|
||||
shutdown_timeout: 30s # Timeout for profiling HTTP server graceful shutdown
|
||||
|
||||
metrics:
|
||||
address: 127.0.0.1:9090 # Endpoint for application prometheus metrics; disabled by default
|
||||
address: localhost:9090 # Endpoint for application prometheus metrics; disabled by default
|
||||
shutdown_timeout: 30s # Timeout for metrics HTTP server graceful shutdown
|
||||
|
||||
settlement:
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
NEOFS_LOGGER_LEVEL=debug
|
||||
|
||||
NEOFS_PROFILER_ADDRESS=127.0.0.1:6060
|
||||
NEOFS_PROFILER_ADDRESS=localhost:6060
|
||||
NEOFS_PROFILER_SHUTDOWN_TIMEOUT=15s
|
||||
|
||||
NEOFS_METRICS_ADDRESS=127.0.0.1:9090
|
||||
NEOFS_METRICS_ADDRESS=localhost:9090
|
||||
NEOFS_METRICS_SHUTDOWN_TIMEOUT=15s
|
||||
|
||||
# Node section
|
||||
|
@ -42,7 +42,7 @@ NEOFS_GRPC_1_TLS_ENABLED=false
|
|||
|
||||
# Control service section
|
||||
NEOFS_CONTROL_AUTHORIZED_KEYS="035839e45d472a3b7769a2a1bd7d54c4ccd4943c3b40f547870e83a8fcbfb3ce11 028f42cfcb74499d7b15b35d9bff260a1c8d27de4f446a627406a382d8961486d6"
|
||||
NEOFS_CONTROL_GRPC_ENDPOINT=127.0.0.1:8090
|
||||
NEOFS_CONTROL_GRPC_ENDPOINT=localhost:8090
|
||||
|
||||
# Contracts section
|
||||
NEOFS_CONTRACTS_BALANCE=5263abba1abedbf79bb57f3e40b50b4425d2d6cd
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
"level": "debug"
|
||||
},
|
||||
"profiler": {
|
||||
"address": "127.0.0.1:6060",
|
||||
"address": "localhost:6060",
|
||||
"shutdown_timeout": "15s"
|
||||
},
|
||||
"metrics": {
|
||||
"address": "127.0.0.1:9090",
|
||||
"address": "localhost:9090",
|
||||
"shutdown_timeout": "15s"
|
||||
},
|
||||
"node": {
|
||||
|
@ -79,7 +79,7 @@
|
|||
"028f42cfcb74499d7b15b35d9bff260a1c8d27de4f446a627406a382d8961486d6"
|
||||
],
|
||||
"grpc": {
|
||||
"endpoint": "127.0.0.1:8090"
|
||||
"endpoint": "localhost:8090"
|
||||
}
|
||||
},
|
||||
"contracts": {
|
||||
|
|
|
@ -2,11 +2,11 @@ logger:
|
|||
level: debug # logger level: one of "debug", "info" (default), "warn", "error", "dpanic", "panic", "fatal"
|
||||
|
||||
profiler:
|
||||
address: 127.0.0.1:6060 # endpoint for Node profiling
|
||||
address: localhost:6060 # endpoint for Node profiling
|
||||
shutdown_timeout: 15s # timeout for profiling HTTP server graceful shutdown
|
||||
|
||||
metrics:
|
||||
address: 127.0.0.1:9090 # endpoint for Node metrics
|
||||
address: localhost:9090 # endpoint for Node metrics
|
||||
shutdown_timeout: 15s # timeout for metrics HTTP server graceful shutdown
|
||||
|
||||
node:
|
||||
|
@ -65,7 +65,7 @@ control:
|
|||
- 035839e45d472a3b7769a2a1bd7d54c4ccd4943c3b40f547870e83a8fcbfb3ce11
|
||||
- 028f42cfcb74499d7b15b35d9bff260a1c8d27de4f446a627406a382d8961486d6
|
||||
grpc:
|
||||
endpoint: 127.0.0.1:8090 # endpoint that is listened by the Control Service
|
||||
endpoint: localhost:8090 # endpoint that is listened by the Control Service
|
||||
|
||||
contracts: # side chain NEOFS contract script hashes; optional, override values retrieved from NNS contract
|
||||
balance: 5263abba1abedbf79bb57f3e40b50b4425d2d6cd
|
||||
|
|
|
@ -40,7 +40,7 @@ logger:
|
|||
level: info
|
||||
|
||||
metrics:
|
||||
address: 127.0.0.1:9090
|
||||
address: localhost:9090
|
||||
shutdown_timeout: 15s
|
||||
|
||||
object:
|
||||
|
|
|
@ -24,7 +24,7 @@ node:
|
|||
attribute_1: User-Agent:NeoFS\/0.27
|
||||
|
||||
metrics:
|
||||
address: 127.0.0.1:9090
|
||||
address: localhost:9090
|
||||
shutdown_timeout: 15s
|
||||
|
||||
storage:
|
||||
|
|
|
@ -18,7 +18,7 @@ NEOFS_GRPC_NUM=1
|
|||
# Specify control service endpoint for node administration.
|
||||
# It must be different from connection port.
|
||||
# Keep control service endpoint private with firewall rules or use localhost.
|
||||
NEOFS_CONTROL_GRPC_ENDPOINT=127.0.0.1:30512
|
||||
NEOFS_CONTROL_GRPC_ENDPOINT=localhost:30512
|
||||
|
||||
|
||||
#https://unece.org/trade/cefact/unlocode-code-list-country-and-territory
|
||||
|
|
|
@ -7,7 +7,7 @@ scrape_configs:
|
|||
- job_name: 'neofs-node-user'
|
||||
scrape_interval: 5s
|
||||
static_configs:
|
||||
- targets: ['127.0.0.1:9090']
|
||||
- targets: ['localhost:9090']
|
||||
relabel_configs:
|
||||
- target_label: 'instance'
|
||||
replacement: "%{NEOFS_NODE_ADDRESS}"
|
||||
|
|
Loading…
Reference in a new issue