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

not support datastore type mysql #901

Open
huiwq1990 opened this issue Feb 21, 2024 · 1 comment
Open

not support datastore type mysql #901

huiwq1990 opened this issue Feb 21, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@huiwq1990
Copy link

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.

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

image

image

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

@huiwq1990 huiwq1990 added the kind/bug Something isn't working label Feb 21, 2024
@StevenLeiZhang
Copy link

need optimize the code, when new database type is involved, it should work for all validations.

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

No branches or pull requests

2 participants