Skip to content

Commit

Permalink
fix(gce): remove use of ONLY_DOWN deprecated autoscaler policy (#3087) (
Browse files Browse the repository at this point in the history
  • Loading branch information
spinnakerbot authored and maggieneterval committed Aug 12, 2019
1 parent 2661d79 commit dc93a84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ private TargetServerGroup getTargetGroupForLocation(StageData data, String locat
enum AutoscalingMode {
ON,
OFF,
ONLY_DOWN,
ONLY_UP
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class ScaleDownClusterTask extends AbstractClusterWideClouddriverTask {
ClusterSelection clusterSelection = stage.mapTo(ClusterSelection)
Map resizeOp = [capacity: [min: 0, max: 0, desired: 0]]
if (clusterSelection.cloudProvider == 'gce' && serverGroup.getAutoscalingPolicy()) {
resizeOp.autoscalingMode = 'ONLY_DOWN'
resizeOp.autoscalingMode = 'OFF'

// Avoid overriding persisted autoscaling policy metadata to 0/0/0 and mode = ONLY_DOWN.
// Avoid overriding persisted autoscaling policy metadata to 0/0/0 and mode = OFF.
// This ensures the server group will be scaled properly with the previously persisted
// autoscaling policy if re-enabled.
resizeOp.writeMetadata = false
Expand Down

0 comments on commit dc93a84

Please sign in to comment.