Commit Graph

36 Commits

Author SHA1 Message Date
Ole Markus With afbd057286 Use consistent naming for the remaining SGRs 2021-01-14 12:57:33 +01:00
Ciprian Hacman e57cd534b5 Allow attaching same external target group to multiple instance groups 2020-12-03 06:59:59 +02:00
Frank Yang 93dcaddc48 feat(aws): add PolicyNames for ELB to change listener's security policy 2020-11-19 16:07:21 +08:00
Peter Rifel 4758ea9f2f
Address feedback 2020-11-09 17:24:32 -06:00
Peter Rifel 370092cb5a
Update TG ports rather than protocols when adding/removing ACM certs from listeners
This also renames the TGs to be more descriptive, with tcp and tls prefixes.
2020-11-06 11:09:38 -06:00
Peter Rifel 9242c34a38
Setup a second NLB listener on 8443 when sslCertificate is set 2020-11-06 11:09:37 -06:00
Peter Rifel 6c5b2fc58f
Add support for multiple NLB listeners and target groups 2020-11-06 11:09:36 -06:00
Peter Rifel f08284834e
Move NLB's VPC CIDR security group rule logic into model
This way the security group rule task doesn't need to be aware of VPCs, since we know the VPC CIDR ahead of time via cluster spec.

This also fixes the terraform and cloudformation rendering of this rule (see the added cidr block in the integration test outputs)

