github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/test/testdata/resources/mysql-config-constraint.yaml (about)

     1  apiVersion: apps.kubeblocks.io/v1alpha1
     2  kind: ConfigConstraint
     3  metadata:
     4    name: mysql-tree-node-template-8.0
     5  spec:
     6    # configmap reference
     7    reloadOptions:
     8      unixSignalTrigger:
     9        signal: SIGHUP
    10        processName: mysqld
    11  
    12    # top level mysql configuration type
    13    cfgSchemaTopLevelName: MysqlParameter
    14  
    15    # ConfigurationSchema that impose restrictions on engine parameter's rule
    16    configurationSchema:
    17      # schema: auto generate from cue scripts
    18      # example: ../../pkg/configuration/testdata/mysql_openapi.json
    19      cue: |-
    20        // top level configuration type
    21        //  mysql server param: a set of name/value pairs.
    22        #MysqlParameter: {
    23          // [OFF|ON] default ON
    24          automatic_sp_privileges: string & "OFF" | "ON" | *"ON"
    25          // [1~65535] default ON
    26          auto_increment_increment: int & >= 1 & <= 65535 | *1
    27          // [4096~16777216] default 2G
    28          binlog_stmt_cache_size?: int & >= 4096 & <= 16777216 | *2097152
    29          // [0|1|2] default: 2
    30          innodb_autoinc_lock_mode?: int & 0 | 1 | 2 | *2
    31          // other parameters
    32          // reference mysql parameters
    33          ...
    34        }
    35        
    36        mysqld: #MysqlParameter
    37        // ignore client parameter validate
    38        // mysql client: a set of name/value pairs.
    39        client?: {
    40          [string]: string
    41        } @protobuf(2,type=map<string,string>)
    42  
    43    #  require db instance restart
    44    staticParameters:
    45      - automatic_sp_privileges
    46  
    47    dynamicParameters:
    48      - innodb_autoinc_lock_mode
    49  
    50    # mysql configuration file format
    51    formatterConfig:
    52      format: ini
    53      iniConfig:
    54        sectionName: mysqld