Commit Graph

513 Commits

Author SHA1 Message Date
Ciprian Hacman 19bf106c27 Remove support for Kubenet with containerd 2020-12-27 22:14:55 +02:00
Ciprian Hacman e736da09a5 Add config options for container runtime package URL and Hash 2020-12-23 13:50:48 +02:00
Ciprian Hacman 8834a59deb Update CNI plugins to v0.8.7 2020-12-21 12:42:43 +02:00
Ciprian Hacman 665438f70f Drop support for containerd 1.2 2020-12-21 12:37:19 +02:00
Bharath Vedartham 2eb9175f4b Explicitly specify http_endpoint in launch_template terraform
http_endpoint has to be explicitly specified in the metadata_options block
of the launch template terraform according to issue
https://github.com/hashicorp/terraform-provider-aws/issues/12564
2020-12-09 22:36:51 +02:00
Kubernetes Prow Robot 6bbc4bab38
Merge pull request #10384 from hakman/automated-cherry-pick-of-#10324-upstream-release-1.19
Automated cherry pick of #10324: Add support for AWS IMDS v2
2020-12-08 07:03:12 -08:00
Bharath Vedartham 858e23e6eb update integration tests 2020-12-08 09:07:35 +02:00
Ciprian Hacman 05be58df7c Update expected outputs of integration tests 2020-12-08 08:09:37 +02:00
Ciprian Hacman 5f019a83a1 Add option for setting the volume encryption key in AWS 2020-12-08 08:00:50 +02:00
Ciprian Hacman 40ac40439b Add option to reuse existing Elastic IPs for NAT gateways 2020-12-06 16:09:36 +02:00
Rodrigo Menezes 6202bb470b Update expected tests results for 1.19 2020-12-04 11:03:03 -08:00
Rodrigo Menezes e2fad53b0d gzip and base64 encode the heredocs in the nodeup.sh portion of user-data 2020-12-04 10:56:10 -08:00
Ciprian Hacman f8b8969a1e Allow attaching same external target group to multiple instance groups 2020-12-03 07:14:01 +02:00
Ciprian Hacman 9210417fbe Update expected outputs of integration tests 2020-12-02 10:15:26 +02:00
Rodrigo Menezes eb53835d1c Remove copywrite from nodeup scripts to reduce the user-data size 2020-11-30 13:50:38 -08:00
Rodrigo Menezes 2ae4f60be7 Allow setting CPU limit and Mem request / limit for kube API 2020-11-23 11:26:09 -08:00
Kubernetes Prow Robot 6ac0e177e2
Merge pull request #10288 from hakman/automated-cherry-pick-of-#10276-upstream-release-1.19
Automated cherry pick of #10276: Parse TargetGrup names from ARNs
2020-11-21 14:07:33 -08:00
Frank Yang 3f17070bf1 feat(aws): add PolicyNames for ELB to change listener's security policy 2020-11-21 22:43:37 +02:00
Ciprian Hacman 8531d5e5df Update integration test for ExternalLoadBalancers 2020-11-21 22:18:43 +02:00
Kubernetes Prow Robot 6cf691bcf5
Merge pull request #10226 from hakman/automated-cherry-pick-of-#10151-upstream-release-1.19
Automated cherry pick of #10151: Use LT versions instead of timestamped LTs
2020-11-15 21:19:04 -08:00
Ciprian Hacman 52b37619f2 Validate external IAM policies 2020-11-13 07:39:56 +02:00
Ciprian Hacman ce7ea29b7b Update expected test output 2020-11-12 12:53:58 +02:00
Ciprian Hacman ceec973776 Use LaunchTemplate name instead of name_prefix for Terraform 2020-11-12 12:46:36 +02:00
Peter Rifel 326e2f9065 Always use TCP health check protocol for target groups 2020-11-10 21:01:17 +02:00
Peter Rifel f156b91dd7 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-10 21:01:17 +02:00
Peter Rifel 16f4184dbe Update complex integration test for ACM cert and second listener 2020-11-10 21:01:16 +02:00
Ciprian Hacman db01e143cd Update expected outputs of integration tests 2020-11-05 05:40:46 +02:00
Ciprian Hacman 2a9b137551 Order policy document sections alphabetically 2020-11-05 05:35:10 +02:00
Ciprian Hacman 056c9acc97 Add missing instance monitoring for CF and TF 2020-11-05 05:35:10 +02:00
Ciprian Hacman 7f27d8367d Add missing resource names for CF 2020-11-05 05:35:10 +02:00
Peter Rifel 2a1adb9204
Fix additionalSecurityGroups support for NLB
We were correctly adding the security groups to the master ASGs but identified them incorrectly.
2020-11-03 10:03:48 -06:00
Peter Rifel 79d744ea13
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 10:03:45 -06:00
Peter Rifel 781c58dd91
Fix NLB naming for terraform and cloudformation targets 2020-11-02 22:04:01 -06:00
Peter Rifel 2f328116ef
Automated cherry pick of #10140 and #9011: Implement API load balancer class with NLB and ELB support on AWS (#10154)
* Create cloudmock implementations for elbv2 API calls used by future NLB support

* Add missing cloudmock functionality for enabling lifecycle integration test on complex cluster

* Add lifecycle integration tests for complex and externallb clusters

* 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: Christian Joun <cjoun@proofpoint.com>
2020-11-02 09:10:54 -08:00
Rodrigo Menezes 0456419c2e Move external LB and target group to inline as well. 2020-10-28 21:24:48 -07:00
Rodrigo Menezes 1116a90575 Prevent unintended resource updates to LB attatchments 2020-10-28 21:24:48 -07:00
Peter Rifel a8d08bc2aa
Fix cloudformation lint errors
```
E3002 Invalid Property Resources/AWSAutoScalingAutoScalingGroupnodesmixedinstancesexamplecom/Properties/MixedInstancesPolicy/InstancesDistribution/SpotInstancePool
//kops/tests/integration/update_cluster/mixed_instances_spot/cloudformation.json:321:13

E3031 CidrIp contains invalid characters (Pattern: x.x.x.x/y) at Resources/AWSEC2SecurityGroupIngresssshexternaltonode2001085a348/Properties/CidrIp
//kops/tests/integration/update_cluster/complex/cloudformation.json:833:9
```

I'm using the strings.Contains to determine if a CIDR is v6 since it seems simplest given that we know the value wont have a port number [0]

[0] https://stackoverflow.com/questions/22751035/golang-distinguish-ipv4-ipv6
2020-10-28 15:05:27 -05:00
Ciprian Hacman 022f4a4158 Install container runtime packages as assets - Integration 2020-10-27 20:24:31 +02:00
John Gardiner Myers e2b992d8f8 update-expected.sh 2020-10-24 17:13:54 -07:00
binkkatal 86b605d10b RUN: ./hack/update-expected.sh 2020-10-20 19:28:20 +05:30
Nicolas Vanheuverzwijn 5f59b86c78
Update tests/integration/channel/integration_test.go
Co-authored-by: Ciprian Hacman <ciprianhacman@gmail.com>
2020-10-14 13:23:04 -04:00
Nicolas Vanheuverzwijn b0fd89a193 upgrade-cluster: test that new image in stable or alpha channel will receive automated update 2020-10-14 10:14:47 -04:00
Ciprian Hacman dc86205faf Update expected outputs of integration tests 2020-10-09 17:12:37 +03:00
Ciprian Hacman 9c888bcdcf Update expected outputs of integration tests 2020-10-09 09:33:39 +03:00
Peter Rifel 4bcfebebcc
Fix the detection and rendering of multiple additionalNetworkCIDR blocks 2020-09-27 20:12:09 -05:00
Peter Rifel 0978cd97e8
Add second additionalNetworkCIDR w/ incorrect test output 2020-09-27 20:08:09 -05:00
Justin SB 2a44cb7f16 Update script and testdata CA keypair
If we generate with the wrong type (usages), the keypair will be
regenerated.
2020-09-12 16:21:15 -04:00
Justin SB 6fa8be2716 JSON formatting of IAM: Workaround for optional fields
AWS IAM is very strict and doesn't support `Resource: []` for example.
We implement a custom MarshalJSON method to work around that.
2020-09-09 09:57:07 -04:00
Justin SB a61ecf4c58 Refactor to use interface for iam Subjects
Hat-tip to johngmyers for the idea!
2020-09-09 09:57:07 -04:00
Justin SB ccc814dfbc Create tests for JWKS scenarios 2020-09-09 09:57:06 -04:00