k3s/pkg/cloudprovider/providers/aws
Kubernetes Submit Queue cf5d4011ac
Merge pull request #55731 from georgebuckerfield/elb-tagging
Automatic merge from submit-queue (batch tested with PRs 50457, 55558, 53483, 55731, 52842). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Ensure new tags are created on existing ELBs

**What this PR does / why we need it**:

When editing an existing service of type LoadBalancer in an AWS environment and adding the `service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags` annotation, you would expect the new tags to be set on the load balancer, however this doesn't happen currently. The annotation only takes effect if specified when the service is created.

This PR adds an AddTags method to the ELB interface and uses this to ensure tags set in the annotation are present on the ELB. If the tag key is already present, the value will be updated.

This PR does not remove tags that have been removed from the annotation, it only add/updates tags.

**Which issue(s) this PR fixes**:
Fixes #54642 

**Special notes for your reviewer**:
The change requires that the IAM policy of the master instance(s) has the `elasticloadbalancing:AddTags` permission.

**Release note**:

```release-note
Ensure additional resource tags are set/updated AWS load balancers
```
2017-11-18 11:36:22 -08:00
..
BUILD Apply taint when a volume is stuck in attaching state on node 2017-11-13 12:30:52 -05:00
OWNERS
aws.go Merge pull request #55731 from georgebuckerfield/elb-tagging 2017-11-18 11:36:22 -08:00
aws_fakes.go Merge pull request #55731 from georgebuckerfield/elb-tagging 2017-11-18 11:36:22 -08:00
aws_instancegroups.go
aws_loadbalancer.go Merge pull request #55731 from georgebuckerfield/elb-tagging 2017-11-18 11:36:22 -08:00
aws_loadbalancer_test.go
aws_metrics.go
aws_routes.go Replace the deprecated function with the suggest function 2017-08-21 10:50:52 +08:00
aws_test.go Modify the AWS cloud provider to ensure additional load balancer tags are added to existing load balancers 2017-11-14 21:47:50 +00:00
aws_utils.go Replace the deprecated function with the suggest function 2017-08-21 10:50:52 +08:00
device_allocator.go
device_allocator_test.go
instances.go
instances_test.go
log_handler.go
regions.go
regions_test.go Moved fakes to a separate file usable by other tests 2017-09-22 13:30:05 -04:00
retry_handler.go
retry_handler_test.go
sets_ippermissions.go
tags.go
tags_test.go Moved fakes to a separate file usable by other tests 2017-09-22 13:30:05 -04:00
volumes.go