Skip to content

Commit 3dc7fa3

Browse files
committed
Add support for EKS Provisioned Control Plane
This change adds support for the EKS Provisioned Control Plane feature, which allows users to select from a set of scaling tiers (standard, tier-xl, tier-2xl, tier-4xl) for predictable, high performance from the cluster's control plane. Changes: - Add ControlPlaneScalingConfig field to AWSManagedControlPlane API - Add ControlPlaneScalingTier enum type with validation - Implement converters between CAPA and AWS SDK types - Update cluster creation to include scaling configuration - Add reconciliation logic for updating scaling configuration - Update v1beta1 conversion functions for backward compatibility - Upgrade AWS SDK for EKS to v1.75.1 to support the new API Closes #5771
1 parent 04a4f62 commit 3dc7fa3

File tree

12 files changed

+166
-15
lines changed

12 files changed

+166
-15
lines changed

config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2411,6 +2411,23 @@ spec:
24112411
- host
24122412
- port
24132413
type: object
2414+
controlPlaneScalingConfig:
2415+
description: |-
2416+
ControlPlaneScalingConfig specifies the scaling configuration for the EKS control plane.
2417+
This allows you to select from a set of scaling tiers for predictable, high performance from the cluster's control plane.
2418+
(Official AWS docs: https://docs.aws.amazon.com/eks/latest/userguide/eks-provisioned-control-plane.html)
2419+
properties:
2420+
tier:
2421+
description: |-
2422+
Tier specifies the tier for the EKS control plane.
2423+
Valid values are: standard, tier-xl, tier-2xl, tier-4xl
2424+
enum:
2425+
- standard
2426+
- tier-xl
2427+
- tier-2xl
2428+
- tier-4xl
2429+
type: string
2430+
type: object
24142431
eksClusterName:
24152432
description: |-
24162433
EKSClusterName allows you to specify the name of the EKS cluster in

config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanetemplates.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,23 @@ spec:
187187
- host
188188
- port
189189
type: object
190+
controlPlaneScalingConfig:
191+
description: |-
192+
ControlPlaneScalingConfig specifies the scaling configuration for the EKS control plane.
193+
This allows you to select from a set of scaling tiers for predictable, high performance from the cluster's control plane.
194+
(Official AWS docs: https://docs.aws.amazon.com/eks/latest/userguide/eks-provisioned-control-plane.html)
195+
properties:
196+
tier:
197+
description: |-
198+
Tier specifies the tier for the EKS control plane.
199+
Valid values are: standard, tier-xl, tier-2xl, tier-4xl
200+
enum:
201+
- standard
202+
- tier-xl
203+
- tier-2xl
204+
- tier-4xl
205+
type: string
206+
type: object
190207
eksClusterName:
191208
description: |-
192209
EKSClusterName allows you to specify the name of the EKS cluster in

controlplane/eks/api/v1beta1/conversion.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ func (r *AWSManagedControlPlane) ConvertTo(dstRaw conversion.Hub) error {
121121
dst.Status.Version = restored.Status.Version
122122
dst.Spec.BootstrapSelfManagedAddons = restored.Spec.BootstrapSelfManagedAddons
123123
dst.Spec.UpgradePolicy = restored.Spec.UpgradePolicy
124+
dst.Spec.ControlPlaneScalingConfig = restored.Spec.ControlPlaneScalingConfig
124125
return nil
125126
}
126127

controlplane/eks/api/v1beta1/zz_generated.conversion.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controlplane/eks/api/v1beta2/awsmanagedcontrolplane_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,12 @@ type AWSManagedControlPlaneSpec struct { //nolint: maligned
221221
// +kubebuilder:validation:Enum=extended;standard
222222
// +optional
223223
UpgradePolicy UpgradePolicy `json:"upgradePolicy,omitempty"`
224+
225+
// ControlPlaneScalingConfig specifies the scaling configuration for the EKS control plane.
226+
// This allows you to select from a set of scaling tiers for predictable, high performance from the cluster's control plane.
227+
// (Official AWS docs: https://docs.aws.amazon.com/eks/latest/userguide/eks-provisioned-control-plane.html)
228+
// +optional
229+
ControlPlaneScalingConfig *ControlPlaneScalingConfig `json:"controlPlaneScalingConfig,omitempty"`
224230
}
225231

226232
// KubeProxy specifies how the kube-proxy daemonset is managed.

controlplane/eks/api/v1beta2/types.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,32 @@ func (e UpgradePolicy) String() string {
259259
return string(e)
260260
}
261261

262+
// ControlPlaneScalingConfig represents the configuration for EKS Control Plane scaling.
263+
type ControlPlaneScalingConfig struct {
264+
// Tier specifies the tier for the EKS control plane.
265+
// Valid values are: standard, tier-xl, tier-2xl, tier-4xl
266+
// +optional
267+
// +kubebuilder:validation:Enum=standard;tier-xl;tier-2xl;tier-4xl
268+
Tier *ControlPlaneScalingTier `json:"tier,omitempty"`
269+
}
270+
271+
// ControlPlaneScalingTier defines the scaling tier for the EKS control plane.
272+
type ControlPlaneScalingTier string
273+
274+
var (
275+
// ControlPlaneScalingTierStandard indicates standard scaling tier (default).
276+
ControlPlaneScalingTierStandard = ControlPlaneScalingTier("standard")
277+
278+
// ControlPlaneScalingTierXL indicates XL tier.
279+
ControlPlaneScalingTierXL = ControlPlaneScalingTier("tier-xl")
280+
281+
// ControlPlaneScalingTier2XL indicates 2XL tier.
282+
ControlPlaneScalingTier2XL = ControlPlaneScalingTier("tier-2xl")
283+
284+
// ControlPlaneScalingTier4XL indicates 4XL tier.
285+
ControlPlaneScalingTier4XL = ControlPlaneScalingTier("tier-4xl")
286+
)
287+
262288
const (
263289
// SecurityGroupCluster is the security group for communication between EKS
264290
// control plane and managed node groups.

controlplane/eks/api/v1beta2/zz_generated.deepcopy.go

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/apparentlymart/go-cidr v1.1.0
88
github.com/aws/amazon-vpc-cni-k8s v1.15.5
99
github.com/aws/aws-lambda-go v1.41.0
10-
github.com/aws/aws-sdk-go-v2 v1.39.2
10+
github.com/aws/aws-sdk-go-v2 v1.40.0
1111
github.com/aws/aws-sdk-go-v2/config v1.31.12
1212
github.com/aws/aws-sdk-go-v2/credentials v1.18.16
1313
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.19.12
@@ -17,7 +17,7 @@ require (
1717
github.com/aws/aws-sdk-go-v2/service/ec2 v1.233.0
1818
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.36.0
1919
github.com/aws/aws-sdk-go-v2/service/efs v1.39.0
20-
github.com/aws/aws-sdk-go-v2/service/eks v1.64.0
20+
github.com/aws/aws-sdk-go-v2/service/eks v1.75.1
2121
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.29.6
2222
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.45.2
2323
github.com/aws/aws-sdk-go-v2/service/iam v1.32.0
@@ -26,7 +26,7 @@ require (
2626
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.6
2727
github.com/aws/aws-sdk-go-v2/service/ssm v1.59.1
2828
github.com/aws/aws-sdk-go-v2/service/sts v1.38.6
29-
github.com/aws/smithy-go v1.23.0
29+
github.com/aws/smithy-go v1.23.2
3030
github.com/awslabs/goformation/v4 v4.19.5
3131
github.com/blang/semver v3.5.1+incompatible
3232
github.com/coreos/ignition v0.35.0
@@ -112,8 +112,8 @@ require (
112112
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
113113
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.1 // indirect
114114
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 // indirect
115-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 // indirect
116-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 // indirect
115+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14 // indirect
116+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14 // indirect
117117
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
118118
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.9 // indirect
119119
github.com/aws/aws-sdk-go-v2/service/cloudformation v1.50.0

go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ github.com/aws/amazon-vpc-cni-k8s v1.15.5 h1:/mqTXB4HoGYg4CiU4Gco9iEvZ+V/309Na4H
4848
github.com/aws/amazon-vpc-cni-k8s v1.15.5/go.mod h1:jV4wNtmgT2Ra1/oZU99DPOFsCUKnf0mYfIyzDyAUVAY=
4949
github.com/aws/aws-lambda-go v1.41.0 h1:l/5fyVb6Ud9uYd411xdHZzSf2n86TakxzpvIoz7l+3Y=
5050
github.com/aws/aws-lambda-go v1.41.0/go.mod h1:jwFe2KmMsHmffA1X2R09hH6lFzJQxzI8qK17ewzbQMM=
51-
github.com/aws/aws-sdk-go-v2 v1.39.2 h1:EJLg8IdbzgeD7xgvZ+I8M1e0fL0ptn/M47lianzth0I=
52-
github.com/aws/aws-sdk-go-v2 v1.39.2/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY=
51+
github.com/aws/aws-sdk-go-v2 v1.40.0 h1:/WMUA0kjhZExjOQN2z3oLALDREea1A7TobfuiBrKlwc=
52+
github.com/aws/aws-sdk-go-v2 v1.40.0/go.mod h1:c9pm7VwuW0UPxAEYGyTmyurVcNrbF6Rt/wixFqDhcjE=
5353
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.1 h1:i8p8P4diljCr60PpJp6qZXNlgX4m2yQFpYk+9ZT+J4E=
5454
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.1/go.mod h1:ddqbooRZYNoJ2dsTwOty16rM+/Aqmk/GOXrK8cg7V00=
5555
github.com/aws/aws-sdk-go-v2/config v1.31.12 h1:pYM1Qgy0dKZLHX2cXslNacbcEFMkDMl+Bcj5ROuS6p8=
@@ -60,10 +60,10 @@ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 h1:Mv4Bc0mWmv6oDuSWTKnk+wg
6060
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9/go.mod h1:IKlKfRppK2a1y0gy1yH6zD+yX5uplJ6UuPlgd48dJiQ=
6161
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.19.12 h1:ofHawDLJTI6ytDIji+g4dXQ6u2idzTb04tDlN9AS614=
6262
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.19.12/go.mod h1:f5pL4iLDfbcxj1SZcdRdIokBB5eHbuYPS/Fs9DwUPRQ=
63-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 h1:se2vOWGD3dWQUtfn4wEjRQJb1HK1XsNIt825gskZ970=
64-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9/go.mod h1:hijCGH2VfbZQxqCDN7bwz/4dzxV+hkyhjawAtdPWKZA=
65-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 h1:6RBnKZLkJM4hQ+kN6E7yWFveOTg8NLPHAkqrs4ZPlTU=
66-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9/go.mod h1:V9rQKRmK7AWuEsOMnHzKj8WyrIir1yUJbZxDuZLFvXI=
63+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14 h1:PZHqQACxYb8mYgms4RZbhZG0a7dPW06xOjmaH0EJC/I=
64+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14/go.mod h1:VymhrMJUWs69D8u0/lZ7jSB6WgaG/NqHi3gX0aYf6U0=
65+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14 h1:bOS19y6zlJwagBfHxs0ESzr1XCOU2KXJCWcq3E2vfjY=
66+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14/go.mod h1:1ipeGBMAxZ0xcTm6y6paC2C/J6f6OO7LBODV9afuAyM=
6767
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo=
6868
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo=
6969
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.9 h1:w9LnHqTq8MEdlnyhV4Bwfizd65lfNCNgdlNC6mM5paE=
@@ -82,8 +82,8 @@ github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.36.0 h1:8GcatvIKYx5WkwjwY4H+K7
8282
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.36.0/go.mod h1:yz4NeCWotlbHoT41Vc9NofCbKEyiNlKYZFT4SiqVQCY=
8383
github.com/aws/aws-sdk-go-v2/service/efs v1.39.0 h1:nxn7P1nAd7ThB1B0WASAKvjddJQcvLzaOo9iN4tp3ZU=
8484
github.com/aws/aws-sdk-go-v2/service/efs v1.39.0/go.mod h1:8Ij4/TIExqfWWjcyQy82/V/aec2kQruuyndljE+Vuo0=
85-
github.com/aws/aws-sdk-go-v2/service/eks v1.64.0 h1:EYeOThTRysemFtC6J6h6b7dNg3jN03QuO5cg92ojIQE=
86-
github.com/aws/aws-sdk-go-v2/service/eks v1.64.0/go.mod h1:v1xXy6ea0PHtWkjFUvAUh6B/5wv7UF909Nru0dOIJDk=
85+
github.com/aws/aws-sdk-go-v2/service/eks v1.75.1 h1:WFcSYWHNNdnRnN8H2jyokrn3Yz5T1DMg+D3CWog4luk=
86+
github.com/aws/aws-sdk-go-v2/service/eks v1.75.1/go.mod h1:lrJRZkSj6nIXH/SN3gbGQp4i4AtNyha0wT7VgYZ3KDw=
8787
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.29.6 h1:9grU/+HRwLXJV8XUjEPThJj/H+0oHkeNBFpSSfZekeg=
8888
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.29.6/go.mod h1:N4fs285CsnBHlAkzBpQapefR/noggTyF09fWs72EzB4=
8989
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.45.2 h1:vX70Z4lNSr7XsioU0uJq5yvxgI50sB66MvD+V/3buS4=
@@ -120,8 +120,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 h1:5fm5RTONng73/QA73LhCNR7U
120120
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1/go.mod h1:xBEjWD13h+6nq+z4AkqSfSvqRKFgDIQeaMguAJndOWo=
121121
github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 h1:p3jIvqYwUZgu/XYeI48bJxOhvm47hZb5HUQ0tn6Q9kA=
122122
github.com/aws/aws-sdk-go-v2/service/sts v1.38.6/go.mod h1:WtKK+ppze5yKPkZ0XwqIVWD4beCwv056ZbPQNoeHqM8=
123-
github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE=
124-
github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI=
123+
github.com/aws/smithy-go v1.23.2 h1:Crv0eatJUQhaManss33hS5r40CG3ZFH+21XSkqMrIUM=
124+
github.com/aws/smithy-go v1.23.2/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0=
125125
github.com/awslabs/goformation/v4 v4.19.5 h1:Y+Tzh01tWg8gf//AgGKUamaja7Wx9NPiJf1FpZu4/iU=
126126
github.com/awslabs/goformation/v4 v4.19.5/go.mod h1:JoNpnVCBOUtEz9bFxc9sjy8uBUCLF5c4D1L7RhRTVM8=
127127
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=

pkg/cloud/converters/eks.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,3 +300,26 @@ func SupportTypeToSDK(input ekscontrolplanev1.UpgradePolicy) ekstypes.SupportTyp
300300
}
301301
return ekstypes.SupportTypeExtended
302302
}
303+
304+
// ControlPlaneScalingConfigToSDK converts CAPA ControlPlaneScalingConfig to AWS SDK ControlPlaneScalingConfig.
305+
func ControlPlaneScalingConfigToSDK(config *ekscontrolplanev1.ControlPlaneScalingConfig) *ekstypes.ControlPlaneScalingConfig {
306+
if config == nil || config.Tier == nil {
307+
return nil
308+
}
309+
310+
return &ekstypes.ControlPlaneScalingConfig{
311+
Tier: ekstypes.ProvisionedControlPlaneTier(*config.Tier),
312+
}
313+
}
314+
315+
// ControlPlaneScalingConfigFromSDK converts AWS SDK ControlPlaneScalingConfig to CAPA ControlPlaneScalingConfig.
316+
func ControlPlaneScalingConfigFromSDK(config *ekstypes.ControlPlaneScalingConfig) *ekscontrolplanev1.ControlPlaneScalingConfig {
317+
if config == nil {
318+
return nil
319+
}
320+
321+
tier := ekscontrolplanev1.ControlPlaneScalingTier(config.Tier)
322+
return &ekscontrolplanev1.ControlPlaneScalingConfig{
323+
Tier: &tier,
324+
}
325+
}

0 commit comments

Comments
 (0)