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

[RFC] Database governance-VirtualDatabase CRD for a logical database l | 数据库治理-虚拟数据库 #23

Closed
mlycore opened this issue Aug 11, 2022 · 0 comments · Fixed by #40
Labels
area/database-governance Category issues or PRs related to database governance kind/spec-RFC Issues or PRs for OpenSergo spec RFC

Comments

@mlycore
Copy link
Contributor

mlycore commented Aug 11, 2022

domain: database

Umbrella issue: #15

VirtualDatabase defines what a database looks like in the application's view.

(English version TBD...)


在数据库治理中,不管是读写分离、分库分表、影子库,还是加密、审计和访问控制等,都需要作用在一个具体的数据库之上。在这里将这样的一个逻辑的数据库称为虚拟数据库,即 VirtualDatabase。VirtualDatabase 在应用看来是一组特定的数据库访问信息,并通过绑定特定的治理策略实现相应的治理能力。以读写分离为例:

  • services: 表示一组数据库服务。对于每个数据库服务,需要的信息有:
    • name: 当前数据库服务的名称
    • databaseMySQL: 表示当前声明一个 MySQL 协议的数据库
    • readWriteSplitting: 表示当前数据库需要的读写分离策略(可选)

一个基础的 YAML 示例:

apiVersion: database.opensergo.io/v1alpha1
kind: VirtualDatabase
metadata:
  name: readwrite_splitting_db
spec:
  services:
  - name: readwrite_splitting_db
    databaseMySQL:
      db: readwrite_splitting_db
      host: localhost
      port: 3306
      user: root
      password: root
    readWriteSplitting: "readwrite"  # 声明所需要的读写分离策略
@sczyh30 sczyh30 added kind/spec-RFC Issues or PRs for OpenSergo spec RFC area/database-governance Category issues or PRs related to database governance labels Aug 11, 2022
@sczyh30 sczyh30 linked a pull request Sep 8, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/database-governance Category issues or PRs related to database governance kind/spec-RFC Issues or PRs for OpenSergo spec RFC
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants