fix(google): prevent parent server group from overwriting null clone autohealing policies
MODIFY
clouddriver-google/src/main/groovy/com/netflix/spinnaker/clouddriver/google/deploy/description/BasicGoogleDeployDescription.groovy
clouddriver-google/src/main/groovy/com/netflix/spinnaker/clouddriver/google/deploy/description/BasicGoogleDeployDescription.groovy
@@ -48,6 +48,7 @@ class BasicGoogleDeployDescription extends BaseGoogleInstanceDescription impleme
GoogleAutoscalingPolicy autoscalingPolicy
GoogleHttpLoadBalancingPolicy loadBalancingPolicy
GoogleAutoHealingPolicy autoHealingPolicy
+ Boolean overwriteAncestorAutoHealingPolicy = false
/**
* Optional explicit specification of zones for an RMIG.
*/

MODIFY
clouddriver-google/src/main/groovy/com/netflix/spinnaker/clouddriver/google/deploy/ops/CopyLastGoogleServerGroupAtomicOperation.groovy
clouddriver-google/src/main/groovy/com/netflix/spinnaker/clouddriver/google/deploy/ops/CopyLastGoogleServerGroupAtomicOperation.groovy
@@ -257,10 +257,8 @@ class CopyLastGoogleServerGroupAtomicOperation extends GoogleAtomicOperation<Dep
GoogleAutoHealingPolicy ancestorAutoHealingPolicyDescription =
GCEUtil.buildAutoHealingPolicyDescriptionFromAutoHealingPolicy(ancestorAutoHealingPolicy)
- println(",, description autohealing policy ${description.autoHealingPolicy}")
- println(",, ancestor autohealing policy ${ancestorAutoscalingPolicy}")
- println(",, ancestor autohealing policy description ${ancestorAutoscalingPolicyDescription}")
- newDescription.autoHealingPolicy = description.autoHealingPolicy ?: ancestorAutoHealingPolicyDescription
+ newDescription.autoHealingPolicy = (description.autoHealingPolicy != null || description.overwriteAncestorAutoHealingPolicy) ?
+ description.autoHealingPolicy : ancestorAutoHealingPolicyDescription
return newDescription
}

fix(google): prevent parent server group from overwriting null clone autohealing policies (#3266)