From 21b7036a2ff490b9bc496ab7b4e96ed744643bbd Mon Sep 17 00:00:00 2001 From: yuyi Date: Mon, 9 Oct 2023 19:20:54 +0800 Subject: [PATCH] fix: optionalize obtenant.spec.credentials --- api/v1alpha1/obtenant_types.go | 2 +- .../crd/bases/oceanbase.oceanbase.com_obtenantoperations.yaml | 2 -- config/crd/bases/oceanbase.oceanbase.com_obtenants.yaml | 1 - pkg/oceanbase/operation/backup.go | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/api/v1alpha1/obtenant_types.go b/api/v1alpha1/obtenant_types.go index 8be9d51bc..113c0a187 100644 --- a/api/v1alpha1/obtenant_types.go +++ b/api/v1alpha1/obtenant_types.go @@ -48,7 +48,7 @@ type OBTenantSpec struct { //+kubebuilder:default=PRIMARY TenantRole apitypes.TenantRole `json:"tenantRole,omitempty"` Source *TenantSourceSpec `json:"source,omitempty"` - Credentials TenantCredentials `json:"credentials"` + Credentials TenantCredentials `json:"credentials,omitempty"` } type TenantCredentials struct { diff --git a/config/crd/bases/oceanbase.oceanbase.com_obtenantoperations.yaml b/config/crd/bases/oceanbase.oceanbase.com_obtenantoperations.yaml index 8d4bdb083..1e27aec62 100644 --- a/config/crd/bases/oceanbase.oceanbase.com_obtenantoperations.yaml +++ b/config/crd/bases/oceanbase.oceanbase.com_obtenantoperations.yaml @@ -278,7 +278,6 @@ spec: unitNum: type: integer required: - - credentials - obcluster - pools - tenantName @@ -766,7 +765,6 @@ spec: unitNum: type: integer required: - - credentials - obcluster - pools - tenantName diff --git a/config/crd/bases/oceanbase.oceanbase.com_obtenants.yaml b/config/crd/bases/oceanbase.oceanbase.com_obtenants.yaml index ab1224aca..e2214753d 100644 --- a/config/crd/bases/oceanbase.oceanbase.com_obtenants.yaml +++ b/config/crd/bases/oceanbase.oceanbase.com_obtenants.yaml @@ -198,7 +198,6 @@ spec: unitNum: type: integer required: - - credentials - obcluster - pools - tenantName diff --git a/pkg/oceanbase/operation/backup.go b/pkg/oceanbase/operation/backup.go index 1c5d5d6ec..292a849ae 100644 --- a/pkg/oceanbase/operation/backup.go +++ b/pkg/oceanbase/operation/backup.go @@ -30,7 +30,7 @@ func (m *OceanbaseOperationManager) SetLogArchiveDestState(state string) error { } func (m *OceanbaseOperationManager) SetLogArchiveConcurrency(concurrency int) error { - return m.SetParameter("log_archive_concurrency", concurrency, nil) + return m.SetParameter("LOG_ARCHIVE_CONCURRENCY", concurrency, nil) } func (m *OceanbaseOperationManager) SetDataBackupDestForTenant(uri string) error {