Skip to content

ACK-RDS DBCluster adds invalid AllocatedStorage to aurora cluster #2434

@devonhk

Description

@devonhk

Describe the bug
The DBCluster resource always adds a spec.allocatedStorage: 1 when none is specified. The controller then fails to create aurora-postgresql type clusters since the allocatedStorage field isn't supported.

Steps to reproduce

Create a simple DBCluster:

apiVersion: rds.services.k8s.aws/v1alpha1
kind: DBCluster
metadata:
  name: test-db-instance
spec:
  autoMinorVersionUpgrade: true
  databaseName: test_db
  dbClusterIdentifier: test-db-instance
  dbClusterParameterGroupName: default.aurora-postgresql16
  dbSubnetGroupName: test-db-instance
  deletionProtection: true
  enableCloudwatchLogsExports: []
  enableIAMDatabaseAuthentication: false
  enablePerformanceInsights: false
  engine: aurora-postgresql
  engineVersion: '16.6'
  masterUserPassword:
    key: DB_PASSWORD
    name: test-db-instance
  masterUsername: postgres
  vpcSecurityGroupIDs:
    - sg-CHANGE_ME

Expected outcome

  • The ACK-RDS controller shouldn't mutate the DBCluster resource's spec.allocatedStorage field.
  • The DBCluster should be created.

Actual outcome

Here's the live DBCluster resource (I redacted fields that weren't relevant).
We can see that spec.allocatedStorage was set to 1 and that the DBCluster creation failed since that field was included in the payload sent to AWS.

apiVersion: rds.services.k8s.aws/v1alpha1
kind: DBCluster
metadata:
  name: test-db-instance
spec:
  allocatedStorage: 1
[...]
status:
[...]
  conditions:
    - message: "InvalidParameterCombination: AllocatedStorage isn't supported for DB engine aurora-postgresql.\n\tstatus code: 400, request id: [...]"
      status: 'True'
      type: ACK.Terminal
[...]

Environment

  • Kubernetes version: 1.31
  • Using EKS (yes/no), if so version?: eks.21
  • AWS service targeted (S3, RDS, etc.): RDS

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.service/rdsIndicates issues or PRs that are related to rds-controller.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions