mirror of https://github.com/kubernetes/kops.git
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:
parent
a300c2aa4c
commit
c3d2038b1e
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue