Open huiwq1990 opened 8 months ago
Describe the bug
When I start velaux with command --datastore-type=mysql, the velaux pod start failed with message Error: not support datastore type mysql.
--datastore-type=mysql
Error: not support datastore type mysql
To Reproduce
Expected behavior
The velaux support mysql as datastore, as the code https://github.com/kubevela/velaux/blob/main/pkg/server/server.go#L146
switch s.cfg.Datastore.Type { case "mongodb": ds, err = mongodb.New(context.Background(), s.cfg.Datastore) if err != nil { return fmt.Errorf("create mongodb datastore instance failure %w", err) } case "kubeapi": ds, err = kubeapi.New(context.Background(), s.cfg.Datastore, kubeClient) if err != nil { return fmt.Errorf("create kubeapi datastore instance failure %w", err) } case "mysql": ds, err = mysql.New(context.Background(), s.cfg.Datastore) if err != nil { return fmt.Errorf("create mysql datastore instance failure %w", err) }
Screenshots
KubeVela Version
latest version.
Additional context
It's caused by config validation not include mysql. https://github.com/kubevela/velaux/blob/v1.9.3/pkg/server/config/config.go#L110
need optimize the code, when new database type is involved, it should work for all validations.
Hi, is there anything I can do to help? I'm available and would be happy to assist.
Describe the bug
When I start velaux with command
--datastore-type=mysql
, the velaux pod start failed with messageError: not support datastore type mysql
.To Reproduce
Expected behavior
The velaux support mysql as datastore, as the code https://github.com/kubevela/velaux/blob/main/pkg/server/server.go#L146
Screenshots
KubeVela Version
latest version.
Additional context
It's caused by config validation not include mysql. https://github.com/kubevela/velaux/blob/v1.9.3/pkg/server/config/config.go#L110