Skip to content

Commit 76f181c

Browse files
committed
Allow additional attributes for backwards-compatibility;
1 parent 2832770 commit 76f181c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

schema/json/scaling-policy.legacy-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,5 +926,5 @@
926926
]
927927
}
928928
],
929-
"additionalProperties": false
929+
"additionalProperties": true
930930
}

src/autoscaler/api/policyvalidator/policy_validator_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ var _ = Describe("PolicyValidator", func() {
225225
// This needs to be passed for backwards-compatibility. We allowed in former times to set
226226
// this parameter `stats_window_secs` via configuration. We must silently ignore this
227227
// parameter today.
228+
//
229+
// In general we silently ignore every parameter that is used but unknown. In the future we
230+
// want to change this.
228231
Context("when legacy-fields are present", func() {
229232
BeforeEach(func() {
230233
policyString = `{
@@ -239,7 +242,10 @@ var _ = Describe("PolicyValidator", func() {
239242
"operator":">=",
240243
"cool_down_secs":300,
241244
"adjustment":"+1"
242-
}]
245+
}],
246+
"is_admin": true,
247+
"is_sso": true,
248+
"role": "admin"
243249
}`
244250
})
245251
It("the validation succeed and remove them", func() {

0 commit comments

Comments
 (0)