-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gce): support autoscaler scale-down controls (#4129)
* refactor(gce): don't serialize AutoscalingPolicy Serializing Google API types doesn't work right with Jackson. These types are actually all `Map` objects, so Jackson does weird things with them. You can add ``@JsonTypeInfo` and it kinda works, until it doesn't. In particular, it's okay to for them to reference another Google API object, but if _that_ object references a third Google API type (e.g. AutoscalingPolicy has a ScaleDownControl field, which has a FixedOrPercent field) then exceptions will be thrown when deserializing that third-tier field. Fortunately (and maybe for this exact reason??) we already have a class GoogleAutoscalingPolicy which mirrors exactly the fields in AutoscalingPolicy, so let's use that one instead. * refactor(gce): Move the AutoscalingPolicy conversion code into the cache GCEUtil used to have the function for converting from AutoscalingPolicy to GoogleAutoscalingPolicy, but now AbstractGoogleServerGroupCachingAgent is the only place that uses it, so move it in there. * feat(gce): support autoscaler scale-down controls * fix(gce): copy scale-down policy to the cache and back to deck * fix(gce): allow removing a scaleDownControl by setting it to {} * fix(gce): address Eric's PR comments * test(gce): fix the test to handle a null value properly
- Loading branch information
1 parent
5bb06aa
commit bc5aeb4
Showing
12 changed files
with
281 additions
and
90 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
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
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
Oops, something went wrong.