Commit Graph

203 Commits

Author SHA1 Message Date
Justin Santa Barbara a9eb6fed2e AWS: Delete old LaunchConfigurations
We delete old AWS LaunchConfigurations when we see that we have more
than 3.  We add a feature flag KeepLaunchConfigurations to disable this
functionality, for backwards compatability.

Fixes #329
2018-06-17 23:24:53 -04:00
Justin Santa Barbara 0234285826 Stub out EC2 & IAM interfaces
This auto implements the new methods (they panic if called).  Technique
borrowed from mockelb (thanks @vainu-arto ).

Assuming this approach works, we can get rid of the annoying
unimplemented.go files.
2018-06-03 22:08:41 -07:00
Justin Santa Barbara afa0577749 Check tags in lifecycle tests
We want to make sure that everything owned is tagged as such, and that
some shared resources (in particular subnets) are tagged as such.
2018-03-25 15:55:44 -04:00
k8s-ci-robot 01cacbd53c
Merge pull request #4786 from justinsb/refactor_discover_security_groups
SecurityGroup deletion: recognize shared tags
2018-03-25 08:33:01 -07:00
Justin Santa Barbara 8250cf0571 cloudmock: update to support tag-key query on securitygroup 2018-03-25 01:17:27 -04:00
Justin Santa Barbara e81e53b5b2 mockec2: allow elastic ip tagging 2018-03-25 00:01:41 -04:00
Justin Santa Barbara 1edd7d49fa Add deletion to lifecycle test 2018-03-24 16:30:40 -04:00
Justin Santa Barbara c8a8d72534 mockec2: more missing locking 2018-03-20 19:20:39 -04:00
k8s-ci-robot 4ab61d924f
Merge pull request #4712 from justinsb/cloudmock_rta_key
cloudmock: fix prefix for RouteTableAssociation
2018-03-19 21:49:02 -07:00
Justin Santa Barbara 0711df9de4 Improve logic around VPC detection
Issue #4265
2018-03-19 18:15:37 -04:00
Justin Santa Barbara b442b4222e cloudmock: fix prefix for RouteTableAssociation
We were generating ids with two hyphens (rta--1)
2018-03-18 17:11:47 -04:00
Justin Santa Barbara baf57f3d2b cloudmock: fix locking around vpcs and subnets 2018-03-18 10:25:25 -04:00
Justin Santa Barbara a46d981d81 More mocks - for shared VPC 2018-03-15 20:11:54 -04:00
k8s-ci-robot 4ad014647b
Merge pull request #4654 from justinsb/private_topology_roundtrip_test
More mocks - sufficient for privatecalico to roundtrip
2018-03-12 22:59:11 -07:00
k8s-ci-robot 3822992c32
Merge pull request #4655 from justinsb/cloudmock_docs
Add README to say what cloudmock is
2018-03-12 08:18:23 -07:00
Justin Santa Barbara ab7439b360 More mocks - sufficient for privatecalico to roundtrip 2018-03-11 23:12:22 -04:00
Justin Santa Barbara 5f828ae7ec Add README to say what cloudmock is 2018-03-11 17:35:54 -04:00
Justin Santa Barbara 85b972bc28 Fill out cloudmock to do a basic lifecycle test 2018-03-11 17:04:30 -04:00
Justin Santa Barbara 725bfc90ff Add new EC2 mock functions 2018-02-28 23:06:21 -05:00
Johannes Würbach 02855fc13f
Enable metrics for AutoScalingGroups
Those metrics simplify monitoring the created ASGs and are free [0].

Enable them by default.

[0] https://aws.amazon.com/about-aws/whats-new/2016/08/free-auto-scaling-group-metrics-with-graphs/
2018-01-25 20:06:10 +01:00
Albert 43efd9d07a Update aws-sdk-go to 1.12.57 2018-01-09 17:22:38 +08:00
Kubernetes Submit Queue e88496a248
Merge pull request #4061 from meringu/create-subnets
Automatic merge from submit-queue.

Add --subnets and --utility-subnets to kops create cluster

This change adds two new options to `kops create cluster`

When specifying `--vpc`, `--subnets` can be specified as an unordered array of subnet ids. Kops will then look up the zones of the subnets to find which zone to add the subnet id to.

If `--topology private` is also specified, `--utility-subnets` can similarly be specified.

~If a zone was specified but a subnet wasn't given that matches the zone, then the subnet will be allocated a CIDR with the current behaviour.~ This case fails validation here 7bd0a6a703/pkg/apis/kops/validation/validation.go (L151)

I can add unit tests and docs changes if required, but I am keen to get feedback before I proceed much further.

I have only added support for AWS.

I have tested this by running a command similar to this:

```bash
kops create cluster \
  --zones=us-east-1a,us-east-1b,us-east-1c \
  --topology private \
  --master-zones=us-east-1a,us-east-1b,us-east-1c  \
  --vpc $vpc_id \
  --subnets subnet-111111,subnet-222222,subnet-333333 \
  --utility-subnets subnet-444444,subnet-555555,subnet-666666 \
  $cluster_hosted_zone_name
```

