Commit Graph

210 Commits

Author SHA1 Message Date
Kris Nova 14f01fb904 Add back to list 2017-02-23 23:32:27 -08:00
Kris Nova 946208257f Adding filter for cluster names 2017-02-23 23:31:09 -08:00
Justin Santa Barbara 755c2c0b31 Remove printf from delete cluster
This was breaking toolbox dump
2017-02-24 02:26:43 -05:00
Justin Santa Barbara 8e65cc10d9 Don't delete cloudformation stacks
Until we can figure out how to filter them to just our cluster, we can't
delete them.
2017-02-24 02:12:43 -05:00
Justin Santa Barbara 5813ed9464 Merge pull request #1858 from justinsb/remove_kubectl_dependency
Replace use of kubectl with calls to library
2017-02-23 01:11:32 -05:00
Justin Santa Barbara 851ffc4f5a Replace use of kubectl with calls to library
In particular, when setting configuration, just set it using the
clientcmd functions.

Lets us do this in one change.

Follow up from #1663
2017-02-23 01:11:20 -05:00
Kris Nova 52ba8e82c1 Initial commit for removing CloudFormation on kops delete cluster 2017-02-21 13:52:08 -07:00
Justin Santa Barbara aa7286e8ef Include security groups in toolbox dump 2017-02-16 01:55:22 -05:00
Justin Santa Barbara 05eb1d5e8e Merge pull request #1844 from ikropotov/master
fixing bug with leaking Elastic ips on cluster delete.
2017-02-11 16:09:21 -05:00
Justin Santa Barbara 8b847578b4 Merge pull request #1663 from kamilhristov/improve-delete-cluster
Improve delete cluster process: unset current-context
2017-02-11 11:56:25 -05:00
ikropotov 31cb04021f fixing bug with leaking Elastic ips on cluster delete. 2017-02-10 17:14:16 +03:00
Justin Santa Barbara 5a4ddb2f8d create cluster: take correct k8s version
We were not overriding the cluster version, even when a kubernetes
version could be determined from the direct specifications.
2017-02-07 01:18:13 -05:00
Justin Santa Barbara 2d37ab1ca5 Recommend a k8s version based on each kops version
So the flow is that we recommend (or strongly recommend) a new kops
version when one is required for a new version, and then the new kops
version will recommend (or strongly recommend) a new k8s version.

We don't have a notion of multiple recommended k8s versions per kops
version - that is what channels are for.

Users are always free to disregard updates, even "required" ones by
setting a flag.
2017-02-06 01:06:03 -05:00
Kris Nova 6308c5942d Gofmt 2017-01-31 21:04:17 -07:00
Kris Nova 2728ae12f4 Rename find_cluster -> cluster_resources 2017-01-31 21:03:15 -07:00
Kris Nova f7083cf136 First steps in abstracting out ClusterResources for delete and toolbox dump 2017-01-31 21:03:15 -07:00
Kamil Hristov 395a8e9d6e Use clientcmd package instead of running kubectl commands 2017-01-31 19:33:06 +02:00
Justin Santa Barbara baa5e7a6de Merge pull request #1707 from justinsb/iam_attach
Attach additional IAM policies to same role
2017-01-31 10:43:28 -05:00
Chris Love 6eebfff164 Merge pull request #1704 from justinsb/issue_1695
Ignore two more already-deleted errors in deleted
2017-01-31 00:24:12 -07:00
Justin Santa Barbara 81a527c866 DOn't delete additional IAM roles
They don't exist any more - thanks for pointing it out @yissachar.
2017-01-31 00:33:40 -05:00
Justin Santa Barbara f2a83270f1 Ignore two more already-deleted errors in deleted
Issue #1695
2017-01-30 01:55:01 -05:00
Justin Santa Barbara 9763314f4d Fixed for import from kube-up
Most importantly, we weren't always reusing the existing volume.
2017-01-29 21:34:35 -05:00
Chris Love 72a1dab165 Merge pull request #1694 from justinsb/fix_1614
Tolerate concurrent deletion errors
2017-01-29 14:51:53 -07:00
Justin Santa Barbara 9f4b5a3443 Tolerate concurrent deletion errors
Ignore the specific error codes reported as happening during concurrent
cluster deletion.

Fix #1614
2017-01-29 14:41:47 -05:00
Justin Santa Barbara f94e28ed5a Fix phrasing of kubectl context message
Per @yissachar's suggestion.

Issue #1676
2017-01-29 13:52:59 -05:00
Kamil Hristov 9cbad8780d More detailed output 2017-01-29 05:39:53 +02:00
Kamil Hristov b0dbd009e1 Improve delete cluster process: unset current-context 2017-01-29 01:58:16 +02:00
Justin Santa Barbara 68226a5495 Log when we skip over NAT gateway as shared 2017-01-25 00:29:38 -05:00
Justin Santa Barbara 3d10e8a048 cleanup delete cluster
Don't try to delete an ElasticIP before deleting the attached NAT
gateway.

Optimize the queries we make when finding subnets for deletion.

Issue #1604
2017-01-25 00:06:32 -05:00
Justin Santa Barbara c25a5ddf0d dump: add ELB dumping 2017-01-21 14:21:25 -05:00
Justin Santa Barbara a60e10eacd Merge pull request #1366 from reactiveops/kris-and-eric-1282
Specify Existing NAT Gateways to Use in Cluster Creation
2017-01-19 21:06:12 -05:00
Eric Hole 1e3d94392c Major redo/squash of the work to get egress added to the API and hooked up.
One commit from the always incredible @kris-nova was incorporated here, it was to
check for tags in `kutil/delete_cluster.go`. She was a major driver and instrumental in getting
this to where we aere now!
2017-01-19 16:57:42 -05:00
Justin Santa Barbara 165ead4fac Merge pull request #1170 from yissacharcw/extensible-iam-roles
Add support for extensible IAM permissions
2017-01-19 12:45:55 -05:00
Kris Nova edded7ad6c Merge pull request #1483 from justinsb/int_to_int32
Change int to int32 in API
2017-01-16 20:04:28 -07:00
Justin Santa Barbara 9b3034402a Fixes per code review 2017-01-16 20:35:41 -05:00
Justin Santa Barbara 09cb9b654c Change int to int32 in API
We shouldn't be using the variable-sized int in the API
2017-01-15 18:23:44 -05:00
Justin Santa Barbara e1e9dd3c4c Refactor kubeconfig into its own package
Splitting up the coreos PR
2017-01-15 18:19:39 -05:00
Yissachar Radcliffe 0d53f41f5c Remove additional bastion role if created 2017-01-11 11:09:18 -05:00
Yissachar Radcliffe 773335e342 Create separate IAM policies instead of editing existing one 2017-01-11 11:05:36 -05:00
Kris Nova f4c9027e47 Merge pull request #1432 from justinsb/fix_1427
Cleanup of bastion IAM & Route53 resources
2017-01-10 20:45:57 -07:00
Justin Santa Barbara cd3cff8b5b Don't delete NatGateways if there were none found
Because an empty filter means "list all NatGateways".

Thanks to @tsupertramp for finding.

Fix #1428
2017-01-10 18:31:20 -05:00
Justin Santa Barbara 4280bc206c Cleanup of bastion IAM & Route53 resources
These resources aren't tagged, so we identify them by name.  We hadn't
updated the list of names.

Fixes #1427
2017-01-10 11:43:23 -05:00
Justin Santa Barbara 79f36f40e1 Support recognition of nat gateways for delete via route table 2017-01-08 01:52:21 -05:00
Justin Santa Barbara 94c4e5fb4c Merge pull request #1274 from justinsb/kops_inspect
First step towards cluster-dump command
2017-01-04 23:19:36 -05:00
Justin Santa Barbara a375b1af82 Updates for k8s 1.6 code 2017-01-03 20:32:48 -05:00
Chris Love 8b21ace32d Merge pull request #1218 from yissacharcw/delete-kubecfg
Delete kubectl config when deleting cluster
2016-12-30 16:05:05 -07:00
Justin Santa Barbara a08af4205a Dump instances also 2016-12-30 10:04:59 -05:00
Justin Santa Barbara 6b01c15328 First step towards dump command 2016-12-30 10:04:59 -05:00
Justin Santa Barbara e3eb7454d2 Fixes for import from kube-up 2016-12-27 00:18:18 -05:00
Yissachar Radcliffe b6a6352050 Delete kubectl config when deleting cluster 2016-12-20 12:42:03 -05:00
Justin Santa Barbara a03ea54365 Rename SubnetName -> Name
No schema impact
2016-12-19 00:01:38 -05:00
Justin Santa Barbara 4475d68c2e Remove dead code 2016-12-18 21:56:57 -05:00
Justin Santa Barbara 0ef9d51586 Allow kops delete instancegroup, even if ASG does not exist
We probably shouldn't, but we delete the ASG when you `kops delete ig`.

