Comments (4)
Two design questions I'm soliciting input on:
-
Most integer types in the SDK have changed from *int64 to *int32. Kops API has *int64 fields that are passed directly through the model and tasks into the SDK types:
kops/pkg/apis/kops/v1alpha3/cluster.go
Lines 848 to 855 in 393aac4
As-is we have to convert from *int64 to *int32:
kops/pkg/model/awsmodel/autoscalinggroup.go
Line 104 in d0d6f8b
Should we update the Kops API to use *int32 ? I realize some of them are used by other cloud providers, but at least some of them are AWS-only. -
All of the SDK's string enums now have enum-typed fields rather than more generic
*string
fields. Should we update the awstasks types to use the enum types and pass them in from the model? Or have tasks continue to use string and do the enum casting in their Find and Render methods. For example, the instance type:
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ec2/types#InstanceType
from kops.
- I don't think there's much value in keeping the int64 for the AWS-only ones.
- I like the idea of passing types from the model. I think we tried that in other clouds or maybe even in some AWS models.
from kops.
After #16460 theres only a few remaining uses of the v1 SDK:
-
Getting a list of known zones and regions:
Lines 247 to 254 in 1c24423
The v2 SDK no longer maintains a static list of zones and regions, it uses regex to determine partitions and defaults unrecognized regions to the commercial partition in order to be forwards compatible with future regions. If we want to enumerate valid regions or zones we'd need to use the EC2 API which is likely not appropriate here given it is used in shell completion and where the cloud provider may not be known. -
The presigned STS GetCallerIdentity request used for node bootstrap via kops-controller. While presigned requests are still supported in V2, the presign methods and types no longer provide access to the request body, only their url and headers. See aws/aws-sdk-go-v2#1137. Kops-controller currently reads the request body to perform some validation:
kops/upup/pkg/fi/cloudup/awsup/aws_verifier.go
Lines 153 to 157 in 1c24423
In V1 the presigned request is a POST however in V2 it is converted to a GET request and the normalAction=GetCallerIdentity&Version=2011-06-15
body is moved to URL query parameters:
https://github.com/aws/aws-sdk-go-v2/blob/bc2a669d3241023e20194cdfe042b8c275887e51/service/sts/api_client.go#L641-L645
This thread on the original kops-controller PR discusses potential upgrade challenges. We should be able to modify this safely, it will just require some extra care.
Theres also still a few transitive dependencies on the V1 SDK that would need to be upgraded themselves before it will be removed from our vendor directory entirely.
github.com/aws/amazon-ec2-instance-selector/[email protected] github.com/aws/[email protected]
github.com/cert-manager/[email protected] github.com/aws/[email protected]
k8s.io/[email protected] github.com/aws/[email protected]
from kops.
- We can hardcode it as for the rest. I is best effort anyway for the purpose of cli completion.
- I think a PR would help here. Generally speaking, we need to move to the V2 SDK, so best to do it sooner rather than later.
from kops.
Related Issues (20)
- EOF Error from AWS api while validating cluster which was in running state HOT 18
- Bump nvidia driver for CUDA 12.1 support HOT 4
- updating kops DNS records
- Oracle OCI Deploy Support HOT 3
- [CILIUM] CiliumNetworkingSpec should be able to set all configs like API Rate Limit gathering lots of TooManyRequests HOT 2
- Kops api server pod is restarting and showing x509: certificate has expired or is not yet valid". Reconnecting... W0515 13:17:42.270070
- ASG Warmpool instances join before Lifecycle hook is in effect HOT 9
- Poorly documented: nonMasqueradeCIDR vs podCIDR vs serviceClusterIPRange
- Cluster validation cannot complete if metrics-server addon is enabled and there are less than 2 non-master nodes
- "kops version --server" should assume current context by default HOT 4
- Mistake in validation of Node Termination Handler
- Calico in eBPF mode has bug and should be upgraded to 3.27.3 for Kops 1.28.5 and below HOT 3
- Can't modify aws-node daemonset to pull different images HOT 3
- Add ProxMox Support
- GCE cluster deletion fails when unable to list InstanceGroupManagers
- Node-local-dns doesn't work with cilium CNI on kops 1.29.0
- Hetzner: error running task "ServerGroup/bastions": Field is required: UserData
- kops 1.29.0 can't deploy aws-iam-authenticator pods - image tag not found in registry HOT 5
- Allow to define resources for controller manager and scheduler
- Volumes available in multiple zones HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kops.