And the cluster spec was as expected.
2017-12-18 21:12:59 -08:00
Henry Muru Paenga afc1b58722 Tests for create cluster in shared vpc 2017-12-15 18:29:20 +13:00
chrislovecnm c8c3926efa missing mockelb build file 2017-12-13 23:57:45 -07:00
Peter Rifel 3da1bdc069 Don't report an InternetGateway rename when using shared IGWs
Adds test to confirm fixed behavior
2017-12-06 16:36:35 -08:00
Kubernetes Submit Queue 23319a0974
Merge pull request #3941 from vainu-arto/private_dns_cert_fix
Automatic merge from submit-queue.

When using private DNS add ELB name to the api certificate

This fixes issue #2032 by using the gossip paths with private dns as well:

* When creating the api server certificate, include the ELB hostname
* When generating kubeconfig, use the ELB hostname as the api server name
2017-12-04 06:01:25 -08:00
Arto Jantunen 53669b8217 Make ELB somewhat mockable 2017-11-28 11:48:57 +02:00
Rodrigo Menezes 662dfb33e6 update cloudmock for aws-sdk-go v1.10.34 2017-11-18 18:01:34 -08:00
chrislovecnm 609e268a1d gazelle updates with new bazel version 2017-11-05 17:41:53 -07:00
chrislovecnm 1e418c3e13 more goimport updates 2017-11-04 10:03:02 -06:00
chrislovecnm 8d1ee1fa16 updating files for goimports 2017-11-01 12:51:43 -06:00
Justin Santa Barbara 9cf22aeeef Sort Tags consistently to avoid test flakes 2017-10-23 11:39:18 -04:00
Justin Santa Barbara a7f82a6380 Fix shared subnet/vpc tags
* Stop setting the Name tag on a shared subnet/vpc

* Stop setting the legacy KubernetesCluster tag on a shared subnet/vpc
that is new enough (>=1.6); we rely on the shared tags instead

* Set tags on shared subnets; i.e. we _do_ set the shared tag on a
shared subnet; that is important for ELBs

* Set tags on shared VPCs; i.e. we _do_ set the shared tag on a shared
VPC; that is not used but consistent with subnets.

* Add tests for shared subnet
2017-10-23 11:30:25 -04:00
Justin Santa Barbara 0143be7c4f autogen: BUILD and BUILD.bazel 2017-10-02 14:27:21 -04:00
Adam H. Leventhal 2a9315ac56 Support dns=private with terraform #1848 2017-04-06 07:44:41 -07:00
andrewsykim 976b54f398 unit tests for rolling updates 2017-03-24 20:23:55 -04:00
Justin Santa Barbara fec89f0f33 Skip DNS precreate on CF; a few test fixes 2017-02-17 11:04:39 -05:00
andrewsykim c78d41cdba add mock autoscaling 2017-02-11 10:09:26 -05:00
Justin Santa Barbara 46fd9a842d Update aws-sdk-go mocks with new functions 2016-12-30 10:47:44 -05:00
Justin Santa Barbara 04c9f8c253 mockroute53: support record creation 2016-12-28 14:04:46 -05:00
Justin Santa Barbara 8ce09c65e9 Fixes per code review 2016-12-19 01:18:28 -05:00
Justin Santa Barbara 68baecafb6 Simple test for securitygroups task 2016-12-18 16:06:34 -05:00
Justin Santa Barbara eeca9cfbc3 mockec2: first step towards volume support
Just stubs DescribeVolumes call
2016-12-17 23:17:16 -05:00
Chris Love 75530cfcb6 Merge pull request #1139 from justinsb/simple_test_for_vpc_task
Add super-simple test for VPC task
2016-12-13 21:05:55 -07:00
Justin Santa Barbara 3415d15f12 Mock Route53 GetHostedZone 2016-12-12 12:26:53 -05:00
Justin Santa Barbara d8f1a0679d Add super-simple test for VPC task 2016-12-12 11:22:46 -05:00
Justin Santa Barbara 6d2879aaec Fix boilerplate on zones.go 2016-12-11 20:26:25 -05:00
Justin Santa Barbara afd0c25abe First model -> tf test 2016-12-11 17:11:10 -05:00
Justin Santa Barbara ee24ca1acc Add mock ec2 images API 2016-12-11 17:11:10 -05:00
Justin Santa Barbara f4092d0113 First test of a fi.Task 2016-12-08 13:17:38 -05:00
chrislovecnm 3f29bc982e updating header 2016-11-30 22:46:33 -07:00
Justin Santa Barbara b1d6e3d04d Add mocks for new EC2 functions 2016-11-04 01:23:47 -04:00
Justin Santa Barbara 6ec5da2827 Add unit test for deleting untagged route table 2016-10-18 22:16:05 -04:00