mirror of
https://github.com/minio/minio.git
synced 2025-04-22 11:26:36 -04:00
Preserve client sent config appropriately (#8566)
This commit is contained in:
parent
c3771df641
commit
0a56e33ce1
@ -466,14 +466,10 @@ func (c Config) SetKVS(s string, defaultKVS map[string]KVS) error {
|
|||||||
tgt = subSystemValue[1]
|
tgt = subSystemValue[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
_, ok := c[subSys][tgt]
|
// Save client sent kvs
|
||||||
if !ok {
|
c[subSys][tgt] = kvs
|
||||||
c[subSys][tgt] = KVS{}
|
|
||||||
} else {
|
|
||||||
c[subSys][tgt] = kvs
|
|
||||||
}
|
|
||||||
|
|
||||||
_, ok = c[subSys][tgt].Lookup(State)
|
_, ok := c[subSys][tgt].Lookup(State)
|
||||||
if !ok {
|
if !ok {
|
||||||
// implicit state "on" if not specified.
|
// implicit state "on" if not specified.
|
||||||
c[subSys][tgt] = append(c[subSys][tgt], KV{
|
c[subSys][tgt] = append(c[subSys][tgt], KV{
|
||||||
|
@ -564,6 +564,7 @@ func GetNotifyMQTT(mqttKVS map[string]config.KVS, rootCAs *x509.CertPool) (map[s
|
|||||||
if k != config.Default {
|
if k != config.Default {
|
||||||
brokerEnv = brokerEnv + config.Default + k
|
brokerEnv = brokerEnv + config.Default + k
|
||||||
}
|
}
|
||||||
|
|
||||||
brokerURL, err := xnet.ParseURL(env.Get(brokerEnv, kv.Get(target.MqttBroker)))
|
brokerURL, err := xnet.ParseURL(env.Get(brokerEnv, kv.Get(target.MqttBroker)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user