Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly set lifecycle on LB resources #3226

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions upup/pkg/fi/cloudup/awstasks/dnsname.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func (e *DNSName) Find(c *fi.Context) (*DNSName, error) {
actual.Zone = e.Zone
actual.Name = e.Name
actual.ResourceType = e.ResourceType
actual.Lifecycle = e.Lifecycle

if found.AliasTarget != nil {
dnsName := aws.StringValue(found.AliasTarget.DNSName)
Expand Down
5 changes: 2 additions & 3 deletions upup/pkg/fi/cloudup/awstasks/load_balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ package awstasks

import (
"fmt"

"sort"
"strconv"

"strings"

"github.com/aws/aws-sdk-go/aws"
Expand All @@ -32,7 +31,6 @@ import (
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
"k8s.io/kops/upup/pkg/fi/cloudup/cloudformation"
"k8s.io/kops/upup/pkg/fi/cloudup/terraform"
"sort"
)

// LoadBalancer manages an ELB. We find the existing ELB using the Name tag.
Expand Down Expand Up @@ -286,6 +284,7 @@ func (e *LoadBalancer) Find(c *fi.Context) (*LoadBalancer, error) {
actual.DNSName = lb.DNSName
actual.HostedZoneId = lb.CanonicalHostedZoneNameID
actual.Scheme = lb.Scheme
actual.Lifecycle = e.Lifecycle

for _, subnet := range lb.Subnets {
actual.Subnets = append(actual.Subnets, &Subnet{ID: subnet})
Expand Down
1 change: 1 addition & 0 deletions upup/pkg/fi/cloudup/awstasks/load_balancer_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func (e *LoadBalancerAttachment) Find(c *fi.Context) (*LoadBalancerAttachment, e

// Prevent spurious changes
actual.Name = e.Name // ELB attachments don't have tags
actual.Lifecycle = e.Lifecycle

return actual, nil
}
Expand Down