Skip to content

not support datastore type mysql #901

@huiwq1990

Description

@huiwq1990

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions