Skip to content

Commit

Permalink
Don't replace service account with update-aws-node
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbeaumont committed Jul 21, 2020
1 parent bcbc2f1 commit d817998
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/addons/default/aws_node.go
Expand Up @@ -76,6 +76,18 @@ func UpdateAWSNode(rawClient kubernetes.RawClientInterface, region string, plan
continue
}

// Leave service account if it exists
// to avoid overwriting annotations
if resource.GVK.Kind == "ServiceAccount" {
_, exists, err := resource.Get()
if err != nil {
return false, err
}
if exists {
continue
}

}
status, err := resource.CreateOrReplace(plan)
if err != nil {
return false, err
Expand Down

0 comments on commit d817998

Please sign in to comment.