These rules are for NLB's health checks. The AWS docs recommend allowing access from the entire VPC CIDRs
Also add rules for additionalNetworkCIDRs, supporting VPCs with multiple CIDR blocks.
2020-11-03 08:13:32 -06:00
Christian Joun e91ed11449
Implement API load balancer class with NLB and ELB support on AWS (#9011)
* refactor TargetLoadBalancer to use DNSTarget interface instead of LoadBalancer

* add LoadBalancerClass fields into api

* make api machinery

* WIP: Implemented API loadbalancer class, allowing NLB and ELB support on AWS for new clusters.

* perform vendoring related tasks and apply fixes identified from hack/

dissallow spotinst + nlb
remove reflection in status_discovery.go
Add precreated additional security groups to the Master nodes in case of NLB
Remove support for attaching individual instances to NLB; only rely on ASG attachments
Don't specify Classic loadbalancer in GCE integration test

* add utility function to the kops model context to make LoadBalancer comparisons simpler

* use DNSTarget interface when locating DNSName of API ELB

* wip: create target group task

* Consolidate TargetGroup tasks

* Use context helper for determining api load balancer type to avoid nil pointers

* Update NLB creation to use target group ARN from separate task rather than creating a TG in-line

* Address staticcheck and bazel failures

* Removing NLB Attachment tasks because they're not used since we switched to defining them as a part of the ASGs

* Address PR review feedback

* Only set LB Class field for AWS clusters, fix nil pointer

* Move target group attributes from NLB task to TG task, removing unused attributes

* Add terraform and cloudformation support for NLBs, listeners, and target groups

* Update integration test for NLB support

* Fix NLB name format to pass terraform validation

* Preserve security group rule names when switching ELB to NLB to reduce destructive terraform changes

* Use elbv2 enums and address some TODOs

* Set healthcheck values in target group

* Find TG tags, fix NLB name detection

* Fix more spurious changes reported by lifecycle integration test

* Fix spotinst validation, more code cleanup

* Address more PR feedback

* ReconcileTargetGroups unit test + more code simplification

* Addressing PR feedback Renaming task 1. awstasks.LoadBalancer -> awstasks.ClassicLoadBalancer

* Addressing PR feedback Renaming task: ELBName() -> CLBName() / LinkToELB() -> LinkToCLB()

* Addressing PR feedback: Various text changes

* fix export of kubecfg

* address TargetGroup should have the same name as the NLB

* should address error when fetching tags due to missing ARN

* Update expected and crds

* Add feature table to NLB docs

* Address more feedback and remove some TODOs that arent applicable anymore

* Update spotinst validation error message

Co-authored-by: Peter Rifel <pgrifel@gmail.com>
2020-11-02 05:28:52 -08:00
Rodrigo Menezes 82d0ebdb56 Prevent unintended resource updates to LB attatchments 2020-10-26 17:29:07 -07:00
Peter Rifel 4d9f0128a3
Upgrade to klog2
This splits up the kubernetes 1.19 PR to make it easier to keep up to date until we get it sorted out.
2020-08-16 20:56:48 -05:00
John Gardiner Myers 86f157fa27 Refactor how api-server addresses are exported from tasks 2020-06-26 21:38:39 -07:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Austin Moore 4485b115f4
Default CrossZoneLoadBalancing to false if not set 2019-07-26 12:21:43 -04:00
Austin Moore d59ac283ed
Add configuration to set cross-zone load balancing on api load balancer 2019-07-26 12:21:42 -04:00
Justin SB 3e33ac7682
Change code from glog to klog
We don't call klog.InitFlags yet, because that will cause a flag
redefinition error until we get everyone to stop using glog.  That
will happen when we update to k8s 1.13.
2019-05-06 12:54:51 -04:00
mikesplain 14cbad9bc0 Fix tagging and remove tagging elbs 2019-03-29 13:29:11 -04:00
ryan-dyer fd2ed53f79 2048 - Add cloudLabels as tags to API ELB resource 2019-03-20 09:00:05 -05:00
Rohith 74af751dc6 - fixing up the conflicts post the additional volumes merge 2019-02-04 14:15:16 +00:00
Rohith 761d760c11 - updating the aws model to make use of the aws template and mixed instance policies 2019-02-04 11:59:42 +00:00
David Archer 36d2282d6b AWS: Enable ICMP Type 3 Code 4 for API server ELBs 2019-01-12 07:20:17 -05:00
Liran Polak 9db3567cac fix: skip the load balancer attachment 2018-10-29 22:28:15 +02:00
Justin Santa Barbara e5d8b37772 Don't override name of ELB API SecurityGroup
We don't need to because there can be only one, and it risks breaking
other callers of LinkToELBSecurityGroup (though admittedly there
aren't any!)
2018-10-03 09:57:58 -07:00
Justin Santa Barbara bfb54935ff Build security groups along with suffixes
Fixes the case where we mix use of specified & default SGs.
2018-10-02 11:53:41 -07:00
Rodrigo Menezes 87eec75f5b Fix blocker 2018-10-02 10:22:09 -07:00
Rodrigo Menezes a82f548ff8 Allow using existing/shared Security Groups
Verbosely log when a user overwrites LB or IG security groups

Change SecurityGroup to SecurityGroupOverride

Allow using existing/shared Security Groups

Update tests
2018-10-02 00:51:39 -07:00
Raffaele Di Fazio d477e96c38 Added initial implementation of ACM cert for Kubernetes API ELB 2018-07-06 09:29:54 +02:00
Justin Santa Barbara 12873d3868 SecurityGroups: ensure owned security groups are tagged 2018-03-24 22:19:54 -04:00
chrislovecnm 9c2f6cc890 adding missed lifecycles in elb code 2017-12-27 16:19:34 -07:00
Abdullah Almariah 1dbc6064a5 Allow additional SGs to be added to API loadbalancer 2017-12-11 15:24:08 +01:00
Arto Jantunen dd64f1ed6c Include ELB hostname in certificate when using private DNS 2017-11-28 11:48:57 +02:00
chrislovecnm dc338c4829 Refactoring phases to work in sequence properly 2017-10-26 13:17:34 -06:00
Johannes Würbach 2accc73a72
Use SSL in ELB API server health check
This switch causes the ELB to perform a SSL handshake and makes the
`I0427 03:57:55.059255       1 logs.go:41] http: TLS handshake error from IP:PORT: EOF`
disappear from the apiserver logs.
2017-08-07 13:02:40 +02:00
Justin Santa Barbara 3dfe48e5ae Wiring up lifecycle 2017-07-15 22:03:54 -04:00
Justin Santa Barbara 9d40b0e6ca Support internal (gossip) names for AWS also 2017-06-19 14:16:35 -04:00
Justin Santa Barbara c9ac0cdbd8 Support GCE ForwardingRule (LoadBalancer) for API
Also lots of GCE cleanup
2017-03-28 00:00:20 -04:00