Skip to content

Commit

Permalink
feat(google): propagate the GCE statefulPolicy through to deck (#3855)
Browse files Browse the repository at this point in the history
  • Loading branch information
plumpy authored and maggieneterval committed Jul 9, 2019
1 parent adaf105 commit 0ac5868
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo
import com.google.api.services.compute.model.AutoscalingPolicy
import com.google.api.services.compute.model.InstanceGroupManagerActionsSummary
import com.google.api.services.compute.model.InstanceGroupManagerAutoHealingPolicy
import com.google.api.services.compute.model.StatefulPolicy
import com.google.api.services.iam.v1.model.ServiceAccount
import com.netflix.spinnaker.clouddriver.google.GoogleCloudProvider
import com.netflix.spinnaker.clouddriver.google.model.loadbalancing.GoogleHttpLoadBalancingPolicy
Expand Down Expand Up @@ -74,6 +75,9 @@ class GoogleServerGroup implements GoogleLabeledResource {
@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="class")
AutoscalingPolicy autoscalingPolicy

@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="class")
StatefulPolicy statefulPolicy

List<String> autoscalingMessages

@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="class")
Expand Down Expand Up @@ -124,6 +128,7 @@ class GoogleServerGroup implements GoogleLabeledResource {
Boolean discovery = GoogleServerGroup.this.discovery
InstanceGroupManagerActionsSummary currentActions = GoogleServerGroup.this.currentActions
AutoscalingPolicy autoscalingPolicy = GoogleServerGroup.this.autoscalingPolicy
StatefulPolicy statefulPolicy = GoogleServerGroup.this.statefulPolicy
List<String> autoscalingMessages = GoogleServerGroup.this.autoscalingMessages
InstanceGroupManagerAutoHealingPolicy autoHealingPolicy = GoogleServerGroup.this.autoHealingPolicy
GoogleDistributionPolicy distributionPolicy = GoogleServerGroup.this.distributionPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ class GoogleZonalServerGroupCachingAgent extends AbstractGoogleCachingAgent impl
asg: [minSize : instanceGroupManager.targetSize,
maxSize : instanceGroupManager.targetSize,
desiredCapacity: instanceGroupManager.targetSize],
statefulPolicy: instanceGroupManager.statefulPolicy,
autoHealingPolicy: instanceGroupManager.autoHealingPolicies?.getAt(0)
)
}
Expand Down

0 comments on commit 0ac5868

Please sign in to comment.