File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
internal/resource/obtenant Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import (
1717 "encoding/json"
1818 "fmt"
1919 "reflect"
20+ "slices"
2021 "time"
2122
2223 "github.com/pkg/errors"
@@ -37,6 +38,7 @@ import (
3738 "github.com/oceanbase/ob-operator/pkg/helper/converter"
3839 helpermodel "github.com/oceanbase/ob-operator/pkg/helper/model"
3940 "github.com/oceanbase/ob-operator/pkg/oceanbase-sdk/const/status/tenant"
41+ "github.com/oceanbase/ob-operator/pkg/oceanbase-sdk/const/variables"
4042 "github.com/oceanbase/ob-operator/pkg/oceanbase-sdk/model"
4143 "github.com/oceanbase/ob-operator/pkg/task/builder"
4244 tasktypes "github.com/oceanbase/ob-operator/pkg/task/types"
@@ -613,6 +615,14 @@ func MaintainTenantVariables(m *OBTenantManager) tasktypes.TaskError {
613615 variableMap := make (map [string ]apitypes.Variable )
614616 for _ , variable := range m .OBTenant .Status .Variables {
615617 m .Logger .V (oceanbaseconst .LogLevelDebug ).Info ("Build variable map" , "variable" , variable .Name )
618+ // skip readonly variables
619+ if slices .Contains (variables .ReadonlyVariables , variable .Name ) {
620+ continue
621+ }
622+ // skip unsupported variables
623+ if slices .Contains (variables .UnsupportedVariables , variable .Name ) {
624+ continue
625+ }
616626 variableMap [variable .Name ] = variable
617627 }
618628 for _ , variable := range m .OBTenant .Spec .Variables {
You can’t perform that action at this time.
0 commit comments