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

Adds port twice when using connectionStrings from upbound/provider-aws-rds #191

Open
lah-wag opened this issue Sep 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@lah-wag
Copy link

lah-wag commented Sep 19, 2024

What happened?

I'm creating a composition that will use manage both RDS and provider-sql databases. I've successfully created an RDS MySQL Instance using the provider-aws-rds.

apiVersion: rds.aws.upbound.io/v1beta3
kind: Instance
metadata:
  name: platform-test-db-mgxgx
spec:
  deletionPolicy: Delete
  forProvider:
    allocatedStorage: 10
    applyImmediately: true
    autoGeneratePassword: true
    autoMinorVersionUpgrade: true
    engine: mysql
    engineVersion: "8.0"
    instanceClass: db.t4g.micro
    multiAz: false
    region: eu-central-1
    skipFinalSnapshot: true
    username: root

Now I want to use provider-sql to manage the databases and users.
The connectionString created by provider-aws-rds looks like this:

apiVersion: v1          
kind: Secret
type: connection.crossplane.io/v1alpha1
metadata:
  name: rds-creds-platform-test-db-mgxgx
  namespace: crossplane
data:
  address: platform-test-db-mgxgx.hashhashash.eu-central-1.rds.amazonaws.com
  attribute.password: REDACTED
  endpoint: platform-test-db-mgxgx.hashhashash.eu-central-1.rds.amazonaws.com:3306
  host: platform-test-db-mgxgx.hashhashash.eu-central-1.rds.amazonaws.com
  password: REDACTED
  port: "3306"
  username: root

Referencing it from a ProviderConfig works fine

apiVersion: mysql.sql.crossplane.io/v1alpha1
kind: ProviderConfig
metadata:
  name: mysql-provider-config-platform-test-db-mgxgx
spec:
  credentials:
    connectionSecretRef:
      name: rds-creds-platform-test-db-mgxgx
      namespace: crossplane
    source: MySQLConnectionSecret
  tls: preferred

When creating a database there's an issue with the port being added twice:

kubectl get events -w
0s (x9 over 1s)          Warning   CannotObserveExternalResource   Database/rds-test                                                
cannot select database: dial tcp: lookup platform-test-db-mgxgx.hashhashhas.eu-central-1.rds.amazonaws.com:3306:3306: no such host

What environment did it happen in?

Cloud provider: AWS EKS

$ crossplane version
Client Version: v1.17.0
Server Version: v1.17.0
$ kubectl version
Client Version: v1.31.1
Kustomize Version: v5.4.2
Server Version: v1.29.7-eks-2f46c53
@lah-wag lah-wag added the bug Something isn't working label Sep 19, 2024
@lah-wag
Copy link
Author

lah-wag commented Sep 20, 2024

Would be solved by: #154
Possible upstream issue: crossplane-contrib/provider-upjet-aws#778

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant