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

Alibaba: PostgreSQLInstance.database.crossplane.io "app-postgresql" is invalid: spec.engineVersion: Unsupported value: "10.0": supported values: "9.6", "11" #23

Closed
zzxwill opened this issue May 27, 2020 · 5 comments

Comments

@zzxwill
Copy link
Collaborator

zzxwill commented May 27, 2020

What happened?

Followed provider-alibaba README to make demo for the PoC, I hit an issue.

➜  /Users/zhouzhengxi/Programming/golang/src/github.com/zzxwill/provider-alibaba git:(oss) k describe applicationconfiguration service-tracker-managed
Name:         service-tracker-managed
Namespace:    default
Labels:       <none>
Annotations:  API Version:  core.oam.dev/v1alpha2
Kind:         ApplicationConfiguration
Metadata:
  Creation Timestamp:  2020-05-27T08:30:52Z
  Generation:          1
  Managed Fields:
    API Version:  core.oam.dev/v1alpha2
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        .:
        f:conditions:
    Manager:      crossplane
    Operation:    Update
    Time:         2020-05-27T08:30:52Z
    API Version:  core.oam.dev/v1alpha2
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:kubectl.kubernetes.io/last-applied-configuration:
      f:spec:
        .:
        f:components:
    Manager:         kubectl
    Operation:       Update
    Time:            2020-05-27T08:30:52Z
  Resource Version:  8006
  Self Link:         /apis/core.oam.dev/v1alpha2/namespaces/default/applicationconfigurations/service-tracker-managed
  UID:               3e275c18-0148-4a69-b674-db40bf321a82
Spec:
  Components:
    Component Name:  tracker-managed-postgres-db
    Parameter Values:
      Name:          dbconn
      Value:         trackerdbconn
    Component Name:  data-api
    Parameter Values:
      Name:          dbsecret
      Value:         trackerdbconn
      Name:          dbname
      Value:         postgres
      Name:          dbport
      Value:         3433
      Name:          dbdriver
      Value:         postgres
      Name:          dboptions
      Value:
    Component Name:  flights-api
    Parameter Values:
      Name:   dataUri
      Value:  http://data-api.default.svc.cluster.local:3009/
    Traits:
      Trait:
        API Version:  core.oam.dev/v1alpha2
        Kind:         ManualScalerTrait
        Metadata:
          Name:  flights-api
        Spec:
          Replica Count:  2
    Component Name:       quakes-api
    Parameter Values:
      Name:   dataUri
      Value:  http://data-api.default.svc.cluster.local:3009/
    Traits:
      Trait:
        API Version:  core.oam.dev/v1alpha2
        Kind:         ManualScalerTrait
        Metadata:
          Name:  quakes-api
        Spec:
          Replica Count:  2
    Component Name:       weather-api
    Parameter Values:
      Name:   dataUri
      Value:  http://data-api.default.svc.cluster.local:3009/
    Traits:
      Trait:
        API Version:  core.oam.dev/v1alpha2
        Kind:         ManualScalerTrait
        Metadata:
          Name:  weather-api
        Spec:
          Replica Count:  2
    Component Name:       service-tracker-ui
    Parameter Values:
      Name:   flightsUri
      Value:  http://flights-api.default.svc.cluster.local:3003/
      Name:   weatherUri
      Value:  http://weather-api.default.svc.cluster.local:3015/
      Name:   quakesUri
      Value:  http://quakes-api.default.svc.cluster.local:3012/
Status:
  Conditions:
    Last Transition Time:  2020-05-27T08:30:52Z
    Message:               cannot apply components: cannot apply workload "app-postgresql": cannot create object: PostgreSQLInstance.database.crossplane.io "app-postgresql" is invalid: spec.engineVersion: Unsupported value: "10.0": supported values: "9.6", "11"
    Reason:                Encountered an error during resource reconciliation
    Status:                False
    Type:                  Synced
Events:
  Type     Reason                 Age                From                                       Message
  ----     ------                 ----               ----                                       -------
  Normal   RenderedComponents     7s (x6 over 2m7s)  oam/applicationconfiguration.core.oam.dev  Successfully rendered components
  Warning  CannotApplyComponents  7s (x6 over 2m7s)  oam/applicationconfiguration.core.oam.dev  cannot apply workload "app-postgresql": cannot create object: PostgreSQLInstance.database.crossplane.io "app-postgresql" is invalid: spec.engineVersion: Unsupported value: "10.0": supported values: "9.6", "11"

How can we reproduce it?

Followed provider-alibaba README

@hasheddan
Copy link
Member

@zzxwill I am going to move this over to the provider-alibaba repo 👍

@hasheddan hasheddan transferred this issue from crossplane/crossplane May 27, 2020
@zzxwill
Copy link
Collaborator Author

zzxwill commented May 27, 2020

By editing CustomResourceDefinition postgresqlinstances.database.crossplane.io and adding engineversion 9.4, I could deployed a PostgreSqlinstance successfully.

              engineVersion:
                description: 'EngineVersion specifies the desired PostgreSQL engine
                  version. Allowed Versions: 9.6 and 11.'
                enum:
                - "9.6"
                - "11"
                - "9.4"
                type: string

The RDS doc said The database engine and engine version that the RDS instance is running. Select PostgreSQL. Supported PostgreSQL versions are 9.4, 10, 11, and 12.
So I plan to modify the lines near https://github.com/crossplane/crossplane/blob/master/cluster/charts/crossplane-types/crds/database.crossplane.io_postgresqlinstances.yaml#L147 by creating an PR.

@zzxwill
Copy link
Collaborator Author

zzxwill commented May 27, 2020

@zzxwill I am going to move this over to the provider-alibaba repo 👍

Okay, thanks. I am hesitated to decide which repo should I open this issue, crossplane or provider-alibaba. By investigation above, the root cause might locate in this repo, so I created it here. But I think you are right with the transfer. Thanks.

@zzxwill
Copy link
Collaborator Author

zzxwill commented May 27, 2020

Moreover, the English version of RDS creation specification is wrong, those allowed engine version should among 9.4/10.0/11.0/12.0 per the Chinese version which I also verified myself.

@zzxwill
Copy link
Collaborator Author

zzxwill commented Apr 25, 2021

Implemented by the linked PR.

@zzxwill zzxwill closed this as completed Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants