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

[Feature]: Support for Setting Tenant Variables via ObTenant CR in ob-operator #579

Closed
qchenzi opened this issue Sep 27, 2024 · 1 comment
Assignees
Milestone

Comments

@qchenzi
Copy link
Contributor

qchenzi commented Sep 27, 2024

In OceanBase, users often modify tenant variables by executing SET commands within the tenant environment. Currently, the ob-operator does not support setting these tenant variables directly in the ObTenant Custom Resource (CR). This limitation means that users cannot leverage the ob-operator's reconciliation functions to manage and apply tenant variable changes automatically. For instance, to modify the sql_mode variable for a tenant, users must manually execute the command, rather than specifying it in the ObTenant CR.

Proposal:

Add support in ob-operator to allow users to specify tenant variables directly within the ObTenant CR. The ob-operator should detect these specifications and reconcile the tenant's variables accordingly, applying any changes automatically.

Use Case:

A user wants to set the sql_mode variable for a tenant. Instead of logging into the tenant and executing:

SET sql_mode = 'STRICT_TRANS_TABLES';

the user can specify this variable in the ObTenant CR:

apiVersion: oceanbase.com/v1
kind: ObTenant
metadata:
  name: my-tenant
spec:
  variables:
    sql_mode: 'STRICT_TRANS_TABLES'

The ob-operator would detect this change and apply the variable to the tenant automatically during the reconciliation process.

Conclusion:
Implementing this feature would enhance the ob-operator's functionality by allowing users to manage tenant variables declaratively. It would align the operator more closely with Kubernetes principles of declarative configuration and automation, improving the overall user experience.

@chris-sun-star chris-sun-star added this to the 2.3.1 milestone Sep 29, 2024
@chris-sun-star chris-sun-star self-assigned this Nov 12, 2024
@chris-sun-star
Copy link
Member

tenant variable management: #632
tenant parameter management: #629

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants