Commit Graph

45 Commits

Author SHA1 Message Date
Peter Rifel 24f2701152
Use ReplaceAll 2025-08-22 20:52:44 -05:00
Peter Rifel af86a55c81
Remove duplicate imports 2025-08-22 20:05:59 -05:00
Jesse Haka 83289b91cf fix KOPS_AWS_ROLE_ARN assume behaviour 2024-05-13 12:51:36 +03:00
Peter Rifel d809f2a888
Remove unused aws-sdk-go v1 error checking 2024-04-20 13:09:05 -04:00
Peter Rifel 3faa28b65e
Migrate Availability Zones to aws-sdk-go-v2 2024-04-13 16:01:42 -04:00
Peter Rifel c7fba183cd
Update EC2 tagging to aws-sdk-go-v2 2024-04-13 16:01:40 -04:00
Peter Rifel 0e0ec806c6
Fix type checking of smithy APIErrors 2024-04-01 07:30:37 -05:00
Peter Rifel d4d39eb0fe
Migrate autoscaling to aws-sdk-go-v2 2024-03-31 23:04:06 -05:00
Peter Rifel 0dcbf23df2
Migrate aws-sdk-go/aws to aws-sdk-go-v2/aws 2024-03-31 16:56:31 -05:00
Peter Rifel 08690f4055
Update aws error wrappers to support aws-sdk-go-v2 2024-03-31 11:32:21 -05:00
Peter Rifel b18a00de43
Use wrapper for IAM errors 2024-03-31 11:32:20 -05:00
Peter Rifel 2626a354c5
Migrate ELB to aws-sdk-go-v2 2024-03-31 07:28:28 -05:00
Peter Rifel 7b8bcc46d9
Migrate elbv2 to aws-sdk-go-v2 2024-03-30 13:53:40 -05:00
Peter Rifel 498bcc1ef1
Update region validation to aws-sdk-go-v2 2024-03-28 16:50:48 -05:00
Peter Rifel 0290a7e8d7
Migrate some packages to aws-sdk-go-v2 2024-03-23 19:42:28 -05:00
justinsb 2a9343a168 Generate revisions of NLB objects, and introduce cleanup phase
This lets us safely make changes to otherwise immutable fields, in
particular for adding security groups to NLBs created without them.

We detect the older versions, and create deletion tasks to remove
them.  These tasks can be deferred, and we expect them to be
deferred to a "prune" phase that runs after cluster apply.

Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
2024-02-17 11:41:15 -05:00
John Gardiner Myers 235aa61594 v1alpha3: move networking fields under networking 2022-12-02 19:19:59 -08:00
justinsb 2f1ce3fa14 Move string truncation to its own package 2021-12-17 12:57:14 -05:00
Peter Rifel 3311e45767
Truncate cluster name prefix used in event bridge rules 2021-09-29 19:12:49 -05:00
John Gardiner Myers 23de00da6e Enable reading shared config when possibly from CLI 2021-05-05 22:08:54 -07:00
Peter Rifel 51cec7e556
Use "tag on create" for EIPs, NLBs, and TargetGroups
These are the remaining resources that support "tag on create" of which we werent taking advantage.

This allows more fine-grained IAM permissions for the kops cli.
2021-03-22 07:21:51 -05:00
Justin SB 72329db188 IAM ServiceAccount Roles: truncate name at 64 characters
The maximum IAM role name length is 64 characters, which we hit much
more often now that we are constructing complex names.  Use our normal
strategy of adding a hash when we truncate.

This is not a breaking change, because these names were not valid
previously.
2020-12-16 13:38:38 -05:00
Ciprian Hacman e57cd534b5 Allow attaching same external target group to multiple instance groups 2020-12-03 06:59:59 +02: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 aadff94bc8
Use EC2's tag-on-create for various resources
This updates DHCP Options, EBS Volumes, InternetGateways, SecurityGroups, Subnets, and VPCs to specify tags at creation-time rather than calling ec2.CreateTags after the resource was created.

I didn't update NATGateway because it adds additional legacy tags that should be evaluated for whether or not they're needed.
I also didn't update SSHKey because it currently isn't tagged at all but it would be good for us to tag down the road.
2020-07-08 15:26:50 -05:00
tanjunchen f01e8e4cdd upup/pkg/fi/cloudup/ staticcheck 2019-12-31 16:15:28 +08:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Justin SB 3e33ac7682
Change code from glog to klog
We don't call klog.InitFlags yet, because that will cause a flag
redefinition error until we get everyone to stop using glog.  That
will happen when we update to k8s 1.13.
2019-05-06 12:54:51 -04:00
Naresh Kumar Amrutham 76a0018d53 add delete support for NLBs, ALBs and Target groups 2018-08-14 16:15:22 -07:00
Justin Santa Barbara c1e3a98789 AWS: validate region against aws-sdk
This is much faster than a call to DescribeRegions.

Issue #4451
2018-04-12 17:42:39 -04:00
chrislovecnm 1e418c3e13 more goimport updates 2017-11-04 10:03:02 -06:00
Justin Santa Barbara a26b28576e AWS: Always use verbose errors
As otherwise very difficult to diagnose errors
2017-08-25 23:08:39 -04:00
Lars Lehtonen afea9d05c5
Replace deprecated aws session.New() with session.NewSession() 2017-08-22 17:28:55 -07:00
Justin Santa Barbara c776a699f9 Include error details when error querying regions 2017-02-07 10:14:39 -05:00
Justin Santa Barbara b36b75ad0c Always set CredentialsChainVerboseErrors when initializing AWS
Fix #605
2017-01-03 20:03:03 -05:00
Justin Santa Barbara a03ea54365 Rename SubnetName -> Name
No schema impact
2016-12-19 00:01:38 -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
yancl aec534a93f change KOPS_AWS_REGION to AWS_REGION 2016-12-05 15:04:03 +00:00
yancl bc444fd535 fix the aws region that hardcoded to "us-east-1" which doesn't work in
some isolated regions(cn-north-1 and GovCloud, for example)
2016-11-21 08:53:45 +00:00
Justin Santa Barbara 2972646ae0 Default master to c4.large in us-east-2
us-east-2 doesn't support the m3 family; c4.large is the closest match
to m3.medium (price, memory, cpu)
2016-10-20 02:00:55 -04:00
chrislovecnm 8fa2aac99f fixing more headers 2016-10-15 19:20:56 -06: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 d1ef7580a9 Report less-scary message when IAM instance profile is not ready yet
IAM instance profile creation is very async, and this causes dependent
resources to fail.  That's fine - we have good retry logic - but we
should output a less frightening error message.

Issue #35
2016-07-07 10:22:44 -04:00
Justin Santa Barbara 90d7fb87ad upup: improved delete; create upup export and upup upgrade 2016-06-23 08:59:20 -04:00
Justin Santa Barbara b52877e2ce upup: separate node & master zone configuration; validate
We allow --zones & --master-zones to be specified separately now, but we
validate for common errors (using a region where you meant a zone,
duplicating a zone, spanning regions, entering an invalid AZ etc)
2016-06-11 21:06:31 -04:00