-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
In our API for WorkloadUpdateMethods we read: ... An empty list defaults to no automated workload updating. and a default of: ["LiveMigrate"] but in the past the json representation of WorkloadUpdateMethods was defined with omitempty but, as for: https://go.dev/src/encoding/json/encode.go // The "omitempty" option specifies that the field should be omitted // from the encoding if the field has an empty value, defined as // false, 0, a nil pointer, a nil interface value, and any empty array, // slice, map, or string. the golang json encoder is omitting also empty array and slice and so an empty list on WorkloadUpdateMethods gets omitted at json level and so the APIServer will then replace it with the default value (["LiveMigrate"]). Avoid declaring omitempty on WorkloadUpdateMethods to make an empty list an acceptable value. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2151693 This is a manual cherry-pick of #2180 Signed-off-by: Simone Tiraboschi <[email protected]> Signed-off-by: Simone Tiraboschi <[email protected]>
- Loading branch information
1 parent
a7eb458
commit fb0adee
Showing
7 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters