Commit Graph

59 Commits (b0f6857f92616a288c7398e90d1f6886ecbc92ee)

Author SHA1 Message Date
Kubernetes Prow Robot af17925f68
Merge pull request #73594 from masterzen/bugfix/73479-nlb-target-groups-tags
Fix #73479 AWS NLB target groups missing tags
2019-02-07 17:12:10 -08:00
Brice Figureau bbee2da7f3 Fix #73479 AWS NLB target groups missing tags
`elbv2.AddTags` doesn't seem to support assigning the same set of
tags to multiple resources at once leading to the following error:
  Error adding tags after modifying load balancer targets:
  "ValidationError: Only one resource can be tagged at a time"

This can happen when using AWS NLB with multiple listeners pointing
to different node ports.

When k8s creates a NLB it creates a target group per listener along
with installing security group ingress rules allowing the traffic to
reach the k8s nodes.

Unfortunately if those target groups are not tagged, k8s will not
manage them, thinking it is not the owner.

This small changes assigns tags one resource at a time instead of
batching them as before.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>
2019-02-07 19:43:46 +01:00
M00nF1sh 416a98e030 support multiple cidr vpc for nlb health check 2019-02-05 17:31:16 -08:00
andrewsykim 596c6fbf03 e2e test for node deleted in cloud provider 2019-01-25 17:45:18 -05:00
Johannes Würbach 5e6d865794
AWS NLB: Support cross-zone load balancing annotation
AWS Network Load Balancer recently got support for cross-zone load balancing.

Use the existing `service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled`
annotation to configure it.
2019-01-02 20:38:59 +01:00
Kelly Campbell f052146a96 Fix AWS NLB security group updates
This corrects a problem where valid security group ports were removed
unintentionally when updating a service or when node changes occur.

Fixes #60825, #64148
2018-11-11 06:42:13 -05:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
k8s-ci-robot a49e4e128e
Merge pull request #69708 from mcrute/fix-aws-imports
Fix AWS volume and cloud provider import order
2018-10-30 13:44:50 -07:00
Mike Crute 49df100af9 fix AWS volume and cloud provider import order 2018-10-30 08:18:45 -07:00
Mike Crute 4d65f20ff6 fix golint for pkg/cloudprovider/providers/aws 2018-10-08 12:08:56 -07:00
hangaoshuai 47c753aa18 use aws.StringSlice replace of deprecated func stringPointerArray 2018-07-28 16:57:36 +08:00
Kubernetes Submit Queue 53fd4cd46d
Merge pull request #58327 from sharmaansh/patch-2
Automatic merge from submit-queue (batch tested with PRs 58920, 58327, 60577, 49388, 62306). 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>.

Replace error string with const
2018-05-30 16:09:24 -07:00
hangaoshuai f78c7d3db0 Use function aws.Int64Value replace of deprecated function orZero 2018-03-20 17:27:20 +08:00
Anshul Sharma 9c591b0c94
Replace error string with const 2018-01-16 14:51:52 +05:30
Manuel de Brito Fontes bea2d8d1aa Fix NLB icmp permission duplication 2017-12-13 20:31:09 -03:00
Kubernetes Submit Queue 6b1b6d504a
Merge pull request #56024 from dimpavloff/aws-elb-set-hc-params
Automatic merge from submit-queue (batch tested with PRs 56211, 56024). 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>.

allow ELB Healthcheck configuration via Service annotations

**What this PR does / why we need it**:
The default settings which are set on the ELB HC work well but there are cases when it would be better to tweak its parameters -- for example, faster detection of unhealthy backends. This PR makes it possible to override any of the healthcheck's parameters via annotations on the Service, with the exception of the Target setting which continues to be inferred from the Service's spec.

**Release note**:
```release-note
It is now possible to override the healthcheck parameters for AWS ELBs via annotations on the corresponding service. The new annotations are `healthy-threshold`, `unhealthy-threshold`, `timeout`, `interval` (all prefixed with `service.beta.kubernetes.io/aws-load-balancer-healthcheck-`)
```
2017-11-22 08:48:43 -08:00
dimitar 8cf7c5e34a allow ELB HC configuration via Service annotations
The constants which have been used so far have been set as default in
case the annotations have not been set.
2017-11-21 14:34:05 +00:00
Micah Hausler f9445b9dc7 Add Amazon NLB support 2017-11-20 08:52:57 -05:00
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
georgebuckerfield 36d59704d9 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
Micah Hausler cb38293093 Added service annotation for AWS ELB SSL policy 2017-10-26 15:21:14 -04:00
xswack 671c0560ae Replace the deprecated function with the suggest function 2017-08-21 10:50:52 +08:00
Robert Rati d6a5175c05 Use %q formatter for error messages from the AWS SDK. #47789 2017-06-23 10:02:21 -04:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Justin Santa Barbara 3d2b71b78f AWS: Maintain a cache of all instances for ELB
We maintain a cache of all instances, and we invalidate the cache
whenever we see a new instance.  For ELBs that should be sufficient,
because our usage is limited to instance ids and security groups, which
should not change.

Fix #45050
2017-06-14 23:39:18 -04:00
Justin Santa Barbara 9803840b5f AWS: Perform ELB listener comparison in case-insensitive manner
Fix #47067
2017-06-13 02:22:38 -04:00
Kubernetes Submit Queue aee0ced31f Merge pull request #43585 from foolusion/add-health-check-node-port-to-aws-loadbalancer
Automatic merge from submit-queue