If the ASG doesn't exist though, we can still delete the IG.
2016-12-18 21:56:57 -05:00
Justin Santa Barbara 1ef2c367c1 Reintroduce subnet assignemnt logic 2016-12-18 21:56:57 -05:00
Justin Santa Barbara fed68310fa Schema v1alpha2
* Zones are now subnets
* Utility subnet is no longer part of Zone
* Bastion InstanceGroup type added instead
* Etcd clusters defined in terms of InstanceGroups, not zones
* AdminAccess split into SSHAccess & APIAccess
* Dropped unused Multizone flag
2016-12-18 21:56:57 -05:00
Kris Childress 50f9028106 Fixing for tests, removing old function 2016-12-16 06:28:14 -07:00
Kris Childress b0d0fd312d Fixing orphaned LC's with kops 2016-12-16 06:26:07 -07:00
Justin Santa Barbara c01c2af656 Mark ObjectMeta as a named field
This will work around some apimachinery bugs
(https://github.com/kubernetes/client-go/issues/8)
2016-12-14 22:26:57 -05:00
Justin Santa Barbara dbab97e508 Use versioned marshaling where we can
In particular during a kops edit
2016-12-08 22:17:26 -05:00
Justin Santa Barbara 3ec68efbe7 Fix typo 2016-12-07 08:55:52 -05:00
chrislovecnm bad489cb75 message when we change kubectl context
fixing kubectl config path when set to multiple paths
2016-12-04 15:58:35 -05:00
Kris Childress 72c5868966 Merge pull request #707 from DualSpark/node-validation
New feature - node validation
2016-11-29 16:47:44 -07:00
chrislovecnm 82cf2c2c0f working on the start of validate
cluster validation seem to be working.  Need to test more

documentation yo

refactoring to get rid of import cycle not allowed
2016-11-28 18:16:32 -07:00
chrislovecnm 3ffc4e91cb Starting work on node lookup and validation 2016-11-28 18:16:31 -07:00
chrislovecnm 89ac0d24f8 starting porting node code 2016-11-28 18:16:31 -07:00
Zach Loafman e60c36068f Fix retries for AutoScalingGroup pending delete
This:
- reworks how retries are handled in fi/executor.go to a time-based scheme
- changes the single-task limit to 10m (from about 30s of no-progress)
- eliminates the inner IAM propagation retry for LaunchConfigurations,
because the task itself will just be redriven for a while. This also
eliminates any long-pole delay caused by this error (since task Run()
should be 'fast').
2016-11-28 17:04:02 -08:00
Justin Santa Barbara ae84beddb7 Use more api machinery when writing 2016-11-13 22:11:36 -05:00
Justin Santa Barbara 933506bdbb Apply gofmt 2016-11-13 21:06:55 -05:00
Kris Childress 479c7782d6 Fixing DNS annotations on pods / Bumping failed iterations
- Adding template functions to nodeup
- Adding 30 -> 42 iteration boost for attempted iterations without progress
- Adding template to kube api manifest
2016-11-08 15:16:41 -08:00
Kris Childress 835e24f788 Working EIP and NGW CRUD for private networking..
Next step.. lets piece them all together
2016-11-08 15:16:41 -08:00
Kris Childress a3dd1257ce Working ElasticIP associations on subnet. Delete and Create! 2016-11-08 15:16:41 -08:00
Justin Santa Barbara 27fb687058 Fix typo: becasue -> because 2016-11-05 01:41:47 -04:00
Kris Childress c12c4aa5d6 Adding first element from kubectl path to log message 2016-10-19 19:12:23 -06:00
Kris Childress aa4649b32f Adding support for multiple kubeconfig paths.
- Just removing the `to` part of the log message. I don't think its a huge win to have that in the logs, and was causing problems This will close #670
2016-10-19 06:08:38 -06:00
Chris Love 653618aa41 Merge pull request #693 from justinsb/fix_672
Don't merge stdout & stderr when running kubectl
2016-10-18 22:28:32 -06:00
Justin Santa Barbara 1d239d9b09 Don't remove route tables tagged with another cluster 2016-10-18 22:21:39 -04:00
Justin Santa Barbara 6ec5da2827 Add unit test for deleting untagged route table 2016-10-18 22:16:05 -04:00
Justin Santa Barbara ba8514d840 Delete route tables, even if untagged, if we are deleting the VPC
The route table cannot exist without a VPC; if we're deleting the VPC we
must delete the route table also.

This will help fix problems when we fail to tag the route-table.

Issue #597
2016-10-18 21:59:56 -04:00
Justin Santa Barbara 7542b8980c Don't merge stdout & stderr when running kubectl
Issue #672
2016-10-18 21:35:34 -04:00
Chris Love 0d78c65498 Merge pull request #660 from justinsb/fix_upgrade
Fix upgrade from kube-up
2016-10-18 10:39:33 -06:00
Justin Santa Barbara d563d5589a Fix deletion logic to ignore terminated instances
Silly mistake because golang case statements do not fall though

Fix #673
2016-10-18 00:30:31 -04:00
chrislovecnm 8fa2aac99f fixing more headers 2016-10-15 19:20:56 -06:00
Justin Santa Barbara 2af1fde49d Reuse the route table when importing
Not only is this lower-impact, but it also avoid a bug because the
subnets were considered "shared", and thus we would not manage the
route-table any more.
2016-10-15 14:18:30 -04:00
Justin Santa Barbara c933008006 Don't validate cluster name when importing kube-up clusters 2016-10-14 22:38:29 -04:00
Justin Santa Barbara 542f8fb4f2 Refactor CLI to match kubectl approach
We have an Options class for each command, and a Run function that can
be called directly.
2016-10-11 09:47:11 -04:00
Justin Santa Barbara 5ac44018d4 Move API to pkg/apis/kops
This is a breaking change for people using the API (sorry), but is
hopefully a simple search and replace:

"k8s.io/kops/upup/pkg/api"
 -> api "k8s.io/kops/pkg/apis/kops"

"k8s.io/kops/upup/pkg/api/registry"
 -> "k8s.io/kops/pkg/apis/kops/registry"

This is the "correct" place for it in the k8s API infrastructure - we
are working towards a versioned API here.
2016-10-11 08:52:54 -04:00
Justin Santa Barbara f7fa324858 Initial k8s-style kops API
We try to emulate the k8s Clientset approach
2016-10-07 01:13:02 -04:00
Justin Santa Barbara c234f20d05 Fix logging of instance ids 2016-10-05 23:11:54 -04:00
Justin Santa Barbara 5137e2546e Tolerate InvalidInstanceID.NotFound when deleting instances
We treat as instance-already-deleted, i.e. not an error

Fix #592
2016-10-05 02:12:11 -04:00
Justin Santa Barbara a338f482dd Merge pull request #563 from justinsb/channels_for_clusters
Store channel in cluster, use it to determine version
2016-10-01 01:21:39 -04:00
Justin Santa Barbara 80becef5a3 rolling-update cleanups 2016-10-01 01:17:07 -04:00
Justin Santa Barbara 647618b755 Store channel in cluster, use it to determine version 2016-10-01 00:04:09 -04:00
Justin Santa Barbara a5cacebd99 Change rolling-update heuristics to be less aggressive 2016-09-30 23:42:47 -04:00
Justin Santa Barbara 5f8d68ec85 Refactor shared packages into util directory 2016-09-25 18:27:09 -04:00
Justin Santa Barbara bb01cf6ddd Make AWSCloud an interface, mock it out in tests
Beginnings of a mock for the AWSCloud, so that hopefully we aren't
calling out to AWS at all in the tests.  We will likely start mocking
the actual EC2 APIs in future, but this seems a good starting point.

Fix #425
2016-09-24 15:52:52 -04:00
Justin Santa Barbara 8839e67f0b Merge fixups 2016-09-24 11:46:34 -04:00
Justin Santa Barbara 05c799761f First step towards rolling update
Start querying nodes in k8s also

Unclear whether we want to use two ASGs for greater control at the
moment.
2016-09-24 11:19:17 -04:00
Justin Santa Barbara ef1f64f308 Start cleaning up API: optional fields should be pointers 2016-09-08 00:49:40 -04:00
Justin Santa Barbara 9d7a7fc6e8 Merge pull request #349 from justinsb/govet_fixes
govet fixes
2016-08-26 02:16:12 -04:00
Justin Santa Barbara 637a10be12 govet fixes 2016-08-20 01:09:19 -04:00