diff --git a/plugins/.DS_Store b/plugins/.DS_Store new file mode 100644 index 0000000..24a3967 Binary files /dev/null and b/plugins/.DS_Store differ diff --git a/plugins/tidb-operator/Chart.lock b/plugins/tidb-operator/Chart.lock new file mode 100644 index 0000000..de17946 --- /dev/null +++ b/plugins/tidb-operator/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../common + version: 1.0.0 +digest: sha256:c68e472825af446bb3561dc92bb4659f388e197d7742c12a3e4f93a81506ac41 +generated: "2023-11-02T17:45:50.256664+08:00" diff --git a/plugins/tidb-operator/Chart.yaml b/plugins/tidb-operator/Chart.yaml new file mode 100644 index 0000000..6dceae5 --- /dev/null +++ b/plugins/tidb-operator/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: tidb-operator +dependencies: + - name: common + repository: file://../common + version: 1.x.x +description: 一个tidb-operator的插件 +type: application +version: 1.5.1 +appVersion: 1.5.1 +annotations: + plugins.kubegems.io/is-plugin: "true" + plugins.kubegems.io/install-namespace: tidb-operator + plugins.kubegems.io/category: operator控制器/database diff --git a/plugins/tidb-operator/i18n/values.schema.en.json b/plugins/tidb-operator/i18n/values.schema.en.json new file mode 100755 index 0000000..5f75a09 --- /dev/null +++ b/plugins/tidb-operator/i18n/values.schema.en.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "persistence": { + "type": "object", + "title": "Persistence Storage Configuration", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enable Persistence", + "default": true, + "form": true + }, + "size": { + "type": "string", + "title": "Persistence Storage Size", + "default": "5Gi", + "form": true + } + }, + "form": true + }, + "resources": { + "type": "object", + "title": "tidb-operator Configuration", + "properties": { + "requests": { + "type": "object", + "title": "resources Configuration", + "form": true + } + }, + "form": true + }, + "tidbCluster": { + "type": "object", + "title": "TiDB Cluster Configuration", + "properties": { + "replicaCount": { + "type": "integer", + "title": "TiDB Cluster Replicas", + "default": 3, + "form": true + } + }, + "form": true + } + }, + "$schema": "http://json-schema.org/schema#" +} \ No newline at end of file diff --git a/plugins/tidb-operator/templates/tidb-operator.yaml b/plugins/tidb-operator/templates/tidb-operator.yaml new file mode 100644 index 0000000..fede812 --- /dev/null +++ b/plugins/tidb-operator/templates/tidb-operator.yaml @@ -0,0 +1,22 @@ +apiVersion: plugins.kubegems.io/v1beta1 +kind: Plugin +metadata: + name: tidb-operator + namespace: tidb-operator +spec: + kind: helm + url: https://charts.pingcap.org + chart: tidb-operator + version: "{{ .Chart.AppVersion }}" + values: + namespace: {{ .Release.Namespace }} + tidbCluster: + replicaCount: {{ .Values.tidbCluster.replicaCount }} + tidbVersion: {{ .Values.tidbCluster.tidbVersion }} + resources: + requests: + cpuRequest: {{ .Values.resources.requests.cpuRequest }} + memoryReques: {{ .Values.resources.requests.memoryRequest }} + limits: + cpuLimit: {{ .Values.resources.limits.cpuLimit }} + memoryLimit: {{ .Values.resources.limits.memoryLimit }} diff --git a/plugins/tidb-operator/values.schema.json b/plugins/tidb-operator/values.schema.json new file mode 100755 index 0000000..7fadf19 --- /dev/null +++ b/plugins/tidb-operator/values.schema.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "persistence": { + "type": "object", + "title": "持久化存储配置", + "properties": { + "enabled": { + "type": "boolean", + "title": "是否启用持久化存储", + "default": true, + "form": true + }, + "size": { + "type": "string", + "title": "持久化存储大小", + "default": "5Gi", + "form": true + } + }, + "form": true + }, + "resources": { + "type": "object", + "title": "tidb-operator 配置", + "properties": { + "requests": { + "type": "object", + "title": "资源配置", + "form": true + } + }, + "form": true + }, + "tidbCluster": { + "type": "object", + "title": "TiDB集群配置", + "properties": { + "replicaCount": { + "type": "integer", + "title": "TiDB集群副本数", + "default": 3, + "form": true + } + }, + "form": true + } + }, + "$schema": "http://json-schema.org/schema#" +} \ No newline at end of file diff --git a/plugins/tidb-operator/values.yaml b/plugins/tidb-operator/values.yaml new file mode 100644 index 0000000..9fa68b6 --- /dev/null +++ b/plugins/tidb-operator/values.yaml @@ -0,0 +1,36 @@ +global: + imageRegistry: "" + imageRepository: "" + clusterName: "" + storageClass: "" + runtime: "" +metadata: + name: tidb-operator + namespace: tidb-operator +# @title TiDB集群配置 +# @title.en TiDB Cluster Configuration +tidbCluster: + # @title TiDB集群副本数 + # @title.en TiDB Cluster Replicas + replicaCount: 3 + tidbVersion: v1.5.1 +# @title tidb-operator 配置 +# @title.en tidb-operator Configuration +resources: + # @title 资源配置 + # @title.en resources Configuration + requests: + cpuRequest: 500m + memoryRequest: 2Gi + limits: + cpuLimit: 2 + memoryLimit: 2Gi +# @title 持久化存储配置 +# @title.en Persistence Storage Configuration +persistence: + # @title 是否启用持久化存储 + # @title.en Enable Persistence + enabled: true + # @title 持久化存储大小 + # @title.en Persistence Storage Size + size: 5Gi