Display override settings with env variables (#2636)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
@@ -129,9 +129,16 @@ func getConfig(ctx context.Context, client MinioAdmin, name string) ([]*models.C
|
||||
}
|
||||
var confkv []*models.ConfigurationKV
|
||||
for _, kv := range scfg.KV {
|
||||
// FIXME: Ignoring env-overrides for now as support for this
|
||||
// needs to be added for presentation.
|
||||
confkv = append(confkv, &models.ConfigurationKV{Key: kv.Key, Value: kv.Value})
|
||||
var envOverride *models.EnvOverride
|
||||
|
||||
if kv.EnvOverride != nil {
|
||||
envOverride = &models.EnvOverride{
|
||||
Name: kv.EnvOverride.Name,
|
||||
Value: kv.EnvOverride.Value,
|
||||
}
|
||||
}
|
||||
|
||||
confkv = append(confkv, &models.ConfigurationKV{Key: kv.Key, Value: kv.Value, EnvOverride: envOverride})
|
||||
}
|
||||
if len(confkv) == 0 {
|
||||
continue
|
||||
|
||||
@@ -5870,6 +5870,9 @@ func init() {
|
||||
"configurationKV": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"env_override": {
|
||||
"$ref": "#/definitions/envOverride"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -5939,6 +5942,17 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"envOverride": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"environmentConstants": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -14554,6 +14568,9 @@ func init() {
|
||||
"configurationKV": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"env_override": {
|
||||
"$ref": "#/definitions/envOverride"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -14623,6 +14640,17 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"envOverride": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"environmentConstants": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user