Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a seconday cluster under global cluster still expects masterUserPasswordSecretRef or autogeneration enabled #2061

Closed
nashtapu-tibco opened this issue May 21, 2024 · 1 comment
Labels
bug Something isn't working stale

Comments

@nashtapu-tibco
Copy link

Existing Issue
Please see the issue: #1668
It is marked resolved but I see the same behaviour in xpkg.upbound.io/crossplane-contrib/provider-aws:v0.43.1

Behaviour
I have created a global cluster and a primary region with 1 writer instance has been added under it.
When I try to create a secondary region, I am getting an error with message

      message: 'create failed: pre-create failed: neither a masterUserPasswordSecretRef
        is given, nor password autogeneration was enabled, not a restore is performed'
      reason: ReconcileError

Expected behaviour
I was expecting that while adding the secondary region, we should not be required to provide masterUserPasswordSecretRef or enable autogeneration. That is the expecation in cloud formation as well.

Work-around
As a work-around, I provided a secret for masterUserPasswordSecretRef and used a key which does not exist in the secret data.
Found the work-around here: #1225

CR for Secondary DB cluster
Following CR was submitted for creating the secondary cluster:

apiVersion: v1
items:
- apiVersion: rds.aws.crossplane.io/v1alpha1
  kind: DBCluster
  metadata:
    name: dev-3-aurora-cluster-xzg2g-rvg58
  spec:
    deletionPolicy: Delete
    forProvider:
      backupRetentionPeriod: 1
      copyTagsToSnapshot: true
      dbClusterParameterGroupName: dev-3-aurora-cluster-xzg2g-2m9bk
      dbClusterParameterGroupNameRef:
        name: dev-3-aurora-cluster-xzg2g-2m9bk
      dbClusterParameterGroupNameSelector:
        matchControllerRef: true
      dbSubnetGroupName: dev-3-aurora-cluster-xzg2g-mmtz7
      dbSubnetGroupNameRef:
        name: dev-3-aurora-cluster-xzg2g-mmtz7
      dbSubnetGroupNameSelector:
        matchControllerRef: true
      deletionProtection: false
      enableGlobalWriteForwarding: true
      enableIAMDatabaseAuthentication: false
      engine: aurora-postgresql
      engineMode: provisioned
      engineVersion: "14.11"
      globalClusterIdentifier: dev-3-global-database-9tddw-wtdhv
      port: 5432
      region: eu-west-1 # secondary region
      skipFinalSnapshot: true
      storageEncrypted: false
      storageType: aurora
      tags:
      - key: cluster-name
        value: cp-cluster-infra
      - key: owner
        value: crossplane
      vpcSecurityGroupIDRefs:
      - name: dev-3-aurora-cluster-xzg2g-xv47s
      vpcSecurityGroupIDSelector:
        matchControllerRef: true
      vpcSecurityGroupIDs:
      - sg-05f2860879a274764
    managementPolicies:
    - '*'
    providerConfigRef:
      name: aws-provider-config
    writeConnectionSecretToRef:
      name: 6a16f94c-c4d1-42be-ae51-62a27d397125-aurora-cluster
      namespace: crossplane-system
  status:
    atProvider: {}
    conditions:
    - lastTransitionTime: "2024-05-16T08:43:47Z"
      message: 'create failed: pre-create failed: neither a masterUserPasswordSecretRef
        is given, nor password autogeneration was enabled, not a restore is performed'
      reason: ReconcileError
      status: "False"
      type: Synced
    - lastTransitionTime: "2024-05-16T08:43:47Z"
      reason: Creating
      status: "False"
      type: Ready
kind: List
metadata:
  resourceVersion: ""

Versions
Crossplane version: 1.13.2
provider-aws version :v0.43.1
helm version: v3.14.4
kubectl version: v1.28.9

@nashtapu-tibco nashtapu-tibco added the bug Something isn't working label May 21, 2024
Copy link

Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

@github-actions github-actions bot added the stale label Aug 20, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

1 participant