Skip to content

Commit

Permalink
fix(tenant): added deletion protection field to tenant
Browse files Browse the repository at this point in the history
  • Loading branch information
powerfooI committed Dec 20, 2024
1 parent b585c48 commit c6e2349
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/dashboard/business/oceanbase/obtenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ func buildOverviewFromApiType(t *v1alpha1.OBTenant) *response.OBTenantOverview {
rt.Charset = t.Spec.Charset
rt.Locality = t.Status.TenantRecordInfo.Locality
rt.PrimaryZone = t.Status.TenantRecordInfo.PrimaryZone
rt.DeletionProtection = t.Annotations[oceanbaseconst.AnnotationsIgnoreDeletion] == "true"

for i := range t.Status.Pools {
pool := t.Status.Pools[i]
Expand Down
2 changes: 2 additions & 0 deletions internal/dashboard/model/response/obtenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ type OBTenantOverview struct {
Locality string `json:"locality" binding:"required"` // Locality of the tenant units
Charset string `json:"charset" binding:"required"` // Charset of the tenant
PrimaryZone string `json:"primaryZone" binding:"required"` // Primary zone of the tenant

DeletionProtection bool `json:"deletionProtection" binding:"required"` // Whether the tenant is protected from deletion
}

type OBTenantDetail struct {
Expand Down

0 comments on commit c6e2349

Please sign in to comment.