Commit Graph

112 Commits

Author SHA1 Message Date
justinsb 90a484f049 AWS IAM Role listing: don't ignore "other" errors
If the error was an AWS error, but not one of the recognized ones, we
ignored it.
2022-09-01 07:57:03 -04:00
Ole Markus With eb003a19b1 Fix bugs and typo in iam resource deletion logic 2022-08-21 20:01:20 +02:00
Ole Markus With 084ecac2bb Fix no such entity check for iam profiles and roles 2022-08-21 07:29:30 +02:00
Ole Markus With 578e27bb5f Ignore entities not found when deleting IAM roles and profiles 2022-08-20 18:58:04 +02:00
Ole Markus With 535f597bce Rely on tags alone when deleting instance profiles 2022-08-20 10:25:49 +02:00
Ole Markus With e01b233b76 Warn instead of failure if we cannot read IAM role tags
Since we now try to get tags for all roles in the account, we may encounter roles we are not allowed to get e.g if there is an SCP or similar with explicit deny.
2022-08-20 09:53:10 +02:00
Ole Markus With 09b604867d Don't skip roles that don't have cluster name prefix
This should plug the IAM roles leak. It probably a leftover from when roles did not have tags and we relied on the name of the role instead.
2022-08-20 09:07:15 +02:00
Ole Markus With 8e7a50346b Add iam role deletion test 2022-08-20 09:07:15 +02:00
Peter Rifel 780d9cc2ea
Fix OIDC Provider cleanup
A race can occur where an OIDC provider being deleted is in the List results but is not found in the Get request
2022-04-28 20:27:24 -05:00
Ole Markus With ce2e877aeb Remove bazel files from vendor 2022-04-12 13:29:03 +02:00
Ole Markus With 66e6ed0850 Delete ENIs tagged with k8s tags 2021-12-22 21:45:01 +01:00
Ciprian Hacman ea7df00719 Run hack/update-gofmt.sh 2021-12-01 22:39:50 +02:00
John Gardiner Myers b2e9d809b7 Support IPv6 private topology 2021-11-16 21:38:03 -08:00
angeloskaltsikis b284537885
Fix that states AWS IAM Instance Profile blocks IAM Role
According to [aws-cli docs](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/delete-role.html#examples),
it is needed to delete any Instance profile that uses a role before deleting
the actual role. This fix adds a "blocks" statement to the IAM Instance Profile,
to declare that it should block the IAM Role deletion.
2021-11-03 18:28:36 +02:00
Peter Rifel 3311e45767
Truncate cluster name prefix used in event bridge rules 2021-09-29 19:12:49 -05:00
justinsb fc04d91bc7 Recognize pending EC2 instances as needed deletion
They should be deleted as they will presumably be running shortly.

Also, this function is used from `kops dump cluster` where presumably
instances are more likely to be pending.
2021-09-18 16:10:29 -04:00
Ole Markus With 38f805c5ef Make external-dns a drop-in for dns-controller
Support TXT records
2021-08-27 06:24:47 +02:00
Reilly Brogan 1b59233c8e Debian 11: Release AMIs use same AWS Owner ID as Buster 2021-08-16 12:06:36 -05:00
Reilly Brogan 850bca8db6 Support Debian 11 Bullseye 2021-08-06 12:52:16 -05:00
John Gardiner Myers 4152667f28 Remove dead code 2021-07-14 20:05:47 -07:00
Ciprian Hacman 7bc629b683 Use DualStack API NLB for IPv6 2021-06-26 19:16:46 +03:00
Kubernetes Prow Robot 95dcaf2766
Merge pull request #11568 from h3poteto/cleanup-iam-8823
Cleanup InstanceProfile only that have ownership tags in delete cluster
2021-05-23 12:13:39 -07:00
AkiraFukushima f37306c89a
Cleanup InstanceProfile only that have ownership tags in delete cluster 2021-05-23 11:13:07 +09:00
John Gardiner Myers 2cf967b2de Fix deletion of IAM roles and policies 2021-05-21 17:46:15 -07:00
John Gardiner Myers a41d0e21be Delete cluster-owned service account roles upon cluster deletion 2021-05-15 12:06:45 -07:00
Jason Haugen c2a9bdc515 fix permissions required for NTH Queue Processor 2021-04-23 13:10:29 -05:00
Jason Haugen cceb9dd296 lifecycle integ test, docs, & small cleanup 2021-04-19 15:43:06 -05:00
Jason Haugen 10df4a9a14 integ tests 2021-04-19 15:43:05 -05:00
Jason Haugen c8bb48ba81 fix existing tests 2021-04-19 15:43:05 -05:00
Jason Haugen d07b067249 Add NTH queue-processor mode 2021-04-19 15:43:05 -05:00
Ole Markus With 5a8d47d45f Fix bug with deleting OIDC providers 2021-03-19 20:07:22 +01:00
Bharath Vedartham 0c0767c0c9 Remove support for launch configurations 2021-03-09 09:04:15 +02:00
Kubernetes Prow Robot 1b42286cfe
Merge pull request #10832 from rifelpet/aws-sdk
Add Tagging to Instance Profiles and OIDC Providers
2021-02-24 05:40:50 -08:00
Ciprian Hacman 4f70c4237c Update mock to v1.21.0-alpha.1 2021-02-16 14:19:58 +02:00
Peter Rifel d52fd9f76c
Add tagging support to AWS Instance Profiles and OIDC Providers 2021-02-15 16:48:43 -06:00
Peter Rifel 6e6e072d93
Use AWS SDK const for IAM entities not found 2021-02-15 15:53:59 -06:00
Peter Rifel c28c4c728d
Cleanup kops-controller Route53 record during cluster deletion 2021-02-03 22:41:49 -06:00
Matthew Wong 7e9392e72c Treat InvalidDhcpOptionsId.NotFound as already-deleted 2020-12-28 17:27:34 -08:00
Ciprian Hacman c8de1d3042 Handle cluster cleanup more gracefully 2020-11-12 18:21:04 +02:00
Ciprian Hacman 1d6a51aff9 Address review comments 2020-11-09 21:41:58 +02:00
Ciprian Hacman fdf976809e Use pagination when listing LaunchTemplates 2020-11-09 21:41:58 +02:00
Ciprian Hacman 565adceab9 Use LaunchTemplate versions instead of timestamped LaunchTemplates 2020-11-09 21:40:33 +02:00
Ciprian Hacman c7bc3d4397 Update mock version to 1.19.0-alpha.3 2020-09-08 08:45:25 +03: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
Peter Rifel a17581e21d
Add cloud tags to AWS SSH Keys 2020-07-28 13:35:09 -05:00
Kubernetes Prow Robot 98ed5d4fa1
Merge pull request #9527 from hakman/update-mock-version
Update mock version to 1.19.0-alpha.1
2020-07-08 10:09:08 -07:00
Ciprian Hacman 827d8c041f Update mock version to 1.19.0-alpha.1 2020-07-08 18:31:18 +03:00
Peter Rifel fc35f9d59e
fix unit tests 2020-07-08 08:53:01 -05:00
Peter Rifel a837a7ee6c
Handle NoSuchEntity errors when deleting OIDC Provider 2020-06-16 14:36:57 -05:00
Peter Rifel a7d2161c0e
Add OIDC Provider awstask, mock, and resource lister and deleter 2020-06-16 14:36:56 -05:00