Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ type TenantOperationType string

type ClusterOperationType string
type ClusterOperationStatus string

type ParameterScope string
2 changes: 2 additions & 0 deletions api/v1alpha1/obparameter_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ type OBParameterSpec struct {
// Important: Run "make" to regenerate code after modifying this file
ClusterName string `json:"clusterName"`
ClusterId int64 `json:"clusterId,omitempty"`
TenantName string `json:"tenantName,omitempty"`
TenantId int64 `json:"tenantId,omitempty"`
Parameter *apitypes.Parameter `json:"parameter"`
}

Expand Down
16 changes: 9 additions & 7 deletions api/v1alpha1/obtenant_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ type OBTenantSpec struct {
Pools []ResourcePoolSpec `json:"pools"`

//+kubebuilder:default=PRIMARY
TenantRole apitypes.TenantRole `json:"tenantRole,omitempty"`
Source *TenantSourceSpec `json:"source,omitempty"`
Credentials TenantCredentials `json:"credentials,omitempty"`
Scenario string `json:"scenario,omitempty"`
TenantRole apitypes.TenantRole `json:"tenantRole,omitempty"`
Source *TenantSourceSpec `json:"source,omitempty"`
Credentials TenantCredentials `json:"credentials,omitempty"`
Scenario string `json:"scenario,omitempty"`
Parameters []apitypes.Parameter `json:"parameters,omitempty"`
}

type TenantCredentials struct {
Expand Down Expand Up @@ -101,9 +102,10 @@ type OBTenantStatus struct {
OperationContext *tasktypes.OperationContext `json:"operationContext,omitempty"`
TenantRecordInfo TenantRecordInfo `json:"tenantRecordInfo,omitempty"`

TenantRole apitypes.TenantRole `json:"tenantRole,omitempty"`
Source *TenantSourceStatus `json:"source,omitempty"`
Credentials TenantCredentials `json:"credentials,omitempty"`
TenantRole apitypes.TenantRole `json:"tenantRole,omitempty"`
Source *TenantSourceStatus `json:"source,omitempty"`
Credentials TenantCredentials `json:"credentials,omitempty"`
Parameters []apitypes.Parameter `json:"parameters,omitempty"`
}

type TenantSourceStatus struct {
Expand Down
7 changes: 7 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions config/crd/bases/oceanbase.oceanbase.com_obparameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ spec:
- name
- value
type: object
tenantId:
format: int64
type: integer
tenantName:
type: string
required:
- clusterName
- parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,18 @@ spec:
type: boolean
obcluster:
type: string
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
pools:
items:
properties:
Expand Down Expand Up @@ -679,6 +691,18 @@ spec:
- taskStatus
- tasks
type: object
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
resourcePool:
items:
properties:
Expand Down
48 changes: 48 additions & 0 deletions config/crd/bases/oceanbase.oceanbase.com_obtenantoperations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,18 @@ spec:
type: boolean
obcluster:
type: string
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
pools:
items:
properties:
Expand Down Expand Up @@ -535,6 +547,18 @@ spec:
- taskStatus
- tasks
type: object
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
resourcePool:
items:
properties:
Expand Down Expand Up @@ -865,6 +889,18 @@ spec:
type: boolean
obcluster:
type: string
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
pools:
items:
properties:
Expand Down Expand Up @@ -1060,6 +1096,18 @@ spec:
- taskStatus
- tasks
type: object
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
resourcePool:
items:
properties:
Expand Down
24 changes: 24 additions & 0 deletions config/crd/bases/oceanbase.oceanbase.com_obtenants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ spec:
type: boolean
obcluster:
type: string
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
pools:
items:
properties:
Expand Down Expand Up @@ -286,6 +298,18 @@ spec:
- taskStatus
- tasks
type: object
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
resourcePool:
items:
properties:
Expand Down
101 changes: 101 additions & 0 deletions deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10290,6 +10290,11 @@ spec:
- name
- value
type: object
tenantId:
format: int64
type: integer
tenantName:
type: string
required:
- clusterName
- parameter
Expand Down Expand Up @@ -14052,6 +14057,18 @@ spec:
type: boolean
obcluster:
type: string
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
pools:
items:
properties:
Expand Down Expand Up @@ -14247,6 +14264,18 @@ spec:
- taskStatus
- tasks
type: object
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
resourcePool:
items:
properties:
Expand Down Expand Up @@ -15311,6 +15340,18 @@ spec:
type: boolean
obcluster:
type: string
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
pools:
items:
properties:
Expand Down Expand Up @@ -15506,6 +15547,18 @@ spec:
- taskStatus
- tasks
type: object
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
resourcePool:
items:
properties:
Expand Down Expand Up @@ -15836,6 +15889,18 @@ spec:
type: boolean
obcluster:
type: string
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
pools:
items:
properties:
Expand Down Expand Up @@ -16031,6 +16096,18 @@ spec:
- taskStatus
- tasks
type: object
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
resourcePool:
items:
properties:
Expand Down Expand Up @@ -16717,6 +16794,18 @@ spec:
type: boolean
obcluster:
type: string
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
pools:
items:
properties:
Expand Down Expand Up @@ -16912,6 +17001,18 @@ spec:
- taskStatus
- tasks
type: object
parameters:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
resourcePool:
items:
properties:
Expand Down
1 change: 1 addition & 0 deletions internal/const/oceanbase/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ See the Mulan PSL v2 for more details.
package oceanbase

const (
LabelRefOBTenant = "ref-obtenant"
LabelRefOBCluster = "ref-obcluster"
LabelRefOBZone = "ref-obzone"
LabelRefOBServer = "ref-observer"
Expand Down
Loading
Loading