Commit Graph

269 Commits

Author SHA1 Message Date
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
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
Kubernetes Prow Robot 4604fa53b3
Merge pull request #9899 from olemarkus/remove-insecure-bind-address
Don't explicitly set insecure-bind-address on newer k8s
2020-09-09 03:25:53 -07:00
Ole Markus With 886b4c97cb Don't explicitly set insecure-bind-address on newer k8s 2020-09-09 11:41:51 +02:00
Ciprian Hacman 43e0b2332c Update expected outputs of integration tests 2020-09-08 10:12:57 +03:00
Ciprian Hacman d1bdc1632d Update expected outputs of integration tests 2020-09-08 08:46:09 +03:00
Kubernetes Prow Robot 277038d419
Merge pull request #9839 from rifelpet/tf-cert-id
Dont generate the ssl_certificate_id field on TCP listeners in Terraform
2020-08-31 06:14:21 -07:00
Peter Rifel 0326ce4ad7
Dont generate the ssl_certificate_id field on TCP listeners in Terraform 2020-08-30 09:44:16 -05:00
Justin SB 786423f617 Expose JWKS via a feature-flag
When the PublicJWKS feature-flag is set, we expose the apiserver JWKS
document publicly (including enabling anonymous access).  This is a
stepping stone to a more hardened configuration where we copy the JWKS
document to S3/GCS/etc.

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2020-08-30 10:15:11 -04:00
Ciprian Hacman cd82550088 Update integration test for Calico after validation changes 2020-08-24 12:54:15 +03:00
Ciprian Hacman 3f8edd74fe Update integration test for Calico 2020-08-24 12:30:37 +03:00
Ciprian Hacman 2880e22bce Add flag for root volume encryption 2020-08-21 18:31:21 +03:00
Kubernetes Prow Robot 8a81d94c7b
Merge pull request #9773 from victorfrancax1/7286
Adding support for permission boundaries for AWS IAM Roles
2020-08-19 06:51:11 -07:00
Victor Ferreira 3aaa9a7c0f feat(aws): adding support to permission boundaries for IAM Roles 2020-08-19 01:16:13 -03:00
Kubernetes Prow Robot 96ab8423b1
Merge pull request #9566 from hakman/arm64-images
Add ARM64 support for masters
2020-08-14 20:46:17 -07:00
Ole Markus With 9890839cec Add an integration test for openstack floating ip
* Integration test for floatingip cluster
* Implements mocking of floatingIP (only list for now)
* Expands various cloudmocks
* Fixes an NPR in openstack validation
* Fixes a bug where kops tries to use DNS even if the cluster is gossip
2020-08-12 12:59:30 +02:00
Peter Rifel 6991655921
Add openstack integration test.
This will create / update / update / delete an openstack cluster using cloudmock, ensuring there are no lingering changes reported or orphaned resources
2020-08-10 15:22:49 -05:00
Ciprian Hacman 527b1eb36f ARM64 support - Update expected tests output 2020-08-10 12:05:24 +03:00
John Gardiner Myers cd2941b56c update-expected.sh 2020-07-29 17:24:39 -07:00
Peter Rifel f3e6ac874d
Update integration test outputs with new ssh key tags 2020-07-28 13:35:10 -05:00
John Gardiner Myers be3e311c12 update-expected.sh 2020-07-17 19:32:53 -07:00
John Gardiner Myers c0774d7ffa Stop using legacy IAM in integration tests 2020-07-17 19:32:48 -07:00
Peter Rifel f213854330
Update integration test outputs with filebase64 2020-07-08 23:24:11 -05:00