github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/apecloud-mysql/templates/configconstraint.yaml (about) 1 {{- $cc := .Files.Get "config/mysql8-config-effect-scope.yaml" | fromYaml }} 2 apiVersion: apps.kubeblocks.io/v1alpha1 3 kind: ConfigConstraint 4 metadata: 5 name: mysql8.0-config-constraints 6 labels: 7 {{- include "apecloud-mysql.labels" . | nindent 4 }} 8 spec: 9 # configmap reference 10 # tplRef: mysql-3node-tpl-8.0 11 reloadOptions: 12 tplScriptTrigger: 13 sync: true 14 scriptConfigMapRef: mysql-reload-script 15 namespace: {{ .Release.Namespace }} 16 17 # top level mysql configuration type 18 cfgSchemaTopLevelName: MysqlParameter 19 20 # ConfigurationSchema that impose restrictions on engine parameter's rule 21 configurationSchema: 22 # schema: auto generate from mmmcue scripts 23 # example: ../../pkg/configuration/testdata/mysql_openapi.json 24 cue: |- 25 {{- .Files.Get "config/mysql8-config-constraint.cue" | nindent 6 }} 26 27 ## define static parameter list 28 {{- if hasKey $cc "staticParameters" }} 29 staticParameters: 30 {{- $params := get $cc "staticParameters" }} 31 {{- range $params }} 32 - {{ . }} 33 {{- end }} 34 {{- end}} 35 36 ## define dynamic parameter list 37 {{- if hasKey $cc "dynamicParameters" }} 38 dynamicParameters: 39 {{- $params := get $cc "dynamicParameters" }} 40 {{- range $params }} 41 - {{ . }} 42 {{- end }} 43 {{- end}} 44 45 ## define immutable parameter list, this feature is not currently supported. 46 {{- if hasKey $cc "immutableParameters" }} 47 immutableParameters: 48 {{- $params := get $cc "immutableParameters" }} 49 {{- range $params }} 50 - {{ . }} 51 {{- end }} 52 {{- end}} 53 54 55 # mysql configuration file format 56 formatterConfig: 57 format: ini 58 iniConfig: 59 sectionName: mysqld 60 --- 61 apiVersion: apps.kubeblocks.io/v1alpha1 62 kind: ConfigConstraint 63 metadata: 64 name: mysql-scale-vttablet-config-constraints 65 labels: 66 {{- include "apecloud-mysql.labels" . | nindent 4 }} 67 spec: 68 cfgSchemaTopLevelName: VtTabletParameter 69 70 configurationSchema: 71 cue: |- 72 {{- .Files.Get "config/mysql-scale-vttablet-config-constraint.cue" | nindent 6 }} 73 74 # mysql-scale configuration file format 75 formatterConfig: 76 format: ini 77 iniConfig: 78 sectionName: vttablet 79 --- 80 apiVersion: apps.kubeblocks.io/v1alpha1 81 kind: ConfigConstraint 82 metadata: 83 name: mysql-scale-vtconsensus-config-constraints 84 labels: 85 {{- include "apecloud-mysql.labels" . | nindent 4 }} 86 spec: 87 cfgSchemaTopLevelName: VtConsensusParameter 88 89 configurationSchema: 90 cue: |- 91 {{- .Files.Get "config/mysql-scale-vtconsensus-config-constraint.cue" | nindent 6 }} 92 93 # mysql-scale configuration file format 94 formatterConfig: 95 format: ini 96 iniConfig: 97 sectionName: vtconsensus 98 --- 99 apiVersion: apps.kubeblocks.io/v1alpha1 100 kind: ConfigConstraint 101 metadata: 102 name: mysql-scale-vtgate-config-constraints 103 labels: 104 {{- include "apecloud-mysql.labels" . | nindent 4 }} 105 spec: 106 cfgSchemaTopLevelName: VtGateParameter 107 108 configurationSchema: 109 cue: |- 110 {{- .Files.Get "config/mysql-scale-vtgate-config-constraint.cue" | nindent 6 }} 111 112 # mysql-scale configuration file format 113 formatterConfig: 114 format: ini 115 iniConfig: 116 sectionName: vtgate