Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2400,6 +2400,12 @@ spec:
- host
- port
type: object
deletionProtection:
default: false
description: |-
DeletionProtection indicates whether to enable deletion protection for the EKS cluster.
When enabled, the cluster cannot be deleted unless deletion protection is first disabled.
type: boolean
eksClusterName:
description: |-
EKSClusterName allows you to specify the name of the EKS cluster in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ spec:
- host
- port
type: object
deletionProtection:
default: false
description: |-
DeletionProtection indicates whether to enable deletion protection for the EKS cluster.
When enabled, the cluster cannot be deleted unless deletion protection is first disabled.
type: boolean
eksClusterName:
description: |-
EKSClusterName allows you to specify the name of the EKS cluster in
Expand Down
2 changes: 2 additions & 0 deletions controlplane/eks/api/v1beta1/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ func (r *AWSManagedControlPlane) ConvertTo(dstRaw conversion.Hub) error {
dst.Spec.RolePermissionsBoundary = restored.Spec.RolePermissionsBoundary
dst.Status.Version = restored.Status.Version
dst.Spec.BootstrapSelfManagedAddons = restored.Spec.BootstrapSelfManagedAddons
// Preserve fields that only exist in v1beta2
dst.Spec.DeletionProtection = restored.Spec.DeletionProtection
dst.Spec.UpgradePolicy = restored.Spec.UpgradePolicy
return nil
}
Expand Down
1 change: 1 addition & 0 deletions controlplane/eks/api/v1beta1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions controlplane/eks/api/v1beta2/awsmanagedcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ type AWSManagedControlPlaneSpec struct { //nolint: maligned
// +kubebuilder:default=true
BootstrapSelfManagedAddons bool `json:"bootstrapSelfManagedAddons,omitempty"`

// DeletionProtection indicates whether to enable deletion protection for the EKS cluster.
// When enabled, the cluster cannot be deleted unless deletion protection is first disabled.
// +kubebuilder:default=false
DeletionProtection bool `json:"deletionProtection,omitempty"`

// RestrictPrivateSubnets indicates that the EKS control plane should only use private subnets.
// +kubebuilder:default=false
RestrictPrivateSubnets bool `json:"restrictPrivateSubnets,omitempty"`
Expand Down
6 changes: 3 additions & 3 deletions exp/controllers/rosaroleconfig_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ func TestROSARoleConfigReconcileCreate(t *testing.T) {
defer mockCtrl.Finish()
// mock iam client to expect ListRoles call
mockIamClient := rosaMocks.NewMockIamApiClient(mockCtrl)
mockIamClient.EXPECT().ListRoles(gomock.Any(), gomock.Any()).Return(&iamv2.ListRolesOutput{
Roles: []iamTypes.Role{},
}, nil).AnyTimes()
mockIamClient.EXPECT().ListRoles(gomock.Any(), gomock.Any(), gomock.Any()).
Return(&iamv2.ListRolesOutput{Roles: []iamTypes.Role{}}, nil).
AnyTimes()

mockIamClient.EXPECT().ListOpenIDConnectProviders(gomock.Any(), gomock.Any()).Return(&iamv2.ListOpenIDConnectProvidersOutput{
OpenIDConnectProviderList: []iamTypes.OpenIDConnectProviderListEntry{},
Expand Down
75 changes: 37 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ require (
github.com/apparentlymart/go-cidr v1.1.0
github.com/aws/amazon-vpc-cni-k8s v1.15.5
github.com/aws/aws-lambda-go v1.41.0
github.com/aws/aws-sdk-go-v2 v1.38.0
github.com/aws/aws-sdk-go-v2/config v1.31.0
github.com/aws/aws-sdk-go-v2/credentials v1.18.4
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.18.4
github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.4
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.52.0
github.com/aws/aws-sdk-go-v2/service/configservice v1.56.0
github.com/aws/aws-sdk-go-v2/service/ec2 v1.233.0
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.36.0
github.com/aws/aws-sdk-go-v2/service/efs v1.39.0
github.com/aws/aws-sdk-go-v2/service/eks v1.64.0
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.29.6
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.45.2
github.com/aws/aws-sdk-go-v2/service/iam v1.32.0
github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.26.6
github.com/aws/aws-sdk-go-v2/service/s3 v1.87.0
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.6
github.com/aws/aws-sdk-go-v2/service/ssm v1.59.1
github.com/aws/aws-sdk-go-v2/service/sts v1.37.0
github.com/aws/smithy-go v1.22.5
github.com/aws/aws-sdk-go-v2 v1.39.4
github.com/aws/aws-sdk-go-v2/config v1.31.15
github.com/aws/aws-sdk-go-v2/credentials v1.18.19
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.1
github.com/aws/aws-sdk-go-v2/service/autoscaling v1.60.1
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.53.9
github.com/aws/aws-sdk-go-v2/service/configservice v1.59.0
github.com/aws/aws-sdk-go-v2/service/ec2 v1.259.0
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.38.0
github.com/aws/aws-sdk-go-v2/service/efs v1.41.0
github.com/aws/aws-sdk-go-v2/service/eks v1.74.5
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.33.9
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.51.3
github.com/aws/aws-sdk-go-v2/service/iam v1.49.0
github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.30.9
github.com/aws/aws-sdk-go-v2/service/s3 v1.89.0
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.39.9
github.com/aws/aws-sdk-go-v2/service/ssm v1.66.2
github.com/aws/aws-sdk-go-v2/service/sts v1.38.9
github.com/aws/smithy-go v1.23.1
github.com/awslabs/goformation/v4 v4.19.5
github.com/blang/semver v3.5.1+incompatible
github.com/coreos/ignition v0.35.0
Expand Down Expand Up @@ -111,23 +111,23 @@ require (
github.com/adrg/xdg v0.5.3 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.3 // indirect
github.com/aws/aws-sdk-go-v2/service/cloudformation v1.50.0
github.com/aws/aws-sdk-go-v2/service/eventbridge v1.39.3
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.3 // indirect
github.com/aws/aws-sdk-go-v2/service/organizations v1.27.3 // indirect
github.com/aws/aws-sdk-go-v2/service/servicequotas v1.21.4
github.com/aws/aws-sdk-go-v2/service/sqs v1.38.8
github.com/aws/aws-sdk-go-v2/service/sso v1.28.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.33.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.2 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.11 // indirect
github.com/aws/aws-sdk-go-v2/service/cloudformation v1.68.1
github.com/aws/aws-sdk-go-v2/service/eventbridge v1.45.8
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.11 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.11 // indirect
github.com/aws/aws-sdk-go-v2/service/organizations v1.46.0 // indirect
github.com/aws/aws-sdk-go-v2/service/servicequotas v1.33.3
github.com/aws/aws-sdk-go-v2/service/sqs v1.42.11
github.com/aws/aws-sdk-go-v2/service/sso v1.29.8 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.3 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
Expand Down Expand Up @@ -185,7 +185,6 @@ require (
github.com/huandu/xstrings v1.5.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
Expand Down
Loading