Crossplane: Provisioning an ApsaraDB for RDS instance failed with the RDSInstance CRD

Created on 22 May 2020  Â·  3Comments  Â·  Source: crossplane/crossplane

What happened?

Followed provision infrasture to provision an RDSInstance CRD, it failed with the issue connect failed: cannot get provider secret: Secret "alibaba-creds" not found

➜  /Users/zhouzhengxi/Programming/golang/src/github.com/zzxwill/crossplane git:(master) k describe rdsinstance rdspostgresql
Name:         rdspostgresql
Namespace:
Labels:       <none>
Annotations:  API Version:  database.alibaba.crossplane.io/v1alpha1
Kind:         RDSInstance
Metadata:
  Creation Timestamp:  2020-05-22T06:09:53Z
  Generation:          1
  Resource Version:    11357501
  Self Link:           /apis/database.alibaba.crossplane.io/v1alpha1/rdsinstances/rdspostgresql
  UID:                 cc55635d-d2e3-44b2-b007-8861a5ab3f5d
Spec:
  For Provider:
    Db Instance Class:          rds.pg.s1.small
    Db Instance Storage In GB:  20
    Engine:                     postgresql
    Engine Version:             9.4
    Master Username:            test123
    Security IP List:           0.0.0.0/0
  Provider Ref:
    Name:          alibaba-provider
  Reclaim Policy:  Delete
  Write Connection Secret To Ref:
    Name:       alibaba-rdspostgresql-conn
    Namespace:  crossplane-system
Status:
  At Provider:
    Account Ready:   false
    Db Instance ID:
  Conditions:
    Last Transition Time:  2020-05-22T06:09:53Z
    Message:               connect failed: cannot get provider secret: Secret "alibaba-creds" not found
    Reason:                Encountered an error during resource reconciliation
    Status:                False
    Type:                  Synced
Events:
  Type     Reason                   Age                 From                                                Message
  ----     ------                   ----                ----                                                -------
  Warning  CannotConnectToProvider  74s (x20 over 10m)  managed/rdsinstance.database.alibaba.crossplane.io  cannot get provider secret: Secret "alibaba-creds" not found

How can we reproduce it?


Followed provision infrasture

What environment did it happen in?

Crossplane version:

v 0.11.0

  • Cloud provider or hardware configuration

  • Kubernetes version (use kubectl version)

  • âžœ  /Users/zhouzhengxi/Downloads kubectl version
    Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:56:40Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"darwin/amd64"}
    Server Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.6-aliyun.1", GitCommit:"27fbcf7", GitTreeState:"", BuildDate:"2020-03-11T10:33:57Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}
    
    • Kubernetes distribution (e.g. Tectonic, GKE, OpenShift)
    Alibaba ACS
    
    • OS (e.g. from /etc/os-release)
      System Version: macOS 10.15.3 (19D76)
    • Kernel (e.g. uname -a)
    Darwin zhouzhengxi.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64
    
    bug

    All 3 comments

    I figured out the root cause is the creation of Alibaba Provider secrets that the secret should be created under namespace crossplane-system by kubectl create secret generic alibaba-creds --from-literal=accessKeyId=LTAI4FihXXpGkBdb4V13qJSW --from-literal=accessKeySecret=8FafZc2DJw8AjtMlxfwVfaB1qKGgov -n crossplane-system.
    Wait for a while, the RDSInstance CRD became READY and the PostgreSql RDS was successfully deployed on Alibaba Cloud Console.

    ➜  /Users/zhouzhengxi/Programming/golang/src/github.com/zzxwill/crossplane git:(master) k get rdsinstance
    NAME            READY   SYNCED   STATE     ENGINE       VERSION   AGE
    rdspostgresql   True    True     Running   postgresql   9.4       42m
    

    image

    Thanks for the detailed description and for providing fixes here @zzxwill!

    I believe you have fixed this in #1562 and it has been back ported in #1565 :+1:

    Was this page helpful?
    0 / 5 - 0 ratings

    Related issues

    turkenh picture turkenh  Â·  5Comments

    hasheddan picture hasheddan  Â·  6Comments

    timstoop picture timstoop  Â·  4Comments

    negz picture negz  Â·  3Comments

    hasheddan picture hasheddan  Â·  7Comments