feat(ci): update helm config (#157)

main
Ryo 3 months ago committed by GitHub
parent cc593fc270
commit a0d3bcf998
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 133
      helm/charts/opencoze/files/conf/model_template_ark.yaml
  2. 74
      helm/charts/opencoze/files/es/coze_resource.index-template.json
  3. 79
      helm/charts/opencoze/files/es/project_draft.index-template.json
  4. 15
      helm/charts/opencoze/templates/deployment.yaml
  5. 6
      helm/charts/opencoze/templates/elasticsearch-init-configmap.yaml
  6. 47
      helm/charts/opencoze/templates/elasticsearch-init-job.yaml
  7. 44
      helm/charts/opencoze/templates/elasticsearch-init-script-configmap.yaml
  8. 8
      helm/charts/opencoze/templates/model-configmap.yaml
  9. 7
      helm/charts/opencoze/templates/mysql-secret.yaml
  10. 8
      helm/charts/opencoze/templates/mysql-statefulset.yaml
  11. 8
      helm/charts/opencoze/templates/service.yaml
  12. 53
      helm/charts/opencoze/values.yaml

@ -0,0 +1,133 @@
id: 2002
name: Doubao Model
icon_uri: default_icon/doubao_v2.png
icon_url: ""
description:
zh: 豆包模型简介
en: doubao model description
default_parameters:
- name: temperature
label:
zh: 生成随机性
en: Temperature
desc:
zh: '- **temperature**: 调高温度会使得模型的输出更多样性和创新性,反之,降低温度会使输出内容更加遵循指令要求但减少多样性。建议不要与“Top p”同时调整。'
en: '**Temperature**:\n\n- When you increase this value, the model outputs more diverse and innovative content; when you decrease it, the model outputs less diverse content that strictly follows the given instructions.\n- It is recommended not to adjust this value with \"Top p\" at the same time.'
type: float
min: "0"
max: "1"
default_val:
balance: "0.8"
creative: "1"
default_val: "1.0"
precise: "0.3"
precision: 1
options: []
style:
widget: slider
label:
zh: 生成多样性
en: Generation diversity
- name: max_tokens
label:
zh: 最大回复长度
en: Response max length
desc:
zh: 控制模型输出的Tokens 长度上限。通常 100 Tokens 约等于 150 个中文汉字。
en: You can specify the maximum length of the tokens output through this value. Typically, 100 tokens are approximately equal to 150 Chinese characters.
type: int
min: "1"
max: "4096"
default_val:
default_val: "4096"
options: []
style:
widget: slider
label:
zh: 输入及输出设置
en: Input and output settings
- name: top_p
label:
zh: Top P
en: Top P
desc:
zh: '- **Top p 为累计概率**: 模型在生成输出时会从概率最高的词汇开始选择,直到这些词汇的总概率累积达到Top p 值。这样可以限制模型只选择这些高概率的词汇,从而控制输出内容的多样性。建议不要与“生成随机性”同时调整。'
en: '**Top P**:\n\n- An alternative to sampling with temperature, where only tokens within the top p probability mass are considered. For example, 0.1 means only the top 10% probability mass tokens are considered.\n- We recommend altering this or temperature, but not both.'
type: float
min: "0"
max: "1"
default_val:
default_val: "0.7"
precision: 2
options: []
style:
widget: slider
label:
zh: 生成多样性
en: Generation diversity
- name: response_format
label:
zh: 输出格式
en: Response format
desc:
zh: '- **文本**: 使用普通文本格式回复\n- **Markdown**: 将引导模型使用Markdown格式输出回复\n- **JSON**: 将引导模型使用JSON格式输出'
en: '**Response Format**:\n\n- **Text**: Replies in plain text format\n- **Markdown**: Uses Markdown format for replies\n- **JSON**: Uses JSON format for replies'
type: int
min: ""
max: ""
default_val:
default_val: "0"
options:
- label: Text
value: "0"
- label: Markdown
value: "1"
- label: JSON
value: "2"
style:
widget: radio_buttons
label:
zh: 输入及输出设置
en: Input and output settings
meta:
name: Doubao
protocol: ark
capability:
function_call: true
input_modal:
- text
- image
input_tokens: 128000
json_mode: false
max_tokens: 128000
output_modal:
- text
output_tokens: 16384
prefix_caching: false
reasoning: false
prefill_response: false
conn_config:
base_url: ""
api_key: ""
timeout: 0s
model: ""
temperature: 0.1
frequency_penalty: 0
presence_penalty: 0
max_tokens: 4096
top_p: 0.7
top_k: 0
stop: []
openai: null
claude: null
ark:
region: ""
access_key: ""
secret_key: ""
retry_times: null
custom_header: {}
deepseek: null
qwen: null
gemini: null
custom: {}
status: 0

@ -1,74 +0,0 @@
{
"index_patterns": ["coze_resource*"],
"template": {
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {
"text_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": ["lowercase", "stop", "snowball"]
},
"smartcn": {
"type": "smartcn"
}
}
}
},
"mappings": {
"dynamic": false,
"properties": {
"res_type": {
"type": "keyword"
},
"app_id": {
"type": "keyword",
"null_value": "NULL"
},
"res_id": {
"type": "keyword"
},
"res_sub_type": {
"type": "keyword"
},
"name": {
"type": "text",
"analyzer": "smartcn",
"search_analyzer": "smartcn",
"fields": {
"raw": {
"type": "keyword"
}
}
},
"owner_id": {
"type": "keyword"
},
"space_id": {
"type": "keyword"
},
"biz_status": {
"type": "keyword"
},
"publish_status": {
"type": "keyword"
},
"create_time": {
"type": "long"
},
"update_time": {
"type": "long"
},
"publish_time": {
"type": "long"
}
}
}
},
"priority": 200,
"_meta": {
"description": "resource library's index template"
}
}

@ -1,79 +0,0 @@
{
"index_patterns": ["project_draft*"],
"template": {
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {
"text_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": ["lowercase", "stop", "snowball"]
},
"smartcn": {
"type": "smartcn"
}
}
}
},
"mappings": {
"dynamic": false,
"properties": {
"create_time": {
"type": "long"
},
"has_published": {
"type": "keyword"
},
"id": {
"type": "keyword"
},
"name": {
"type": "text",
"analyzer": "smartcn",
"search_analyzer": "smartcn",
"fields": {
"raw": {
"type": "keyword"
}
}
},
"owner_id": {
"type": "keyword"
},
"publish_time": {
"type": "long"
},
"space_id": {
"type": "keyword"
},
"status": {
"type": "keyword"
},
"type": {
"type": "keyword"
},
"update_time": {
"type": "long"
},
"fav_time": {
"type": "long"
},
"recently_open_time": {
"type": "long"
},
"is_fav": {
"type": "keyword"
},
"is_recently_open": {
"type": "keyword"
}
}
}
},
"priority": 200,
"_meta": {
"description": "Project draft index template"
}
}

@ -57,8 +57,10 @@ spec:
image: "{{ .Values.cozeServer.image.repository }}:{{ .Values.cozeServer.image.tag }}"
imagePullPolicy: {{ .Values.cozeServer.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.cozeServer.service.port }}
{{- range .Values.cozeServer.service.ports }}
- name: {{ .name }}
containerPort: {{ .targetPort }}
{{- end }}
env:
- name: MYSQL_HOST
value: "{{ include "opencoze.fullname" . }}-mysql"
@ -95,13 +97,18 @@ spec:
value: {{ $val | quote }}
{{- end }}
{{- if .Values.cozeServer.confHostPath }}
volumeMounts:
- name: model-config
mountPath: /app/resources/conf/model
{{- if .Values.cozeServer.confHostPath }}
- name: opencoze-server-conf
mountPath: /app/resources/conf
{{- end }}
{{- if .Values.cozeServer.confHostPath }}
volumes:
- name: model-config
configMap:
name: {{ include "opencoze.fullname" . }}-model-config
{{- if .Values.cozeServer.confHostPath }}
- name: opencoze-server-conf
hostPath:
path: {{ .Values.cozeServer.confHostPath }}

@ -1,6 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "opencoze.fullname" . }}-es-init-config
data:
{{ (.Files.Glob "files/es/*.json").AsConfig | indent 2 }}

@ -1,47 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "opencoze.fullname" . }}-es-init
spec:
template:
spec:
restartPolicy: Never
initContainers:
- name: wait-for-es
image: {{ .Values.images.busybox }}
command: ['sh', '-c', 'until nc -z {{ include "opencoze.fullname" . }}-elasticsearch 9200; do echo waiting for elasticsearch; sleep 2; done']
containers:
- name: es-init
image: {{ .Values.images.curl }}
env:
- name: ES_USERNAME
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-es-secret
key: username
- name: ES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-es-secret
key: password
command:
- /bin/sh
- -c
- |
set -ex
/scripts/setup_es.sh
volumeMounts:
- name: es-init-script
mountPath: /scripts
- name: es-index-schema
mountPath: /es_index_schema
volumes:
- name: es-init-script
configMap:
name: {{ include "opencoze.fullname" . }}-es-init-script
defaultMode: 0755
- name: es-index-schema
configMap:
name: {{ include "opencoze.fullname" . }}-es-init-config
backoffLimit: 4

