From 66f3ad3aee0ddfe6f58397f503b4e38bc894aad5 Mon Sep 17 00:00:00 2001 From: Spencer Cai Date: Mon, 13 Nov 2023 12:58:43 +0800 Subject: [PATCH] chore: Add `values.schema.json` to `apecloud-mysql` (#2) --- addons/apecloud-mysql/values.schema.json | 563 +++++++++++++++++++++++ 1 file changed, 563 insertions(+) create mode 100644 addons/apecloud-mysql/values.schema.json diff --git a/addons/apecloud-mysql/values.schema.json b/addons/apecloud-mysql/values.schema.json new file mode 100644 index 000000000..a90066b21 --- /dev/null +++ b/addons/apecloud-mysql/values.schema.json @@ -0,0 +1,563 @@ +{ + "$schema": "https://json-schema.org/schema#", + "type": "object", + "properties": { + "image": { + "title": "Image", + "description": "Image.", + "type": "object", + "default": { + "image": { + "registry": "", + "repository": "apecloud/apecloud-mysql-server", + "pullPolicy": "IfNotPresent", + "tag": "8.0.30-5.beta2.20230830.g4ca1eb8.13" + } + }, + "properties": { + "registry": { + "title": "Registry", + "description": "Registry to download the image.", + "type": "string", + "default": "" + }, + "repository": { + "title": "Repository.", + "description": "Image repository under the registry", + "type": "string", + "default": "apecloud/apecloud-mysql-server" + }, + "pullPolicy": { + "title": "PullPolicy", + "description": "Image pull policy.", + "type": "string", + "default": "IfNotPresent", + "enum": [ + "IfNotPresent", + "Always", + "Never" + ] + }, + "tag": { + "title": "Tag", + "description": "Overrides the image tag whose default is the chart appVersion.", + "type": "string", + "default": "8.0.30-5.beta2.20230830.g4ca1eb8.13" + } + } + }, + "cluster": { + "title": "Cluster", + "description": "MySQL Cluster parameters.", + "type": "object", + "default": { + "clusterId": "1", + "clusterStartIndex": "1", + "replicaSetCount": 3, + "templateConfig": null, + "customConfig": null, + "dynamicConfig": null, + "kbWeSQLImage": "1" + }, + "properties": { + "clusterId": { + "title": "ClusterId", + "description": "CLUSTER_ID", + "type": "string", + "default": "1" + }, + "clusterStartIndex": { + "title": "ClusterStartIndex", + "description": "CLUSTER_START_INDEX", + "type": "string", + "default": "1" + }, + "replicaSetCount": { + "title": "ReplicaSetCount", + "description": "cluster.replicaSetCount.", + "type": "integer", + "default": 3 + }, + "templateConfig": { + "title": "TemplateConfig", + "description": "MYSQL_TEMPLATE_CONFIG.", + "type": [ + "string", + "null" + ], + "default": null + }, + "customConfig": { + "title": "CustomConfig", + "description": "MYSQL_CUSTOM_CONFIG.", + "type": [ + "string", + "null" + ], + "default": null + }, + "dynamicConfig": { + "title": "DynamicConfig", + "description": "MYSQL_DYNAMIC_CONFIG.", + "type": [ + "string", + "null" + ], + "default": null + }, + "kbWeSQLImage": { + "title": "KbWeSQLImage", + "description": "KB_EMBEDDED_WESQL.", + "type": "string", + "default": "1" + } + } + }, + "auth": { + "title": "Auth", + "description": "MySQL Authentication parameters.", + "type": "object", + "default": { + "rootHost": "%", + "createDatabase": true, + "database": "mydb", + "username": "u1", + "password": "u1", + "replicationUser": "replicator", + "replicationPassword": "" + }, + "properties": { + "rootHost": { + "title": "RootHost", + "description": "MYSQL_ROOT_HOST.", + "type": "string", + "default": "%" + }, + "createDatabase": { + "title": "CreateDatabase", + "description": "Whether to create the .Values.auth.database or not.", + "type": "boolean", + "default": true + }, + "database": { + "title": "Database", + "description": "Name for a custom database to create.", + "type": "string", + "default": "mydb" + }, + "username": { + "title": "Username", + "description": "Name for a custom user to create.", + "type": "string", + "default": "u1" + }, + "password": { + "title": "Password", + "description": "Password for the user.", + "type": "string", + "default": "u1" + }, + "replicationUser": { + "title": "ReplicationUser", + "description": "MySQL replication user.", + "type": "string", + "default": "replicator" + }, + "replicationPassword": { + "title": "ReplicationPassword", + "description": "MySQL replication user password. Ignored if existing secret is provided.", + "type": "string", + "default": "" + } + } + }, + "nameOverride": { + "title": "NameOverride", + "description": "Override name for K8s object metadata name.", + "type": "string", + "default": "" + }, + "fullnameOverride": { + "title": "FullnameOverride", + "description": "Override fullname for fully qualified app name.", + "type": "string", + "default": "" + }, + "clusterVersionOverride": { + "title": "ClusterVersionOverride", + "description": "Override cluster version in the metadata name of the ClusterVersion.", + "type": "string", + "default": "" + }, + "mysqlConfigs": { + "title": "MysqlConfigs", + "description": "Data path configs for MySQL.", + "type": "object", + "default": { + "dataMountPath": "/data/mysql", + "dataDir": "/data/mysql/data", + "logBin": "/data/mysql/binlog/mysql-bin" + }, + "properties": { + "dataMountPath": { + "title": "DataMountPath", + "description": "MySQL data path to mount.", + "type": "string", + "default": "/data/mysql" + }, + "dataDir": { + "title": "DataDir", + "description": "Absolute path of the MySQL data.", + "type": "string", + "default": "/data/mysql/data" + }, + "logBin": { + "title": "LogBin", + "description": "Absolute path for the MySQL binlog.", + "type": "string", + "default": "/data/mysql/binlog/mysql-bin" + } + } + }, + "logConfigs": { + "title": "LogConfigs", + "description": "Log path configs for MySQL.", + "type": "object", + "default": { + "error": "/data/mysql/log/mysqld-error.log", + "slow": "/data/mysql/log/mysqld-slowquery.log", + "general": "/data/mysql/log/mysqld.log" + }, + "properties": { + "error": { + "title": "Error", + "description": "Absolute path for the error log.", + "type": "string", + "default": "/data/mysql/log/mysqld-error.log" + }, + "slow": { + "title": "Slow", + "description": "Absolute path for the slow log.", + "type": "string", + "default": "/data/mysql/log/mysqld-slowquery.log" + }, + "general": { + "title": "General", + "description": "Absolute path for the general log.", + "type": "string", + "default": "/data/mysql/log/mysqld.log" + } + } + }, + "vtgateLogConfigs": { + "title": "VtgateLogConfigs", + "description": "Log path configs for vtgate", + "type": "object", + "default": { + "error": "/vtdataroot/vtgate.ERROR", + "warning": "/vtdataroot/vtgate.WARNING", + "info": "/vtdataroot/vtgate.INFO", + "queryLog": "/vtdataroot/vtgate_querylog.txt" + }, + "properties": { + "error": { + "title": "Error", + "description": "Absolute path for the error log.", + "type": "string", + "default": "/vtdataroot/vtgate.ERROR" + }, + "warning": { + "title": "Warning", + "description": "Absolute path for the warning log.", + "type": "string", + "default": "/vtdataroot/vtgate.WARNING" + }, + "info": { + "title": "Info", + "description": "Absolute path for the info log.", + "type": "string", + "default": "/vtdataroot/vtgate.INFO" + }, + "queryLog": { + "title": "QueryLog", + "description": "Absolute path for the query log.", + "type": "string", + "default": "/vtdataroot/vtgate_querylog.txt" + } + } + }, + "vtconsensusLogConfigs": { + "title": "VtconsensusLogConfigs", + "description": "Log path configs for vtconsensus", + "type": "object", + "default": { + "error": "/vtdataroot/vtconsensus/vtconsensus.ERROR", + "warning": "/vtdataroot/vtconsensus/vtconsensus.WARNING", + "info": "/vtdataroot/vtconsensus/vtconsensus.INFO" + }, + "properties": { + "error": { + "title": "Error", + "description": "Absolute path for the error log.", + "type": "string", + "default": "/vtdataroot/vtconsensus/vtconsensus.ERROR" + }, + "warning": { + "title": "Warning", + "description": "Absolute path for the warning log.", + "type": "string", + "default": "/vtdataroot/vtconsensus/vtconsensus.WARNING" + }, + "info": { + "title": "Info", + "description": "Absolute path for the info log.", + "type": "string", + "default": "/vtdataroot/vtconsensus/vtconsensus.INFO" + } + } + }, + "roleProbe": { + "title": "RoleProbe", + "description": "Probe config for MySQL", + "type": "object", + "default": { + "failureThreshold": 2, + "periodSeconds": 1, + "timeoutSeconds": 1 + }, + "properties": { + "failureThreshold": { + "title": "FailureThreshold", + "description": "Number of times to retry before marking this probe as failed.", + "type": "integer", + "default": 2 + }, + "periodSeconds": { + "title": "PeriodSeconds", + "description": "How often (in seconds) to perform the probe.", + "type": "integer", + "default": 1 + }, + "timeoutSeconds": { + "title": "TimeoutSeconds", + "description": "Number of seconds after which the probe times out.", + "type": "integer", + "default": 1 + } + } + }, + "logCollector": { + "title": "LogCollector", + "description": "LogCollector config for MySQL", + "type": "object", + "default": { + "enabled": false + }, + "properties": { + "enabled": { + "title": "Enabled", + "description": "Whether to enable log collector or not.", + "type": "boolean", + "default": false + } + } + }, + "metrics": { + "title": "Metrics", + "description": "Configs for metrics container of MySQL", + "type": "object", + "default": { + "image": { + "registry": "", + "repository": "apecloud/agamotto", + "tag": "0.1.2-beta.1", + "pullPolicy": "IfNotPresent" + }, + "service": { + "port": 9104 + } + }, + "properties": { + "image": { + "title": "Image", + "description": "Image.", + "type": "object", + "default": { + "registry": "", + "repository": "apecloud/agamotto", + "tag": "0.1.2-beta.1", + "pullPolicy": "IfNotPresent" + }, + "properties": { + "registry": { + "title": "Registry", + "description": "Registry to download the image.", + "type": "string", + "default": "" + }, + "repository": { + "title": "Repository.", + "description": "Image repository under the registry", + "type": "string", + "default": "apecloud/agamotto" + }, + "pullPolicy": { + "title": "PullPolicy", + "description": "Image pull policy.", + "type": "string", + "default": "IfNotPresent", + "enum": [ + "IfNotPresent", + "Always", + "Never" + ] + }, + "tag": { + "title": "Tag", + "description": "Image tag.", + "type": "string", + "default": "0.1.2-beta.1" + } + } + }, + "service": { + "title": "Service", + "description": "Service configs for the metrics.", + "type": "object", + "default": { + "port": 9104 + }, + "properties": { + "port": { + "title": "Port", + "description": "Port for the metrics.", + "type": "integer", + "default": 9104 + } + } + } + } + }, + "backupTool": { + "title": "BackupTool", + "description": "Configs for backup tool container of MySQL", + "type": "object", + "default": { + "image": { + "registry": "", + "repository": "apecloud/apecloud-xtrabackup", + "tag": "latest", + "pullPolicy": "IfNotPresent" + } + }, + "properties": { + "image": { + "title": "Image", + "description": "Image.", + "type": "object", + "default": { + "registry": "", + "repository": "apecloud/apecloud-xtrabackup", + "tag": "latest", + "pullPolicy": "IfNotPresent" + }, + "properties": { + "registry": { + "title": "Registry", + "description": "Registry to download the image.", + "type": "string", + "default": "" + }, + "repository": { + "title": "Repository.", + "description": "Image repository under the registry", + "type": "string", + "default": "apecloud/apecloud-xtrabackup" + }, + "pullPolicy": { + "title": "PullPolicy", + "description": "Image pull policy.", + "type": "string", + "default": "IfNotPresent", + "enum": [ + "IfNotPresent", + "Always", + "Never" + ] + }, + "tag": { + "title": "Tag", + "description": "Image tag.", + "type": "string", + "default": "latest" + } + } + } + } + }, + "wesqlscale": { + "title": "Wesqlscale", + "description": "Configs for wesqlscale container of MySQL", + "type": "object", + "default": { + "cell": "zone1", + "image": { + "registry": "", + "repository": "apecloud/apecloud-mysql-scale", + "tag": "0.1.1", + "pullPolicy": "IfNotPresent" + } + }, + "properties": { + "cell": { + "title": "Cell", + "description": "Cell.", + "type": "string", + "default": "zone1" + }, + "image": { + "title": "Image", + "description": "Image.", + "type": "object", + "default": { + "registry": "", + "repository": "apecloud/apecloud-mysql-scale", + "tag": "0.1.1", + "pullPolicy": "IfNotPresent" + }, + "properties": { + "registry": { + "title": "Registry", + "description": "Registry to download the image.", + "type": "string", + "default": "" + }, + "repository": { + "title": "Repository.", + "description": "Image repository under the registry", + "type": "string", + "default": "apecloud/apecloud-mysql-scale" + }, + "pullPolicy": { + "title": "PullPolicy", + "description": "Image pull policy.", + "type": "string", + "default": "IfNotPresent", + "enum": [ + "IfNotPresent", + "Always", + "Never" + ] + }, + "tag": { + "title": "Tag", + "description": "Image tag.", + "type": "string", + "default": "0.1.1" + } + } + } + } + } + } +} \ No newline at end of file