Is it possible to add the ELB dynamically to Spinnaker

190 views Asked by At

Is there way to add the load balancer name dynamically in Spinnaker? Say for example, I have a Pipeline which does the bake and deploy the AMI in the ASG for different environment. In Deploy Phase for Cluster definition, I don't want to hardcode the ELB name and instead read from properties file. This I can use the same pipeline for different environment. Any thoughts or ideas?

Thanks in Advance.

2

There are 2 answers

0
Camilo Santana On

perform the 'add load balancer' action via deck while having the inspection panel open in the network tab. capture the API call. you'll notice there's a json payload. you can modify and subsequently script that action.

0
heph On

Edit the pipeline config and under the Deploy stage edit the appropriate "Deploy Configuration". Select the load balancer use a Spring Expression like:

${ trigger.properties.LB_NAME }

This assumes you have pre-provisioned a loadbalancer that matches the LB_NAME passed in the trigger properties file.