@ -1,44 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "opencoze.fullname" . }}-es-init-script
data:
setup_es.sh: |
#!/bin/sh
set -ex
ES_HOST="http://{{ include "opencoze.fullname" . }}-elasticsearch:9200"
CURL_AUTH=""
if [ -n "$ES_USERNAME" ] && [ -n "$ES_PASSWORD" ]; then
CURL_AUTH="-u $ES_USERNAME:$ES_PASSWORD"
fi
# Upload index templates
for file in /es_index_schema/*.json; do
if [ -f "$file" ]; then
template_name=$(basename "$file" .index-template.json)
echo "Uploading index template $template_name"
curl -X PUT $CURL_AUTH "$ES_HOST/_index_template/$template_name" -H "Content-Type: application/json" --data-binary "@$file"
fi
done
# Create indices
for file in /es_index_schema/*.json; do
if [ -f "$file" ]; then
template_name=$(basename "$file" .index-template.json)
index_name=$template_name
echo "Creating index $index_name"
curl -X PUT $CURL_AUTH "$ES_HOST/$index_name" -H "Content-Type: application/json" -d'{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 1
}
}
}'
fi
done
echo "Elasticsearch setup complete."

@ -0,0 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "opencoze.fullname" . }}-model-config
labels:
{{- include "opencoze.labels" . | nindent 4 }}
data:
{{- (.Files.Glob "files/conf/*").AsConfig | nindent 2 }}

@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "opencoze.fullname" . }}-mysql
stringData:
mysql-password: {{ .Values.mysql.password | quote }}
mysql-root-password: {{ .Values.mysql.rootPassword | quote }}

@ -1,11 +1,3 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "opencoze.fullname" . }}-mysql
stringData:
mysql-password: {{ .Values.mysql.password | quote }}
mysql-root-password: {{ .Values.mysql.rootPassword | quote }}
---
apiVersion: apps/v1
kind: StatefulSet
metadata:

@ -7,10 +7,12 @@ metadata:
spec:
type: {{ .Values.cozeServer.service.type }}
ports:
- port: {{ .Values.cozeServer.service.port }}
targetPort: http
{{- range .Values.cozeServer.service.ports }}
- name: {{ .name }}
port: {{ .port }}
targetPort: {{ .name }}
protocol: TCP
name: app-port
{{- end }}
selector:
app.kubernetes.io/name: {{ include "opencoze.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}

@ -7,7 +7,7 @@ mysql:
port: 3306
targetPort: 3306
image:
repository: opencoze-cn-beijing.cr.volces.com/iac/mysql
repository: mysql
tag: 8.4.5
rootPassword: "root"
database: opencoze
@ -23,7 +23,7 @@ mysql:
redis:
enabled: true
image:
repository: opencoze-cn-beijing.cr.volces.com/iac/redis
repository: bitnami/redis
tag: "7.2"
aofEnabled: "no"
port: 6379
@ -47,17 +47,32 @@ cozeServer:
service:
type: LoadBalancer
port: 8888
ports:
- name: http
port: 8888
targetPort: 8888
- name: minio-proxy
port: 8889
targetPort: 8889
env:
LISTEN_ADDR: ":8888"
SERVER_HOST: "localhost${LISTEN_ADDR}"
LOG_LEVEL: "debug"
MAX_REQUEST_BODY_SIZE: "1073741824"
STORAGE_TYPE: "minio"
MINIO_POD_PROXY_URL: "opencoze-minio:9000"
STORAGE_BUCKET: "opencoze"
MINIO_PROXY_ENDPOINT: ":8889"
COZE_MQ_TYPE: rmq
MQ_NAME_SERVER: "127.0.0.1:9876"
MINIO_ENDPOINT: "127.0.0.1:9000"
ES_VERSION: "v8"
VECTOR_STORE_TYPE: "milvus"
EMBEDDING_TYPE: "openai"
EMBEDDING_TYPE: "ark"
ARK_EMBEDDING_MODEL: ""
ARK_EMBEDDING_DIMS: "1024"
ARK_EMBEDDING_BASE_URL: "https://ark.cn-beijing.volces.com/api/v3"
FILE_UPLOAD_COMPONENT_TYPE: "storage"
OPENAI_EMBEDDING_BASE_URL: "https://api.openai.com/v1/embeddings"
OPENAI_EMBEDDING_MODEL: "text-embedding-3-large"
OPENAI_EMBEDDING_API_KEY: "your_api_key"
@ -66,7 +81,10 @@ cozeServer:
OCR_TYPE: "ve"
VE_OCR_AK: ""
VE_OCR_SK: ""
BUILTIN_CM_TYPE: "openai"
BUILTIN_CM_TYPE: "ark"
BUILTIN_CM_ARK_API_KEY: ""
BUILTIN_CM_ARK_MODEL: ""
BUILTIN_CM_ARK_BASE_URL: ""
BUILTIN_CM_OPENAI_BASE_URL: "https://api.openai.com/v1/chat/completions"
BUILTIN_CM_OPENAI_API_KEY: "your_api_key"
BUILTIN_CM_OPENAI_BY_AZURE: "false"
@ -77,13 +95,14 @@ cozeServer:
VE_IMAGEX_DOMAIN: ""
VE_IMAGEX_TEMPLATE: ""
VE_IMAGEX_UPLOAD_HOST: "https://imagex.volcengineapi.com"
COZE_SERVER_PROXY_URL_LIST: "opencoze-mysql:3306,opencoze-redis:6379,opencoze-elasticsearch:9200,opencoze-milvus:19530,opencoze-minio:9000,opencoze-rocketmq-namesrv:9876"
rocketmq:
enabled: true
namesrv:
replicaCount: 1
image:
repository: opencoze-cn-beijing.cr.volces.com/iac/rocketmq
repository: apache/rocketmq
tag: 5.3.2
persistence:
store:
@ -115,7 +134,7 @@ rocketmq:
broker:
replicaCount: 1
image:
repository: opencoze-cn-beijing.cr.volces.com/iac/rocketmq
repository: apache/rocketmq
tag: 5.3.2
config: |
brokerClusterName = DefaultCluster
@ -138,13 +157,13 @@ rocketmq:
memory: 8Gi
initContainers:
- name: wait-for-namesrv
image: opencoze-cn-beijing.cr.volces.com/iac/busybox:latest
image: busybox:latest
command: ['sh', '-c', 'until nc -z rocketmq-namesrv 9876; do echo waiting for namesrv; sleep 2; done']
elasticsearch:
enabled: true
image:
repository: opencoze-cn-beijing.cr.volces.com/iac/elasticsearch
repository: bitnami/elasticsearch
tag: 8.18.0
javaOpts: "-Djdk.tls.client.protocols=TLSv1.2 -Dhttps.protocols=TLSv1.2 -Djavax.net.ssl.trustAll=true -Xms4096m -Xmx4096m"
username: ""
@ -163,8 +182,8 @@ elasticsearch:
minio:
enabled: true
image:
repository: opencoze-cn-beijing.cr.volces.com/iac/minio
tag: latest
repository: minio/minio
tag: RELEASE.2025-06-13T11-33-47Z-cpuv1
accessKey: minioadmin
secretKey: minioadmin123
bucket: opencoze
@ -186,7 +205,7 @@ minio:
etcd:
enabled: true
image:
repository: opencoze-cn-beijing.cr.volces.com/iac/etcd
repository: bitnami/etcd
tag: 3.5
persistence:
storageClassName: "opencoze-data"
@ -195,7 +214,7 @@ etcd:
milvus:
enabled: true
image:
repository: opencoze-cn-beijing.cr.volces.com/iac/milvus
repository: milvusdb/milvus
tag: v2.5.10
bucketName: milvus
persistence:
@ -205,7 +224,7 @@ milvus:
kibana:
enabled: true
image:
repository: opencoze-cn-beijing.cr.volces.com/iac/kibana
repository: bitnami/kibana
tag: 8.18.0
service:
type: ClusterIP
@ -213,8 +232,8 @@ kibana:
images:
busybox: opencoze-cn-beijing.cr.volces.com/iac/busybox:latest
curl: opencoze-cn-beijing.cr.volces.com/iac/curl:8.12.1
busybox: busybox:latest
curl: alpine/curl:8.12.1
# -- We will add other services like mysql, redis etc. here later

Loading…
Cancel
Save