scaling: ensure min and max int64s are in toplevel of block.

This commit is contained in:
James Rasell
2020-03-19 15:30:14 +01:00
committed by Chris Baker
parent 66bf8dd48d
commit 9243718899
2 changed files with 4 additions and 0 deletions

View File

@@ -337,6 +337,8 @@ func parseScalingPolicy(out **api.ScalingPolicy, list *ast.ObjectList) error {
}
valid := []string{
"min",
"max",
"policy",
"enabled",
}

View File

@@ -267,6 +267,8 @@ func CopyScalingPolicy(p *ScalingPolicy) *ScalingPolicy {
ID: p.ID,
Policy: opaquePolicyConfig.(map[string]interface{}),
Enabled: p.Enabled,
Min: p.Min,
Max: p.Max,
CreateIndex: p.CreateIndex,
ModifyIndex: p.ModifyIndex,
}