AWS: support node port health check

**What this PR does / why we need it**:
if a custom health check is set from the beta annotation on a service it
should be used for the ELB health check. This patch adds support for
that.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
Let me know if any tests need to be added.
**Release note**:

```release-note
```
2017-05-29 15:29:51 -07:00
Luis Pabón 67d269749b aws: Support for ELB tagging by users
This PR provides support for tagging AWS ELBs using information in an
annotation and provided as a list of comma separated key-value pairs.

Closes https://github.com/kubernetes/community/pull/404
2017-05-19 16:34:50 -04:00
Andrew O'Neill e397ca4ba7 combine health check methods
I changed the function signature to contain protocol, port, and path.
When the service has a health check path and port set it will create an
HTTP health check that corresponds to the port and path. If those are
not set it will create a standard TCP health check on the first port
from the listeners that is not nil. As far as I know, there is no way to
tell if a Health Check should be HTTP vs HTTPS.
2017-04-19 14:12:28 -07:00
Andrew O'Neill 864ea2fafd pkg/cloudprovider/providers/aws: add node port health check
if a custom health check is set from the beta annotation on a service it
should be used for the ELB health check. This patch adds support for
that.
2017-03-23 12:55:29 -07:00
Justin Santa Barbara 0b5ae5391e AWS: Support shared tag
We recognize an additional cluster tag:

kubernetes.io/cluster/<clusterid>

This now allows us to share resources, in particular subnets.

In addition, the value is used to track ownership/lifecycle.  When we
create objects, we record the value as "owned".

We also refactor out tags into its own file & class, as we are touching
most of these functions anyway.
2017-02-27 16:30:12 -05:00
Justin Santa Barbara 99d475d3fe AWS: Fix a few log messages Info -> Infof 2017-01-16 16:27:39 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Kubernetes Submit Queue 44e25b1087 Merge pull request #33570 from justinsb/aws_elb_more_logging
Automatic merge from submit-queue (batch tested with PRs 38260, 32811, 28458, 33570, 37096)

AWS: include ELB name in health-check logging
2016-12-08 02:11:24 -08:00
Justin Santa Barbara 5bfd15e49e AWS: include ELB name in health-check logging
Makes more supportable
2016-09-27 11:20:42 -04:00
Justin Santa Barbara 54309acd84 AWS: Add log line when we're updating ELB attributes
We want to be sure that reflect.DeepEqual doesn't give false positives

Fix #31127
2016-09-27 11:19:19 -04:00
Jedrzej Nowak 9e2abd4b02 Fix various typos in pgk/cloudprovider,dns,kubectl 2016-08-31 18:56:52 +02:00
Kent Rancourt 96dad1f0f3 Add support for managing ELB attributes with service annotations 2016-08-16 13:07:49 -04:00
Rohith 0da5f50b03 - fixing the spelling mistakes 2016-08-04 10:17:59 +01:00
lixiaobing10051267 6de7bc0085 format number not consistent with real variable number 2016-07-20 11:14:45 +08:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Rudi Chiarito 8db551f674 golint fixes for aws cloudprovider 2016-06-24 17:06:38 -04:00
goltermann 218645b346 Fix several spelling errors in comments. 2016-06-17 10:41:18 -07:00
Andrew Williams 01d9cddda5 Add Amazon ELB proxy protocol support
Add ELB proxy protocol support via the annotation
"service.beta.kubernetes.io/aws-load-balancer-proxy-protocol". This
allows servers like Nginx and Haproxy to retrieve the real IP address of
a remote client.
2016-05-31 10:33:16 -05:00
Chris Batey and James Ravn be9ce30897 Change LoadBalancer methods to take api.Service
This is a better abstraction than passing in specific pieces of the
Service that each of the cloudproviders may or may not need. For
instance, many of the providers don't need a region, yet this is passed
in. Similarly many of the providers want a string IP for the load
balancer, but it passes in a converted net ip. Affinity is unused by
AWS. A provider change may also require adding a new parameter which has
an effect on all other cloud provider implementations.

Further, this will simplify adding provider specific load balancer
options, such as with labels or some other metadata. For example, we
could add labels for configuring the details of an AWS elastic load
balancer, such as idle timeout on connections, whether it is
internal or external, cross-zone load balancing, and so on.

Authors: @chbatey, @jsravn
2016-03-23 10:48:11 +00:00
Justin Santa Barbara 5cf837452b AWS: Fix problems identifying subnets for internal ELBs
We tacitly supported this before, but we broke this with the
public-subnet detection.

Fix #22527
2016-03-06 09:41:29 -05:00
James Ravn f568b6511a Handle aws implicit and shared routing tables
Fix the AWS subnet lookup that checks if a subnet is public, which was
missing a few cases:

- Subnets without explicit routing tables, which use the main VPC
  routing table.
- Routing tables not tagged with KubernetesCluster. The filter for this
  is now removed.
2016-02-25 22:52:26 +00:00
k8s-merge-robot f08a8f23c1 Merge pull request #20959 from justinsb/fix_20911
Auto commit by PR queue bot
2016-02-20 00:56:53 -08:00
Justin Santa Barbara a0093eb503 e2e: Don't try to create a UDP LoadBalancer on AWS
AWS doesn't support type=LoadBalancer with UDP services.  For now, we
simply skip over the test with type=LoadBalancer on AWS for the UDP
service.

Fix #20911
2016-02-10 12:31:18 -05:00