Fixes spurious LoadBalancer change when using ACM Certificate

When using `.spec.api.loadBalancer.sslCertificate`, subsequent `kops update cluster` report the following spurious change:
```
Will modify resources:
  LoadBalancer/api.ho-prod-a.us-east-1.k8s.tune.com
  	Listeners           	 {443: {"InstancePort":443,"SSLCertificateID":""}} -> {443: {"InstancePort":443,"SSLCertificateID":"arn:aws:acm:us-east-1:000000000000:certificate/..."}}
```

This is because we werent keeping track of the ACM Certificate when describing the "actual" load balancer status.

This fixes that behavior, and now kops accurately reports no changes to be made.
This commit is contained in:
Peter Rifel 2018-09-21 09:51:31 -07:00
parent a300c2aa4c
commit c3d2038b1e
1 changed files with 1 additions and 0 deletions

View File

@ -311,6 +311,7 @@ func (e *LoadBalancer) Find(c *fi.Context) (*LoadBalancer, error) {
actualListener := &LoadBalancerListener{} actualListener := &LoadBalancerListener{}
actualListener.InstancePort = int(aws.Int64Value(l.InstancePort)) actualListener.InstancePort = int(aws.Int64Value(l.InstancePort))
actualListener.SSLCertificateID = aws.StringValue(l.SSLCertificateId)
actual.Listeners[loadBalancerPort] = actualListener actual.Listeners[loadBalancerPort] = actualListener
} }