diff --git a/Makefile b/Makefile index c89d6b1a..c83aea0a 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ create-namespace: install-%: ifeq ($(origin INSTALLER), undefined) @echo "Choose a deployment method:" - @echo "1. Docker" + @echo "1. Docker/Docker-Compose" @echo "2. Kubernetes/Helm" @echo -n "Enter choice: " @read choice; \ @@ -39,7 +39,7 @@ install: install-datamate uninstall-%: ifeq ($(origin INSTALLER), undefined) @echo "Choose a deployment method:" - @echo "1. Docker" + @echo "1. Docker/Docker-Compose" @echo "2. Kubernetes/Helm" @echo -n "Enter choice: " @read choice; \ @@ -97,52 +97,6 @@ runtime-docker-install: runtime-docker-uninstall: cd deployment/docker/datamate && docker-compose down runtime -.PHONY: runtime-k8s-install -runtime-k8s-install: create-namespace - helm upgrade datamate-kuberay-operator deployment/helm/ray/kuberay-operator --install -n $(NAMESPACE) - helm upgrade datamate-raycluster deployment/helm/ray/ray-cluster/ --install -n $(NAMESPACE) - kubectl apply -f deployment/helm/ray/service.yaml -n $(NAMESPACE) - -.PHONY: runtime-k8s-uninstall -runtime-k8s-uninstall: - helm uninstall datamate-raycluster -n $(NAMESPACE) - helm uninstall datamate-kuberay-operator -n $(NAMESPACE) - kubectl delete -f deployment/helm/ray/service.yaml -n $(NAMESPACE) - -.PHONY: mysql-k8s-install -mysql-k8s-install: create-namespace - kubectl create configmap datamate-init-sql --from-file=scripts/db/ --dry-run=client -o yaml | kubectl apply -f - -n $(NAMESPACE) - kubectl apply -f deployment/kubernetes/mysql/configmap.yaml -n $(NAMESPACE) - kubectl apply -f deployment/kubernetes/mysql/deploy.yaml -n $(NAMESPACE) - -.PHONY: mysql-k8s-uninstall -mysql-k8s-uninstall: - kubectl delete configmap datamate-init-sql -n $(NAMESPACE) --ignore-not-found - kubectl delete -f deployment/kubernetes/mysql/configmap.yaml -n $(NAMESPACE) --ignore-not-found - kubectl delete -f deployment/kubernetes/mysql/deploy.yaml -n $(NAMESPACE) --ignore-not-found - -.PHONY: database-k8s-install -database-k8s-install: mysql-k8s-install - -.PHONY: database-k8s-uninstall -database-k8s-uninstall: mysql-k8s-uninstall - -.PHONY: backend-k8s-install -backend-k8s-install: create-namespace - kubectl apply -f deployment/kubernetes/backend/deploy.yaml -n $(NAMESPACE) - -.PHONY: backend-k8s-uninstall -backend-k8s-uninstall: - kubectl delete -f deployment/kubernetes/backend/deploy.yaml -n $(NAMESPACE) --ignore-not-found - -.PHONY: frontend-k8s-install -frontend-k8s-install: create-namespace - kubectl apply -f deployment/kubernetes/frontend/deploy.yaml -n $(NAMESPACE) - -.PHONY: frontend-k8s-uninstall -frontend-k8s-uninstall: - kubectl delete -f deployment/kubernetes/frontend/deploy.yaml -n $(NAMESPACE) --ignore-not-found - .PHONY: datamate-docker-install datamate-docker-install: cd deployment/docker/datamate && docker-compose up -d @@ -152,7 +106,11 @@ datamate-docker-uninstall: cd deployment/docker/datamate && docker-compose down .PHONY: datamate-k8s-install -datamate-k8s-install: create-namespace database-k8s-install backend-k8s-install frontend-k8s-install runtime-k8s-install +datamate-k8s-install: create-namespace + kubectl create configmap datamate-init-sql --from-file=scripts/db/ --dry-run=client -o yaml | kubectl apply -f - -n $(NAMESPACE) + helm install datamate deployment/helm/datamate/ -n $(NAMESPACE) .PHONY: datamate-k8s-uninstall -datamate-k8s-uninstall: database-k8s-uninstall backend-k8s-uninstall frontend-k8s-uninstall runtime-k8s-uninstall +datamate-k8s-uninstall: + helm uninstall datamate -n $(NAMESPACE) --ignore-not-found + kubectl delete configmap datamate-init-sql -n $(NAMESPACE) --ignore-not-found diff --git a/README-zh.md b/README-zh.md index 4e492a0c..bc71cdf9 100644 --- a/README-zh.md +++ b/README-zh.md @@ -38,6 +38,7 @@ ```bash git clone git@github.com:ModelEngine-Group/DataMate.git +cd DataMate ``` ### 镜像构建 diff --git a/README.md b/README.md index b80be8db..087285d1 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ If you like this project, please give it a Star⭐️! ```bash git clone git@github.com:ModelEngine-Group/DataMate.git +cd DataMate ``` ### Build Images diff --git a/backend/openapi/specs/data-cleaning.yaml b/backend/openapi/specs/data-cleaning.yaml index ff49274d..14852357 100644 --- a/backend/openapi/specs/data-cleaning.yaml +++ b/backend/openapi/specs/data-cleaning.yaml @@ -1,491 +1,1286 @@ -openapi: 3.0.3 +openapi: "3.0.1" info: - title: Data Cleaning Service API - description: 数据清洗服务API - 策略/规则、流程编排对接 - version: 1.0.0 - contact: - name: Data Mate Platform Team - -servers: - - url: http://localhost:8084 - description: Development server - -tags: - - name: CleaningTask - description: 数据清洗任务管理 - - name: CleaningTemplate - description: 数据清洗模板管理 - + title: "API Documentation" + version: "1.0" paths: - /ray/log: - get: - summary: 获取ray日志文件 - deprecated: false - description: '' - tags: [ ] - parameters: [ ] - responses: - '200': - description: '' - content: - application/json: - schema: - type: object - properties: { } - headers: { } - security: [ ] - /cleaning/tasks: + /cleaning/templates: get: - summary: 查询数据清洗任务列表 - deprecated: false - description: 获取所有数据清洗任务或根据查询参数筛选任务。 - tags: - - CleaningTask + summary: "cleaningTemplatesGet" + description: "cleaningTemplatesGet" parameters: - - name: status - in: query - description: 根据任务状态筛选 (e.g., pending, running, completed, failed) - required: false - schema: - type: string - - name: keywords - in: query - description: 关键字 - required: false - schema: - type: string - - name: page - in: query - description: 分页数 - required: true - schema: - type: integer - - name: size - in: query - description: 分页单页数 - required: true - schema: - type: integer + - name: "page" + in: "query" + description: "" + required: false + schema: + type: "integer" + nullable: false + - name: "size" + in: "query" + description: "" + required: false + schema: + type: "integer" + nullable: false + - name: "keywords" + in: "query" + description: "" + required: false + schema: + type: "string" + nullable: false responses: - '200': - description: 成功获取任务列表 + "200": + description: "" content: application/json: schema: - type: array - items: &ref_1 - $ref: '#/components/schemas/CleaningTask' - headers: { } - security: [ ] + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + page: + type: "integer" + description: "" + format: "int64" + size: + type: "integer" + description: "" + format: "int64" + totalElements: + type: "integer" + description: "" + format: "int64" + totalPages: + type: "integer" + description: "" + format: "int64" + content: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + instance: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "OperatorResponse" + default: "new ArrayList<>()" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "CleaningTemplate" + description: "数据" post: - summary: 创建新的数据清洗任务 - deprecated: false - description: 可以直接创建任务或基于现有模板创建任务。 - tags: - - CleaningTask - parameters: [ ] + summary: "cleaningTemplatesPost" + description: "cleaningTemplatesPost" requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateCleaningTaskRequest' - examples: { } + type: "object" + properties: + name: + type: "string" + description: "" + description: + type: "string" + description: "" + instance: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + overrides: + type: "object" + properties: + key: + type: "object" + properties: {} + description: "" + default: "new HashMap<>()" + description: "OperatorInstance" + default: "new ArrayList<>()" + description: "" responses: - '201': - description: 任务创建成功 + "200": + description: "" content: application/json: - schema: *ref_1 - headers: { } - security: [ ] - /cleaning/tasks/{taskId}: + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + instance: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "OperatorResponse" + default: "new ArrayList<>()" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "数据" + /cleaning/templates/{templateId}: get: - summary: 获取单个数据清洗任务详情 - deprecated: false - description: 根据任务ID获取任务的详细信息。 - tags: - - CleaningTask + summary: "cleaningTemplatesTemplateIdGet" + description: "cleaningTemplatesTemplateIdGet" parameters: - - name: taskId - in: path - description: 任务的唯一标识符 - required: true - example: '' - schema: - type: string + - name: "templateId" + in: "path" + description: "" + required: true + schema: + type: "string" + responses: + "200": + description: "" + content: + application/json: + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + instance: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "OperatorResponse" + default: "new ArrayList<>()" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "数据" + put: + summary: "cleaningTemplatesTemplateIdPut" + description: "cleaningTemplatesTemplateIdPut" + parameters: + - name: "templateId" + in: "path" + description: "" + required: true + schema: + type: "string" + requestBody: + content: + application/json: + schema: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + instance: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + overrides: + type: "object" + properties: + key: + type: "object" + properties: {} + description: "" + default: "new HashMap<>()" + description: "OperatorInstance" + default: "new ArrayList<>()" + description: "" responses: - '200': - description: 成功获取任务详情 + "200": + description: "" content: application/json: - schema: *ref_1 - headers: { } - security: [ ] + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + instance: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "OperatorResponse" + default: "new ArrayList<>()" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "数据" delete: - summary: 删除数据清洗任务 - deprecated: false - description: 根据任务ID删除指定的任务。 - tags: - - CleaningTask + summary: "cleaningTemplatesTemplateIdDelete" + description: "cleaningTemplatesTemplateIdDelete" parameters: - - name: taskId - in: path - description: 任务的唯一标识符 - required: true - example: '' - schema: - type: string + - name: "templateId" + in: "path" + description: "" + required: true + schema: + type: "string" responses: - '204': - description: 任务删除成功 - headers: { } - security: [ ] - /cleaning/templates: + "200": + description: "" + content: + application/json: + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: {} + description: "数据" + /cleaning/tasks: get: - summary: 查询数据清洗模板列表 - deprecated: false - description: 获取所有可用的数据清洗模板。 - tags: - - CleaningTemplate - parameters: [ ] + summary: "cleaningTasksGet" + description: "cleaningTasksGet" + parameters: + - name: "page" + in: "query" + description: "" + required: true + schema: + type: "integer" + nullable: false + - name: "size" + in: "query" + description: "" + required: true + schema: + type: "integer" + nullable: false + - name: "status" + in: "query" + description: "" + required: false + schema: + type: "string" + nullable: false + - name: "keywords" + in: "query" + description: "" + required: false + schema: + type: "string" + nullable: false responses: - '200': - description: 成功获取模板列表 + "200": + description: "" content: application/json: schema: - type: array - items: &ref_2 - $ref: '#/components/schemas/CleaningTemplate' - headers: { } - security: [ ] + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + page: + type: "integer" + description: "" + format: "int64" + size: + type: "integer" + description: "" + format: "int64" + totalElements: + type: "integer" + description: "" + format: "int64" + totalPages: + type: "integer" + description: "" + format: "int64" + content: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + srcDatasetId: + type: "string" + description: "" + srcDatasetName: + type: "string" + description: "" + destDatasetId: + type: "string" + description: "" + destDatasetName: + type: "string" + description: "" + beforeSize: + type: "integer" + description: "" + format: "int64" + afterSize: + type: "integer" + description: "" + format: "int64" + fileCount: + type: "integer" + description: "" + status: + type: "string" + description: "{PENDING=PENDING, RUNNING=RUNNING, COMPLETED=COMPLETED,\ + \ STOPPED=STOPPED, FAILED=FAILED}" + enum: + - "PENDING" + - "RUNNING" + - "COMPLETED" + - "STOPPED" + - "FAILED" + templateId: + type: "string" + description: "" + instance: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "OperatorResponse" + progress: + type: "object" + properties: + process: + type: "number" + description: "" + totalFileNum: + type: "integer" + description: "" + finishedFileNum: + type: "integer" + description: "" + description: "" + createdAt: + type: "string" + description: "" + startedAt: + type: "string" + description: "" + finishedAt: + type: "string" + description: "" + description: "CleaningTask" + description: "数据" post: - summary: 创建新的数据清洗模板 - deprecated: false - description: 定义一个新的数据清洗模板。 - tags: - - CleaningTemplate - parameters: [ ] + summary: "cleaningTasksPost" + description: "cleaningTasksPost" requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateCleaningTemplateRequest' + type: "object" + properties: + name: + type: "string" + description: "" + description: + type: "string" + description: "" + srcDatasetId: + type: "string" + description: "" + srcDatasetName: + type: "string" + description: "" + destDatasetName: + type: "string" + description: "" + destDatasetType: + type: "string" + description: "" + instance: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + overrides: + type: "object" + properties: + key: + type: "object" + properties: {} + description: "" + default: "new HashMap<>()" + description: "OperatorInstance" + default: "new ArrayList<>()" + description: "" responses: - '201': - description: 模板创建成功 + "200": + description: "" content: application/json: - schema: *ref_2 - headers: { } - security: [ ] - /cleaning/templates/{templateId}: - get: - summary: 获取单个数据清洗模板详情 - deprecated: false - description: 根据模板ID获取模板的详细信息。 - tags: - - CleaningTemplate + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + srcDatasetId: + type: "string" + description: "" + srcDatasetName: + type: "string" + description: "" + destDatasetId: + type: "string" + description: "" + destDatasetName: + type: "string" + description: "" + beforeSize: + type: "integer" + description: "" + format: "int64" + afterSize: + type: "integer" + description: "" + format: "int64" + fileCount: + type: "integer" + description: "" + status: + type: "string" + description: "{PENDING=PENDING, RUNNING=RUNNING, COMPLETED=COMPLETED,\ + \ STOPPED=STOPPED, FAILED=FAILED}" + enum: + - "PENDING" + - "RUNNING" + - "COMPLETED" + - "STOPPED" + - "FAILED" + templateId: + type: "string" + description: "" + instance: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "OperatorResponse" + progress: + type: "object" + properties: + process: + type: "number" + description: "" + totalFileNum: + type: "integer" + description: "" + finishedFileNum: + type: "integer" + description: "" + description: "" + createdAt: + type: "string" + description: "" + startedAt: + type: "string" + description: "" + finishedAt: + type: "string" + description: "" + description: "数据" + /cleaning/tasks/{taskId}/stop: + post: + summary: "cleaningTasksStop" + description: "cleaningTasksStop" parameters: - - name: templateId - in: path - description: 模板的唯一标识符 - required: true - example: '' - schema: - type: string + - name: "taskId" + in: "path" + description: "" + required: true + schema: + type: "string" responses: - '200': - description: 成功获取模板详情 + "200": + description: "" content: application/json: - schema: *ref_2 - headers: { } - security: [ ] - put: - summary: 更新数据清洗模板 - deprecated: false - description: 根据模板ID更新模板的全部信息。 - tags: - - CleaningTemplate + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: {} + description: "数据" + /cleaning/tasks/{taskId}/execute: + post: + summary: "cleaningTasksStart" + description: "cleaningTasksStart" parameters: - - name: templateId - in: path - description: 模板的唯一标识符 - required: true - example: '' - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateCleaningTemplateRequest' + - name: "taskId" + in: "path" + description: "" + required: true + schema: + type: "string" + responses: + "200": + description: "" + content: + application/json: + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: {} + description: "数据" + /cleaning/tasks/{taskId}: + get: + summary: "cleaningTasksTaskIdGet" + description: "cleaningTasksTaskIdGet" + parameters: + - name: "taskId" + in: "path" + description: "" + required: true + schema: + type: "string" responses: - '200': - description: 模板更新成功 + "200": + description: "" content: application/json: - schema: *ref_2 - headers: { } - security: [ ] + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + srcDatasetId: + type: "string" + description: "" + srcDatasetName: + type: "string" + description: "" + destDatasetId: + type: "string" + description: "" + destDatasetName: + type: "string" + description: "" + beforeSize: + type: "integer" + description: "" + format: "int64" + afterSize: + type: "integer" + description: "" + format: "int64" + fileCount: + type: "integer" + description: "" + status: + type: "string" + description: "{PENDING=PENDING, RUNNING=RUNNING, COMPLETED=COMPLETED,\ + \ STOPPED=STOPPED, FAILED=FAILED}" + enum: + - "PENDING" + - "RUNNING" + - "COMPLETED" + - "STOPPED" + - "FAILED" + templateId: + type: "string" + description: "" + instance: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "OperatorResponse" + progress: + type: "object" + properties: + process: + type: "number" + description: "" + totalFileNum: + type: "integer" + description: "" + finishedFileNum: + type: "integer" + description: "" + description: "" + createdAt: + type: "string" + description: "" + startedAt: + type: "string" + description: "" + finishedAt: + type: "string" + description: "" + description: "数据" delete: - summary: 删除数据清洗模板 - deprecated: false - description: 根据模板ID删除指定的模板。 - tags: - - CleaningTemplate + summary: "cleaningTasksTaskIdDelete" + description: "cleaningTasksTaskIdDelete" parameters: - - name: templateId - in: path - description: 模板的唯一标识符 - required: true - example: '' - schema: - type: string + - name: "taskId" + in: "path" + description: "" + required: true + schema: + type: "string" responses: - '204': - description: 模板删除成功 - headers: { } - security: [ ] - + "200": + description: "" + content: + application/json: + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: {} + description: "数据" components: schemas: - OperatorInstance: - type: object - properties: - id: - type: string - overrides: - type: object - properties: { } - additionalProperties: - type: object - properties: { } - required: - - id - - overrides - CleaningProcess: - type: object - properties: - process: - type: number - format: float - description: 进度百分比 - totalFileNum: - type: integer - description: 总文件数量 - finishedFileNum: - type: integer - description: 已完成文件数量 - required: - - process - - totalFileNum - - finishedFileNum OperatorResponse: - type: object + type: "object" properties: id: - type: string - description: 算子ID + type: "string" + description: "" name: - type: string - description: 算子名称 + type: "string" + description: "" description: - type: string - description: 算子描述 + type: "string" + description: "" version: - type: string - description: 算子版本 + type: "string" + description: "" inputs: - type: string - description: 输入类型 + type: "string" + description: "" outputs: - type: string - description: 输入类型 + type: "string" + description: "" runtime: - type: string - description: 运行时设置 + type: "string" + description: "" settings: - type: string - description: 算子参数 + type: "string" + description: "" isStar: - type: boolean - description: 是否收藏 + type: "boolean" + description: "" createdAt: - type: string - format: date-time - description: 创建时间 + type: "string" + description: "" updatedAt: - type: string - format: date-time - description: 更新时间 - required: - - inputs - - outputs - - runtime - - settings - - isStar - UpdateCleaningTemplateRequest: - type: object - required: - - name - - instance - - id - properties: - id: - type: string - name: - type: string - description: 模板名称 - description: - type: string - description: 模板描述 - instance: - type: array - items: &ref_3 - $ref: '#/components/schemas/OperatorInstance' - description: 模板定义的清洗规则和配置 - CreateCleaningTemplateRequest: - type: object - required: - - name - - instance - properties: - name: - type: string - description: 模板名称 - description: - type: string - description: 模板描述 - instance: - type: array - items: *ref_3 - description: 任务的具体配置(如果非模板创建,则直接定义)' + type: "string" + description: "" + description: "OperatorResponse" CleaningTemplate: - type: object - required: - - id - - name - - instance - - createdAt + type: "object" properties: id: - type: string - description: 模板唯一标识符 + type: "string" + description: "" name: - type: string - description: 模板名称 + type: "string" + description: "" description: - type: string - description: 模板描述 + type: "string" + description: "" instance: - type: array - items: &ref_4 - $ref: '#/components/schemas/OperatorResponse' - description: 模板定义的清洗规则和配置 + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "OperatorResponse" + default: "new ArrayList<>()" createdAt: - type: string - format: date-time - description: 模板创建时间 + type: "string" + description: "" updatedAt: - type: string - format: date-time - description: 模板最后更新时间 - CreateCleaningTaskRequest: - type: object - required: - - name - - instance - - srcDatasetId - - srcDatasetName - - destDatasetName - - destDatasetType + type: "string" + description: "" + description: "数据" + OperatorInstance: + type: "object" properties: - name: - type: string - description: 任务名称 - description: - type: string - description: 任务描述 - srcDatasetId: - type: string - srcDatasetName: - type: string - destDatasetName: - type: string - destDatasetType: - type: string - instance: - type: array - items: *ref_3 - description: 任务的具体配置(如果非模板创建,则直接定义) - ErrorResponse: - type: object + id: + type: "string" + description: "" + overrides: + type: "object" + properties: + key: + type: "object" + properties: {} + description: "" + default: "new HashMap<>()" + description: "OperatorInstance" + java.lang.Object: + type: "object" + properties: {} + description: "数据" + CleaningProcess: + type: "object" properties: - error: - type: string - description: 错误类型 - message: - type: string - description: 错误详细信息 + process: + type: "number" + description: "" + totalFileNum: + type: "integer" + description: "" + finishedFileNum: + type: "integer" + description: "" + description: "" CleaningTask: - type: object - required: - - id - - name - - status - - createdAt - - startedAt + type: "object" properties: id: - type: string - description: 任务唯一标识符 + type: "string" + description: "" name: - type: string - description: 任务名称 + type: "string" + description: "" description: - type: string - description: 任务描述 + type: "string" + description: "" srcDatasetId: - type: string - description: 源数据集id + type: "string" + description: "" srcDatasetName: - type: string - description: 源数据集名称 + type: "string" + description: "" destDatasetId: - type: string - description: 目标数据集id + type: "string" + description: "" destDatasetName: - type: string - description: 目标数据集名称 + type: "string" + description: "" + beforeSize: + type: "integer" + description: "" + format: "int64" + afterSize: + type: "integer" + description: "" + format: "int64" + fileCount: + type: "integer" + description: "" status: - type: string - description: 任务当前状态 + type: "string" + description: "{PENDING=PENDING, RUNNING=RUNNING, COMPLETED=COMPLETED, STOPPED=STOPPED,\ + \ FAILED=FAILED}" enum: - - pending - - running - - completed - - failed + - "PENDING" + - "RUNNING" + - "COMPLETED" + - "STOPPED" + - "FAILED" templateId: - type: string - description: 关联的模板ID(如果基于模板创建) + type: "string" + description: "" instance: - type: array - items: *ref_4 - description: 任务的具体配置(如果非模板创建,则直接定义) + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "OperatorResponse" progress: - $ref: '#/components/schemas/CleaningProcess' + type: "object" + properties: + process: + type: "number" + description: "" + totalFileNum: + type: "integer" + description: "" + finishedFileNum: + type: "integer" + description: "" + description: "" createdAt: - type: string - description: 任务创建时间 - format: date-time + type: "string" + description: "" startedAt: - type: string - format: date-time - description: 任务开始时间 + type: "string" + description: "" finishedAt: - type: string - format: date-time - description: 任务最后更新时间 - securitySchemes: { } + type: "string" + description: "" + description: "数据" diff --git a/backend/openapi/specs/operator-market.yaml b/backend/openapi/specs/operator-market.yaml index 8a6c172e..44d353e6 100644 --- a/backend/openapi/specs/operator-market.yaml +++ b/backend/openapi/specs/operator-market.yaml @@ -1,547 +1,812 @@ -openapi: 3.0.1 +openapi: "3.0.1" info: - title: Operator Market Service API - description: | - 算子市场服务API,提供算子的发布、管理和订阅功能。 - - 主要功能: - - 算子发布和管理 - - 算子版本控制 - - 算子评分和评论 - - 算子分类和标签 - - 算子下载和安装 - version: 1.0.0 -tags: - - name: Operator - - name: Category - - name: Label + title: "API Documentation" + version: "1.0" paths: /operators/list: post: - summary: 获取算子列表 - deprecated: false - description: 分页查询算子列表,支持按分类、标签等条件筛选 - tags: - - Operator - parameters: [] + summary: "operatorsListPost" + description: "operatorsListPost" requestBody: content: application/json: schema: - type: object + type: "object" properties: page: - type: integer - description: 页数 + type: "integer" + description: "" size: - type: integer - description: 单页数量 + type: "integer" + description: "" categories: - type: array + type: "array" + description: "" items: - type: integer - description: 分类id列表 + type: "integer" + default: "new ArrayList<>()" operatorName: - type: string - description: 算子名称 + type: "string" + description: "" labelName: - type: string - description: 标签名称 + type: "string" + description: "" isStar: - type: boolean - description: 是否收藏 - required: - - page - - size - - categories - examples: {} + type: "boolean" + description: "" + description: "" responses: - '200': - description: 成功返回算子列表 + "200": + description: "" content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/OperatorResponse' - headers: {} - security: [] - /operators/create: - post: - summary: 创建新算子 - deprecated: false - description: 创建并发布一个新的算子 - tags: - - Operator - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateOperatorRequest' - example: null - responses: - '201': - description: 算子创建成功 - content: - application/json: - schema: &ref_0 - $ref: '#/components/schemas/OperatorResponse' - headers: {} - security: [] - /operators/upload: - post: - summary: 上传新算子 - deprecated: false - description: 创建并发布一个新的算子 - tags: - - Operator - parameters: [] - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary - example: '' - description: - type: string - example: '' - examples: {} - responses: - '201': - description: 算子创建成功 - content: - application/json: - schema: *ref_0 - headers: {} - security: [] + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + page: + type: "integer" + description: "" + format: "int64" + size: + type: "integer" + description: "" + format: "int64" + totalElements: + type: "integer" + description: "" + format: "int64" + totalPages: + type: "integer" + description: "" + format: "int64" + content: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + categories: + type: "array" + description: "" + items: + type: "integer" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "OperatorResponse" + description: "数据" /operators/{id}: get: - summary: 获取算子详情 - deprecated: false - description: 根据ID获取算子的详细信息 - tags: - - Operator + summary: "operatorsIdGet" + description: "operatorsIdGet" parameters: - - name: id - in: path - description: 算子ID + - name: "id" + in: "path" + description: "" required: true - example: '' schema: - type: string + type: "string" responses: - '200': - description: 成功返回算子详情 - content: - application/json: - schema: *ref_0 - headers: {} - '404': - description: 算子不存在 + "200": + description: "" content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - headers: {} - security: [] + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + categories: + type: "array" + description: "" + items: + type: "integer" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "数据" put: - summary: 更新算子信息 - deprecated: false - description: 根据ID更新算子信息 - tags: - - Operator + summary: "operatorsIdPut" + description: "operatorsIdPut" parameters: - - name: id - in: path - description: 算子ID + - name: "id" + in: "path" + description: "" required: true - example: '' schema: - type: string + type: "string" requestBody: content: application/json: schema: - $ref: '#/components/schemas/UpdateOperatorRequest' - example: null + type: "object" + properties: + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + categories: + type: "array" + description: "" + items: + type: "integer" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + description: "" responses: - '200': - description: 算子更新成功 + "200": + description: "" content: application/json: - schema: *ref_0 - headers: {} - security: [] - /category: + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + categories: + type: "array" + description: "" + items: + type: "integer" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "数据" + /operators/create: post: - summary: 创建算子分类 - deprecated: false - description: '' - tags: - - Category - parameters: [] + summary: "operatorsCreatePost" + description: "operatorsCreatePost" requestBody: content: application/json: schema: - type: object + type: "object" properties: + id: + type: "string" + description: "" name: - type: string - description: 名称 - parentId: - type: integer - description: 父分类id - required: - - name - - parentId + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + categories: + type: "array" + description: "" + items: + type: "integer" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + fileName: + type: "string" + description: "" + description: "" responses: - '201': - description: '' - headers: {} - security: [] - delete: - summary: 删除算子分类 - deprecated: false - description: '' - tags: - - Category - parameters: [] + "200": + description: "" + content: + application/json: + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + categories: + type: "array" + description: "" + items: + type: "integer" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "数据" + /operators/upload: + post: + summary: "operatorsUploadPost" + description: "operatorsUploadPost" + parameters: + - name: "description" + in: "query" + description: "" + required: true + schema: + type: "string" + nullable: false requestBody: content: - application/json: + multipart/form-data: schema: - type: object - properties: - id: - type: integer - description: ID 编号 required: - - id - responses: - '204': - description: '' - headers: {} - security: [] - /categories/tree: - get: - summary: 获取算子分类列表 - deprecated: false - description: 获取所有可用的算子分类 - tags: - - Category - parameters: [] + - "file" + type: "object" + properties: + file: + type: "string" + description: "" + format: "binary" + required: true responses: - '200': - description: 成功返回分类列表 + "200": + description: "" content: application/json: schema: - type: array - items: - type: object - properties: - id: - type: integer - name: - type: string - count: - type: integer - categories: - $ref: '#/components/schemas/CategoryResponse' - required: - - id - - name - - count - - categories - headers: {} - security: [] + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: + type: "string" + description: "" + version: + type: "string" + description: "" + inputs: + type: "string" + description: "" + outputs: + type: "string" + description: "" + categories: + type: "array" + description: "" + items: + type: "integer" + runtime: + type: "string" + description: "" + settings: + type: "string" + description: "" + isStar: + type: "boolean" + description: "" + createdAt: + type: "string" + description: "" + updatedAt: + type: "string" + description: "" + description: "数据" /labels: get: - summary: 获取算子标签列表 - deprecated: false - description: 获取所有算子的标签 - tags: - - Label + summary: "labelsGet" + description: "labelsGet" parameters: - - name: page - in: query - description: 页码,从0开始 - required: false + - name: "page" + in: "query" + description: "" + required: true schema: - type: integer - default: 0 - - name: size - in: query - description: 每页大小 - required: false + type: "integer" + nullable: false + - name: "size" + in: "query" + description: "" + required: true schema: - type: integer - default: 20 - - name: keyword - in: query - description: 关键词搜索 - required: false + type: "integer" + nullable: false + - name: "keyword" + in: "query" + description: "" + required: true schema: - type: string + type: "string" + nullable: false responses: - '200': - description: 成功返回标签列表 + "200": + description: "" content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/LabelResponse' - headers: {} - security: [] + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + page: + type: "integer" + description: "" + format: "int64" + size: + type: "integer" + description: "" + format: "int64" + totalElements: + type: "integer" + description: "" + format: "int64" + totalPages: + type: "integer" + description: "" + format: "int64" + content: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" + description: "com.datamate.operator.interfaces.dto.Label" + description: "数据" post: - summary: 创建标签 - deprecated: false - description: 批量创建标签 - tags: - - Label - parameters: [] + summary: "labelsPost" + description: "labelsPost" requestBody: content: application/json: schema: - type: object + type: "object" properties: + id: + type: "string" + description: "" name: - type: string - description: 名称 - required: - - name - example: veniam - responses: - '201': - description: 创建成功 - headers: {} - security: [] - delete: - summary: 删除标签 - deprecated: false - description: 批量删除标签 - tags: - - Label - parameters: [] - requestBody: - content: - application/json: - schema: - type: array - items: - type: integer - format: int64 - description: 标签id列表 - example: null + type: "string" + description: "" + description: "" responses: - '204': - description: 删除成功 - headers: {} - security: [] + "200": + description: "" + content: + application/json: + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: {} + description: "数据" /labels/{id}: put: - summary: 更新标签 - deprecated: false - description: 更新标签 - tags: - - Label + summary: "labelsIdPut" + description: "labelsIdPut" parameters: - - name: id - in: path - description: 标签ID + - name: "id" + in: "path" + description: "" required: true - example: '' schema: - type: string + type: "string" requestBody: content: application/json: schema: - type: array + type: "array" + description: "" items: - $ref: '#/components/schemas/UpdateLabelRequest' - example: null + type: "object" + properties: + id: + type: "string" + description: "" + name: + type: "string" + description: "" responses: - '200': - description: 更新成功 - headers: {} - security: [] + "200": + description: "" + content: + application/json: + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: {} + description: "数据" + /categories/tree: + get: + summary: "categoryTreeGet" + description: "categoryTreeGet" + responses: + "200": + description: "" + content: + application/json: + schema: + type: "object" + properties: + code: + type: "string" + description: "状态码" + message: + type: "string" + description: "消息" + data: + type: "object" + properties: + page: + type: "integer" + description: "" + format: "int64" + size: + type: "integer" + description: "" + format: "int64" + totalElements: + type: "integer" + description: "" + format: "int64" + totalPages: + type: "integer" + description: "" + format: "int64" + content: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "integer" + description: "" + name: + type: "string" + description: "" + count: + type: "integer" + description: "" + categories: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "integer" + description: "" + format: "int64" + name: + type: "string" + description: "" + count: + type: "integer" + description: "" + format: "int64" + type: + type: "string" + description: "" + parentId: + type: "integer" + description: "" + format: "int64" + description: "com.datamate.operator.interfaces.dto.SubCategory" + default: "new ArrayList<>()" + description: "com.datamate.operator.interfaces.dto.CategoryTreeResponse" + description: "数据" components: schemas: - UpdateLabelRequest: - type: object - required: - - id - - name - properties: - id: - type: integer - description: 标签id - name: - type: string - description: 标签名称 - Response: - type: object - properties: - code: - type: string - message: - type: string - data: - type: object - properties: {} - required: - - code - - message - - data - LabelResponse: - type: object - properties: - id: - type: string - description: 标签ID - name: - type: string - description: 标签名称 - SubCategory: - type: object - properties: - id: - type: integer - description: 分类id - name: - type: string - description: 分类名称 - count: - type: integer - type: - type: string - description: 分类类型(0:预置,1:自定义) - parentId: - type: integer - description: 父分类id - required: - - id - - name - - type - - parentId - - count - CategoryResponse: - type: array - items: - $ref: '#/components/schemas/SubCategory' - UpdateOperatorRequest: - type: object - properties: - name: - type: string - description: 算子名称 - description: - type: string - description: 算子描述 - version: - type: string - description: 算子版本 - category: - type: string - description: 算子分类 - documentation: - type: string - description: 文档内容 - ErrorResponse: - type: object - properties: - error: - type: string - description: 错误代码 - message: - type: string - description: 错误信息 - timestamp: - type: string - format: date-time - description: 错误时间 OperatorResponse: - type: object + type: "object" properties: id: - type: string - description: 算子ID + type: "string" + description: "" name: - type: string - description: 算子名称 + type: "string" + description: "" description: - type: string - description: 算子描述 + type: "string" + description: "" version: - type: string - description: 算子版本 + type: "string" + description: "" inputs: - type: string - description: 输入类型 + type: "string" + description: "" outputs: - type: string - description: 输入类型 + type: "string" + description: "" categories: - type: array - description: 算子分类列表 + type: "array" + description: "" items: - type: integer + type: "integer" runtime: - type: string - description: 运行时设置 + type: "string" + description: "" settings: - type: string - description: 算子参数 + type: "string" + description: "" isStar: - type: boolean - description: 是否收藏 + type: "boolean" + description: "" createdAt: - type: string - format: date-time - description: 创建时间 + type: "string" + description: "" updatedAt: - type: string - format: date-time - description: 更新时间 - required: - - language - - modal - - inputs - - outputs - - runtime - - settings - - isStar - CreateOperatorRequest: - type: object - required: - - name - - description - - version - - category + type: "string" + description: "" + description: "数据" + com.datamate.operator.interfaces.dto.Label: + type: "object" properties: + id: + type: "string" + description: "" name: - type: string - description: 算子名称 - description: - type: string - description: 算子描述 - version: - type: string - description: 算子版本 - category: - type: string - description: 算子分类 - documentation: - type: string - description: 文档内容 - securitySchemes: {} -servers: [] + type: "string" + description: "" + description: "com.datamate.operator.interfaces.dto.Label" + java.lang.Object: + type: "object" + properties: {} + description: "数据" + com.datamate.operator.interfaces.dto.SubCategory: + type: "object" + properties: + id: + type: "integer" + description: "" + format: "int64" + name: + type: "string" + description: "" + count: + type: "integer" + description: "" + format: "int64" + type: + type: "string" + description: "" + parentId: + type: "integer" + description: "" + format: "int64" + description: "com.datamate.operator.interfaces.dto.SubCategory" + com.datamate.operator.interfaces.dto.CategoryTreeResponse: + type: "object" + properties: + id: + type: "integer" + description: "" + name: + type: "string" + description: "" + count: + type: "integer" + description: "" + categories: + type: "array" + description: "" + items: + type: "object" + properties: + id: + type: "integer" + description: "" + format: "int64" + name: + type: "string" + description: "" + count: + type: "integer" + description: "" + format: "int64" + type: + type: "string" + description: "" + parentId: + type: "integer" + description: "" + format: "int64" + description: "com.datamate.operator.interfaces.dto.SubCategory" + default: "new ArrayList<>()" + description: "com.datamate.operator.interfaces.dto.CategoryTreeResponse" diff --git a/backend/services/data-cleaning-service/img.png b/backend/services/data-cleaning-service/img.png deleted file mode 100644 index cee23b96..00000000 Binary files a/backend/services/data-cleaning-service/img.png and /dev/null differ diff --git a/backend/services/data-cleaning-service/img1.png b/backend/services/data-cleaning-service/img1.png deleted file mode 100644 index 8a388c38..00000000 Binary files a/backend/services/data-cleaning-service/img1.png and /dev/null differ diff --git a/backend/services/data-cleaning-service/img2.png b/backend/services/data-cleaning-service/img2.png deleted file mode 100644 index 1f8aeb11..00000000 Binary files a/backend/services/data-cleaning-service/img2.png and /dev/null differ diff --git a/backend/services/operator-market-service/img.png b/backend/services/operator-market-service/img.png deleted file mode 100644 index a8ec1f26..00000000 Binary files a/backend/services/operator-market-service/img.png and /dev/null differ diff --git a/backend/services/operator-market-service/img_1.png b/backend/services/operator-market-service/img_1.png deleted file mode 100644 index ed40d49b..00000000 Binary files a/backend/services/operator-market-service/img_1.png and /dev/null differ diff --git a/deployment/helm/datamate/.helmignore b/deployment/helm/datamate/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/deployment/helm/datamate/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/deployment/helm/datamate/Chart.yaml b/deployment/helm/datamate/Chart.yaml new file mode 100644 index 00000000..63455f2f --- /dev/null +++ b/deployment/helm/datamate/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: datamate +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.0.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "0.0.1" diff --git a/deployment/helm/datamate/charts/backend/.helmignore b/deployment/helm/datamate/charts/backend/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/deployment/helm/datamate/charts/backend/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/deployment/helm/datamate/charts/backend/Chart.yaml b/deployment/helm/datamate/charts/backend/Chart.yaml new file mode 100644 index 00000000..3ee0b4e4 --- /dev/null +++ b/deployment/helm/datamate/charts/backend/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: backend +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.0.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "0.0.1" + +dependencies: + - name: database + repository: file://../database + version: 0.0.1 diff --git a/deployment/helm/datamate/charts/backend/templates/_helpers.tpl b/deployment/helm/datamate/charts/backend/templates/_helpers.tpl new file mode 100644 index 00000000..29d49ada --- /dev/null +++ b/deployment/helm/datamate/charts/backend/templates/_helpers.tpl @@ -0,0 +1,75 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "backend.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "backend.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "backend.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "backend.labels" -}} +helm.sh/chart: {{ include "backend.chart" . }} +{{ include "backend.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "backend.selectorLabels" -}} +app.kubernetes.io/name: {{ include "backend.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "backend.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "backend.fullname" .) .Values.serviceAccount.name -}} +{{- else }} +{{- default "default" .Values.serviceAccount.name -}} +{{- end }} +{{- end }} + +{{/* +Name of image +*/}} +{{- define "backend.image" -}} +{{- $name := default .Values.image.repository .Values.global.image.backend.name }} +{{- $tag := default .Values.image.tag .Values.global.image.backend.tag }} +{{- if .Values.global.image.repository }} +{{- .Values.global.image.repository | trimSuffix "/" }}/{{ $name }}:{{ $tag }} +{{- else }} +{{- $name }}:{{ $tag }} +{{- end }} +{{- end }} diff --git a/deployment/helm/datamate/charts/backend/templates/deployment.yaml b/deployment/helm/datamate/charts/backend/templates/deployment.yaml new file mode 100644 index 00000000..3d12f052 --- /dev/null +++ b/deployment/helm/datamate/charts/backend/templates/deployment.yaml @@ -0,0 +1,82 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "backend.fullname" . }} + labels: + {{- include "backend.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "backend.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "backend.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "backend.serviceAccountName" . }} + {{- with .Values.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{- with .Values.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + image: "{{ include "backend.image" . }}" + imagePullPolicy: {{ default .Values.global.image.pullPolicy .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + {{- with .Values.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.env }} + env: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/deployment/helm/datamate/charts/backend/templates/service.yaml b/deployment/helm/datamate/charts/backend/templates/service.yaml new file mode 100644 index 00000000..4477c220 --- /dev/null +++ b/deployment/helm/datamate/charts/backend/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "backend.fullname" . }} + labels: + {{- include "backend.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.service.port }} + protocol: TCP + name: {{ .Chart.Name }} + selector: + {{- include "backend.selectorLabels" . | nindent 4 }} diff --git a/deployment/helm/datamate/charts/backend/templates/serviceaccount.yaml b/deployment/helm/datamate/charts/backend/templates/serviceaccount.yaml new file mode 100644 index 00000000..0977e163 --- /dev/null +++ b/deployment/helm/datamate/charts/backend/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "backend.serviceAccountName" . }} + labels: + {{- include "backend.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/deployment/helm/datamate/charts/backend/values.yaml b/deployment/helm/datamate/charts/backend/values.yaml new file mode 100644 index 00000000..cf429545 --- /dev/null +++ b/deployment/helm/datamate/charts/backend/values.yaml @@ -0,0 +1,114 @@ +# Default values for datamate. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ +replicaCount: 1 + +# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ +image: + repository: "datamate-backend" + # This sets the pull policy for images. + pullPolicy: "IfNotPresent" + # Overrides the image tag whose default is the chart appVersion. + tag: "latest" + +# This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ +imagePullSecrets: [] +# This is to override the chart name. +nameOverride: "datamate-backend" +fullnameOverride: "datamate-backend" + +env: + - name: namespace + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: SPRING_CONFIG_LOCATION + value: file:/opt/backend/application.yml + +# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +# This is for setting Kubernetes Annotations to a Pod. +# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +podAnnotations: {} +# This is for setting Kubernetes Labels to a Pod. +# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +podLabels: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ +service: + # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + type: ClusterIP + # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports + port: 8080 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ +# livenessProbe: +# httpGet: +# path: / +# port: http +# readinessProbe: +# httpGet: +# path: / +# port: http + +# This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +# Additional volumes on the output Deployment definition. +volumes: [] +# - name: foo +# secret: +# secretName: mysecret +# optional: false + +# Additional volumeMounts on the output Deployment definition. +volumeMounts: [] +# - name: foo +# mountPath: "/etc/foo" +# readOnly: true + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/deployment/helm/datamate/charts/database/.helmignore b/deployment/helm/datamate/charts/database/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/deployment/helm/datamate/charts/database/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/deployment/helm/datamate/charts/database/Chart.yaml b/deployment/helm/datamate/charts/database/Chart.yaml new file mode 100644 index 00000000..85fb58fc --- /dev/null +++ b/deployment/helm/datamate/charts/database/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: database +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.0.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "0.0.1" diff --git a/deployment/helm/datamate/charts/database/templates/_helpers.tpl b/deployment/helm/datamate/charts/database/templates/_helpers.tpl new file mode 100644 index 00000000..24ff2822 --- /dev/null +++ b/deployment/helm/datamate/charts/database/templates/_helpers.tpl @@ -0,0 +1,75 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "database.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "database.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "database.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "database.labels" -}} +helm.sh/chart: {{ include "database.chart" . }} +{{ include "database.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "database.selectorLabels" -}} +app.kubernetes.io/name: {{ include "database.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "database.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "database.fullname" .) .Values.serviceAccount.name -}} +{{- else }} +{{- default "default" .Values.serviceAccount.name -}} +{{- end }} +{{- end }} + +{{/* +Name of image +*/}} +{{- define "database.image" -}} +{{- $name := default .Values.image.repository .Values.global.image.database.name }} +{{- $tag := default .Values.image.tag .Values.global.image.database.tag }} +{{- if .Values.global.image.repository }} +{{- .Values.global.image.repository | trimSuffix "/" }}/{{ $name }}:{{ $tag }} +{{- else }} +{{- $name }}:{{ $tag }} +{{- end }} +{{- end }} diff --git a/deployment/helm/datamate/charts/database/templates/configmap.yaml b/deployment/helm/datamate/charts/database/templates/configmap.yaml new file mode 100644 index 00000000..c3ee49b2 --- /dev/null +++ b/deployment/helm/datamate/charts/database/templates/configmap.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: datamate-mysql-utf8-config +data: + utf8.cnf: | + [mysqld] + # 设置服务器默认字符集为 utf8mb4 (推荐,支持完整的 UTF-8,包括 emoji) + character-set-server = utf8mb4 + # 设置默认排序规则 + collation-server = utf8mb4_unicode_ci + # 或者使用 utf8_general_ci (性能稍好,但排序规则稍宽松) + default-time-zone = 'Asia/Shanghai' + log_error=/var/log/datamate/database/error.log + + [client] + # 设置客户端连接默认字符集 + default-character-set = utf8mb4 + + [mysql] + # 设置 mysql 命令行客户端默认字符集 + default-character-set = utf8mb4 diff --git a/deployment/helm/datamate/charts/database/templates/deployment.yaml b/deployment/helm/datamate/charts/database/templates/deployment.yaml new file mode 100644 index 00000000..d7ee6c86 --- /dev/null +++ b/deployment/helm/datamate/charts/database/templates/deployment.yaml @@ -0,0 +1,82 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "database.fullname" . }} + labels: + {{- include "database.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "database.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "database.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "database.serviceAccountName" . }} + {{- with .Values.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{- with .Values.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + image: "{{ include "database.image" . }}" + imagePullPolicy: {{ default .Values.global.image.pullPolicy .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + {{- with .Values.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.env }} + env: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/deployment/helm/datamate/charts/database/templates/service.yaml b/deployment/helm/datamate/charts/database/templates/service.yaml new file mode 100644 index 00000000..817aa267 --- /dev/null +++ b/deployment/helm/datamate/charts/database/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "database.fullname" . }} + labels: + {{- include "database.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.service.port }} + protocol: TCP + name: {{ .Chart.Name }} + selector: + {{- include "database.selectorLabels" . | nindent 4 }} diff --git a/deployment/helm/datamate/charts/database/templates/serviceaccount.yaml b/deployment/helm/datamate/charts/database/templates/serviceaccount.yaml new file mode 100644 index 00000000..ed718a93 --- /dev/null +++ b/deployment/helm/datamate/charts/database/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "database.serviceAccountName" . }} + labels: + {{- include "database.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/deployment/helm/datamate/charts/database/values.yaml b/deployment/helm/datamate/charts/database/values.yaml new file mode 100644 index 00000000..c11ff4c9 --- /dev/null +++ b/deployment/helm/datamate/charts/database/values.yaml @@ -0,0 +1,110 @@ +# Default values for datamate. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ +replicaCount: 1 + +# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ +image: + repository: "mysql" + # This sets the pull policy for images. + pullPolicy: "IfNotPresent" + # Overrides the image tag whose default is the chart appVersion. + tag: "8" + +# This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ +imagePullSecrets: [] +# This is to override the chart name. +nameOverride: "datamate-database" +fullnameOverride: "datamate-database" + +env: + - name: MYSQL_ROOT_PASSWORD + value: "Huawei@123" + +# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +# This is for setting Kubernetes Annotations to a Pod. +# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +podAnnotations: {} +# This is for setting Kubernetes Labels to a Pod. +# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +podLabels: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ +service: + # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + type: ClusterIP + # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports + port: 3306 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ +# livenessProbe: +# httpGet: +# path: / +# port: http +# readinessProbe: +# httpGet: +# path: / +# port: http + +# This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +# Additional volumes on the output Deployment definition. +volumes: [] +# - name: foo +# secret: +# secretName: mysecret +# optional: false + +# Additional volumeMounts on the output Deployment definition. +volumeMounts: [] +# - name: foo +# mountPath: "/etc/foo" +# readOnly: true + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/deployment/helm/datamate/charts/frontend/.helmignore b/deployment/helm/datamate/charts/frontend/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/deployment/helm/datamate/charts/frontend/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/deployment/helm/datamate/charts/frontend/Chart.yaml b/deployment/helm/datamate/charts/frontend/Chart.yaml new file mode 100644 index 00000000..98025e32 --- /dev/null +++ b/deployment/helm/datamate/charts/frontend/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: frontend +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.0.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "0.0.1" + +dependencies: + - name: backend + repository: file://../backend + version: 0.0.1 diff --git a/deployment/helm/datamate/charts/frontend/templates/_helpers.tpl b/deployment/helm/datamate/charts/frontend/templates/_helpers.tpl new file mode 100644 index 00000000..8bc9b2e5 --- /dev/null +++ b/deployment/helm/datamate/charts/frontend/templates/_helpers.tpl @@ -0,0 +1,75 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "frontend.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "frontend.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "frontend.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "frontend.labels" -}} +helm.sh/chart: {{ include "frontend.chart" . }} +{{ include "frontend.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "frontend.selectorLabels" -}} +app.kubernetes.io/name: {{ include "frontend.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "frontend.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "frontend.fullname" .) .Values.serviceAccount.name -}} +{{- else }} +{{- default "default" .Values.serviceAccount.name -}} +{{- end }} +{{- end }} + +{{/* +Name of image +*/}} +{{- define "frontend.image" -}} +{{- $name := default .Values.image.repository .Values.global.image.frontend.name }} +{{- $tag := default .Values.image.tag .Values.global.image.frontend.tag }} +{{- if .Values.global.image.repository }} +{{- .Values.global.image.repository | trimSuffix "/" }}/{{ $name }}:{{ $tag }} +{{- else }} +{{- $name }}:{{ $tag }} +{{- end }} +{{- end }} diff --git a/deployment/helm/datamate/charts/frontend/templates/deployment.yaml b/deployment/helm/datamate/charts/frontend/templates/deployment.yaml new file mode 100644 index 00000000..1aa5c4fa --- /dev/null +++ b/deployment/helm/datamate/charts/frontend/templates/deployment.yaml @@ -0,0 +1,82 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "frontend.fullname" . }} + labels: + {{- include "frontend.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "frontend.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "frontend.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "frontend.serviceAccountName" . }} + {{- with .Values.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{- with .Values.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + image: "{{ include "frontend.image" . }}" + imagePullPolicy: {{ default .Values.global.image.pullPolicy .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + {{- with .Values.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.env }} + env: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/deployment/helm/datamate/charts/frontend/templates/service.yaml b/deployment/helm/datamate/charts/frontend/templates/service.yaml new file mode 100644 index 00000000..ae5a5dd2 --- /dev/null +++ b/deployment/helm/datamate/charts/frontend/templates/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "frontend.fullname" . }} + labels: + {{- include "frontend.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.service.port }} + protocol: TCP + name: {{ .Chart.Name }} + {{- if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} + selector: + {{- include "frontend.selectorLabels" . | nindent 4 }} diff --git a/deployment/helm/datamate/charts/frontend/templates/serviceaccount.yaml b/deployment/helm/datamate/charts/frontend/templates/serviceaccount.yaml new file mode 100644 index 00000000..22facbdb --- /dev/null +++ b/deployment/helm/datamate/charts/frontend/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "frontend.serviceAccountName" . }} + labels: + {{- include "frontend.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/deployment/helm/datamate/charts/frontend/values.yaml b/deployment/helm/datamate/charts/frontend/values.yaml new file mode 100644 index 00000000..6691490c --- /dev/null +++ b/deployment/helm/datamate/charts/frontend/values.yaml @@ -0,0 +1,109 @@ +# Default values for datamate. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ +replicaCount: 1 + +# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ +image: + repository: "datamate-frontend" + # This sets the pull policy for images. + pullPolicy: "IfNotPresent" + # Overrides the image tag whose default is the chart appVersion. + tag: "latest" + +# This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ +imagePullSecrets: [] +# This is to override the chart name. +nameOverride: "datamate-frontend" +fullnameOverride: "datamate-frontend" + +env: [] + +# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +# This is for setting Kubernetes Annotations to a Pod. +# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +podAnnotations: {} +# This is for setting Kubernetes Labels to a Pod. +# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +podLabels: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ +service: + # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + type: NodePort + # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports + port: 80 + nodePort: 30000 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ +# livenessProbe: +# httpGet: +# path: / +# port: http +# readinessProbe: +# httpGet: +# path: / +# port: http + +# This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +# Additional volumes on the output Deployment definition. +volumes: [] +# - name: foo +# secret: +# secretName: mysecret +# optional: false + +# Additional volumeMounts on the output Deployment definition. +volumeMounts: [] +# - name: foo +# mountPath: "/etc/foo" +# readOnly: true + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/deployment/helm/ray/kuberay-operator/Chart.yaml b/deployment/helm/datamate/charts/kuberay-operator/Chart.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/Chart.yaml rename to deployment/helm/datamate/charts/kuberay-operator/Chart.yaml diff --git a/deployment/helm/ray/kuberay-operator/crds/ray.io_rayclusters.yaml b/deployment/helm/datamate/charts/kuberay-operator/crds/ray.io_rayclusters.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/crds/ray.io_rayclusters.yaml rename to deployment/helm/datamate/charts/kuberay-operator/crds/ray.io_rayclusters.yaml diff --git a/deployment/helm/ray/kuberay-operator/crds/ray.io_rayjobs.yaml b/deployment/helm/datamate/charts/kuberay-operator/crds/ray.io_rayjobs.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/crds/ray.io_rayjobs.yaml rename to deployment/helm/datamate/charts/kuberay-operator/crds/ray.io_rayjobs.yaml diff --git a/deployment/helm/ray/kuberay-operator/crds/ray.io_rayservices.yaml b/deployment/helm/datamate/charts/kuberay-operator/crds/ray.io_rayservices.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/crds/ray.io_rayservices.yaml rename to deployment/helm/datamate/charts/kuberay-operator/crds/ray.io_rayservices.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/_helpers.tpl b/deployment/helm/datamate/charts/kuberay-operator/templates/_helpers.tpl similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/_helpers.tpl rename to deployment/helm/datamate/charts/kuberay-operator/templates/_helpers.tpl diff --git a/deployment/helm/ray/kuberay-operator/templates/deployment.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/deployment.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/deployment.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/deployment.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/leader_election_role.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/leader_election_role.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/leader_election_role.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/leader_election_role.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/leader_election_role_binding.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/leader_election_role_binding.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/leader_election_role_binding.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/leader_election_role_binding.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/multiple_namespaces_role.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/multiple_namespaces_role.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/multiple_namespaces_role.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/multiple_namespaces_role.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/multiple_namespaces_rolebinding.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/multiple_namespaces_rolebinding.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/multiple_namespaces_rolebinding.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/multiple_namespaces_rolebinding.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/ray_rayjob_editor_role.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/ray_rayjob_editor_role.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/ray_rayjob_editor_role.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/ray_rayjob_editor_role.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/ray_rayjob_viewer_role.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/ray_rayjob_viewer_role.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/ray_rayjob_viewer_role.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/ray_rayjob_viewer_role.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/ray_rayservice_editor_role.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/ray_rayservice_editor_role.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/ray_rayservice_editor_role.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/ray_rayservice_editor_role.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/ray_rayservice_viewer_role.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/ray_rayservice_viewer_role.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/ray_rayservice_viewer_role.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/ray_rayservice_viewer_role.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/role.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/role.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/role.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/role.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/rolebinding.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/rolebinding.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/rolebinding.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/rolebinding.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/service.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/service.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/service.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/service.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/serviceaccount.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/serviceaccount.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/serviceaccount.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/serviceaccount.yaml diff --git a/deployment/helm/ray/kuberay-operator/templates/servicemonitor.yaml b/deployment/helm/datamate/charts/kuberay-operator/templates/servicemonitor.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/templates/servicemonitor.yaml rename to deployment/helm/datamate/charts/kuberay-operator/templates/servicemonitor.yaml diff --git a/deployment/helm/ray/kuberay-operator/values.yaml b/deployment/helm/datamate/charts/kuberay-operator/values.yaml similarity index 100% rename from deployment/helm/ray/kuberay-operator/values.yaml rename to deployment/helm/datamate/charts/kuberay-operator/values.yaml diff --git a/deployment/helm/ray/ray-cluster/Chart.yaml b/deployment/helm/datamate/charts/ray-cluster/Chart.yaml similarity index 100% rename from deployment/helm/ray/ray-cluster/Chart.yaml rename to deployment/helm/datamate/charts/ray-cluster/Chart.yaml diff --git a/deployment/helm/ray/ray-cluster/templates/_helpers.tpl b/deployment/helm/datamate/charts/ray-cluster/templates/_helpers.tpl similarity index 100% rename from deployment/helm/ray/ray-cluster/templates/_helpers.tpl rename to deployment/helm/datamate/charts/ray-cluster/templates/_helpers.tpl diff --git a/deployment/helm/ray/ray-cluster/templates/raycluster-cluster.yaml b/deployment/helm/datamate/charts/ray-cluster/templates/raycluster-cluster.yaml similarity index 100% rename from deployment/helm/ray/ray-cluster/templates/raycluster-cluster.yaml rename to deployment/helm/datamate/charts/ray-cluster/templates/raycluster-cluster.yaml diff --git a/deployment/helm/ray/service.yaml b/deployment/helm/datamate/charts/ray-cluster/templates/service.yaml similarity index 100% rename from deployment/helm/ray/service.yaml rename to deployment/helm/datamate/charts/ray-cluster/templates/service.yaml diff --git a/deployment/helm/ray/ray-cluster/values.yaml b/deployment/helm/datamate/charts/ray-cluster/values.yaml similarity index 100% rename from deployment/helm/ray/ray-cluster/values.yaml rename to deployment/helm/datamate/charts/ray-cluster/values.yaml diff --git a/deployment/helm/datamate/values.yaml b/deployment/helm/datamate/values.yaml new file mode 100644 index 00000000..2bf849e9 --- /dev/null +++ b/deployment/helm/datamate/values.yaml @@ -0,0 +1,83 @@ +# Default values for datamate. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +global: + image: + repository: "" + pullPolicy: "IfNotPresent" + backend: + name: "datamate-backend" + tag: "latest" + frontend: + name: "datamate-frontend" + tag: "latest" + database: + name: "mysql" + tag: "8" + +datasetVolume: &datasetVolume + name: dataset-volume + hostPath: + path: /opt/datamate/data/dataset + type: DirectoryOrCreate + +flowVolume: &flowVolume + name: flow-volume + hostPath: + path: /opt/datamate/data/flow + type: DirectoryOrCreate + +logVolume: &logVolume + name: log-volume + hostPath: + path: /opt/datamate/data/log + type: DirectoryOrCreate + +dataVolume: &dataVolume + name: data-volume + hostPath: + path: /opt/datamate/data/mysql + type: DirectoryOrCreate + +backend: + volumes: + - *datasetVolume + - *flowVolume + - *logVolume + volumeMounts: + - name: dataset-volume + mountPath: /dataset + - name: flow-volume + mountPath: /flow + - name: log-volume + mountPath: /var/log/datamate + +frontend: + volumes: + - *logVolume + volumeMounts: + - name: log-volume + mountPath: /var/log/datamate/frontend + subPath: frontend + +database: + volumes: + - *dataVolume + - *logVolume + - name: init-sql + configMap: + name: datamate-init-sql + - name: mysql-utf8-config + configMap: + name: datamate-mysql-utf8-config + volumeMounts: + - name: data-volume + mountPath: /var/lib/mysql + - name: log-volume + mountPath: /var/log/datamate/database + subPath: database + - name: init-sql + mountPath: /docker-entrypoint-initdb.d + - name: mysql-utf8-config + mountPath: /etc/mysql/conf.d diff --git a/deployment/kubernetes/backend/deploy.yaml b/deployment/kubernetes/backend/deploy.yaml index cc203584..c14aa370 100644 --- a/deployment/kubernetes/backend/deploy.yaml +++ b/deployment/kubernetes/backend/deploy.yaml @@ -1,33 +1,4 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - app: datamate - tier: backend - name: datamate-backend -rules: - - verbs: - - create - - list - - get - - delete - apiGroups: - - batch - resources: - - jobs - - verbs: - - list - apiGroups: - - "" - resources: - - pods - - verbs: - - get - - list - apiGroups: - - "" - resources: - - pods/log + --- apiVersion: v1 @@ -39,20 +10,7 @@ metadata: name: datamate-backend --- -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - labels: - app: datamate - tier: backend - name: datamate-backend -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: datamate-backend -subjects: - - kind: ServiceAccount - name: datamate-backend + --- apiVersion: apps/v1