kubevault / project

Enhancements & Issues for KubeVault
https://kubevault.com
Apache License 2.0
7 stars 0 forks source link

Mysql connection url generated from AppBinding gives error #34

Closed nightfury1204 closed 5 years ago

nightfury1204 commented 5 years ago
apiVersion: appcatalog.appscode.com/v1alpha1
kind: AppBinding
metadata:
  name: mysql-app
  namespace: demo
spec:
  secret:
    name: mysql-user-cred # secret
  clientConfig:
    service:
      name: mysql
      scheme: mysql
      port: 3306
failed to create database connection config: Error making API request.

URL: POST https://vault.demo.svc:8200/v1/database/config/mysql-app
Code: 400. Errors:

* error creating database object: error verifying connection: invalid DSN: missing the slash separating the database name
tamalsaha commented 5 years ago

I think you are using old version of the AppBinding. I fixed it https://github.com/kubedb/mysql/blob/master/pkg/controller/appbinding.go#L38

Try the new version.

tamalsaha commented 5 years ago

Fixed using AppBinding 'url' instead of service.