mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-18 13:17:50 +00:00
update
This commit is contained in:
57
deploy/k8s/xinchuang/activemq.yaml
Normal file
57
deploy/k8s/xinchuang/activemq.yaml
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: activemq
|
||||
namespace: ykf
|
||||
labels:
|
||||
app: activemq
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: activemq
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: activemq
|
||||
spec:
|
||||
containers:
|
||||
- name: activemq
|
||||
image: easzlab.io.local:5000/dev/activemq-artemis
|
||||
env:
|
||||
- name: ARTEMIS_USER
|
||||
value: "admin"
|
||||
- name: ARTEMIS_PASSWORD
|
||||
value: "admin"
|
||||
- name: ANONYMOUS_LOGIN
|
||||
value: "false"
|
||||
- name: EXTRA_ARGS
|
||||
value: "--http-host 0.0.0.0 --relax-jolokia"
|
||||
ports:
|
||||
- containerPort: 61616 # Core protocol
|
||||
- containerPort: 5672 # AMQP
|
||||
- containerPort: 1883 # MQTT
|
||||
- containerPort: 8161 # Web console
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: activemq
|
||||
namespace: ykf
|
||||
spec:
|
||||
selector:
|
||||
app: activemq
|
||||
ports:
|
||||
- name: core
|
||||
port: 61616
|
||||
targetPort: 61616
|
||||
- name: amqp
|
||||
port: 5672
|
||||
targetPort: 5672
|
||||
- name: mqtt
|
||||
port: 1883
|
||||
targetPort: 1883
|
||||
- name: web
|
||||
port: 8161
|
||||
targetPort: 8161
|
||||
28
deploy/k8s/xinchuang/elasticseach8-pv.yaml
Normal file
28
deploy/k8s/xinchuang/elasticseach8-pv.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: elasticsearch8-ykf-pv
|
||||
namespace: ykf
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
nfs:
|
||||
path: /data/pv/ykfelasticsearch8
|
||||
server: 192.168.48.70
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: elasticsearch8-ykf-pvc
|
||||
namespace: ykf
|
||||
spec:
|
||||
volumeName: elasticsearch8-ykf-pv
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
81
deploy/k8s/xinchuang/elasticseach8.yaml
Normal file
81
deploy/k8s/xinchuang/elasticseach8.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: elasticsearch8
|
||||
namespace: ykf
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: elasticsearch8
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: elasticsearch8
|
||||
name: elasticsearch8
|
||||
spec:
|
||||
containers:
|
||||
- name: elasticsearch8
|
||||
image: easzlab.io.local:5000/dev/elasticsearch:8.18.0
|
||||
env:
|
||||
- name: node.name
|
||||
value: es01
|
||||
- name: cluster.name
|
||||
value: es-cluster
|
||||
- name: discovery.type
|
||||
value: single-node
|
||||
- name: bootstrap.memory_lock
|
||||
value: "true"
|
||||
- name: ES_JAVA_OPTS
|
||||
value: -Xms512m -Xmx512m
|
||||
- name: xpack.security.enabled
|
||||
value: "true"
|
||||
- name: ELASTIC_PASSWORD
|
||||
value: ykfsft20250805
|
||||
- name: network.host
|
||||
value: "0.0.0.0"
|
||||
- name: http.host
|
||||
value: "0.0.0.0"
|
||||
- name: transport.host
|
||||
value: "0.0.0.0"
|
||||
ports:
|
||||
- containerPort: 9200
|
||||
name: http
|
||||
- containerPort: 9300
|
||||
name: transport
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /usr/share/elasticsearch/data
|
||||
resources:
|
||||
limits:
|
||||
memory: 1Gi
|
||||
requests:
|
||||
memory: 512Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- IPC_LOCK
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: elasticsearch8-ykf-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: elasticsearch8
|
||||
namespace: ykf
|
||||
labels:
|
||||
name: elasticsearch8
|
||||
spec:
|
||||
ports:
|
||||
- name: web-9200
|
||||
port: 9200
|
||||
targetPort: 9200
|
||||
protocol: TCP
|
||||
- name: web-9300
|
||||
port: 9300
|
||||
targetPort: 9300
|
||||
protocol: TCP
|
||||
selector:
|
||||
name: elasticsearch8
|
||||
39
deploy/k8s/xinchuang/mysql-cnf.yaml
Normal file
39
deploy/k8s/xinchuang/mysql-cnf.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: mysql-config
|
||||
namespace: ykf
|
||||
data:
|
||||
my.cnf: |-
|
||||
[client]
|
||||
default-character-set=utf8mb4
|
||||
[mysql]
|
||||
default-character-set=utf8mb4
|
||||
[mysqld]
|
||||
max_connections = 2000
|
||||
secure_file_priv=/var/lib/mysql
|
||||
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
|
||||
skip-name-resolve
|
||||
open_files_limit = 65535
|
||||
table_open_cache = 128
|
||||
slow_query_log = 1
|
||||
long_query_time = 1
|
||||
slow_query_log_file = /var/lib/mysql/mysql-slow.log
|
||||
default-storage-engine = InnoDB
|
||||
innodb_file_per_table = 1
|
||||
innodb_open_files = 500
|
||||
innodb_buffer_pool_size = 64M
|
||||
innodb_write_io_threads = 4
|
||||
innodb_read_io_threads = 4
|
||||
innodb_thread_concurrency = 0
|
||||
innodb_purge_threads = 1
|
||||
innodb_flush_log_at_trx_commit = 2
|
||||
innodb_log_buffer_size = 2M
|
||||
innodb_log_file_size = 32M
|
||||
innodb_log_files_in_group = 3
|
||||
innodb_max_dirty_pages_pct = 90
|
||||
innodb_lock_wait_timeout = 120
|
||||
bulk_insert_buffer_size = 8M
|
||||
interactive_timeout = 28800
|
||||
wait_timeout = 28800
|
||||
27
deploy/k8s/xinchuang/mysql-pv.yaml
Normal file
27
deploy/k8s/xinchuang/mysql-pv.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: mysql2-pv
|
||||
namespace: ykf
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
nfs:
|
||||
path: /data/pv/ykfmysql
|
||||
server: 192.168.48.70
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: mysql2-pvc
|
||||
namespace: ykf
|
||||
spec:
|
||||
volumeName: mysql2-pv
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
59
deploy/k8s/xinchuang/mysql.yaml
Normal file
59
deploy/k8s/xinchuang/mysql.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: mysql
|
||||
namespace: ykf
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceName: mysql
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mysql
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mysql
|
||||
spec:
|
||||
containers:
|
||||
- name: mysql
|
||||
image: easzlab.io.local:5000/dev/mysql:8.0.32
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: "mssql@admin2025"
|
||||
- name: MYSQL_PASSWORD
|
||||
value: "mssql@admin2025"
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
volumeMounts:
|
||||
- name: mysql-data
|
||||
mountPath: /var/lib/mysql
|
||||
#- mountPath: /etc/my.cnf
|
||||
#name: mycnf
|
||||
#subPath: my.cnf
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
limits:
|
||||
memory: "1Gi"
|
||||
cpu: "1"
|
||||
volumes:
|
||||
- name: mysql-data
|
||||
persistentVolumeClaim:
|
||||
claimName: mysql2-pvc
|
||||
- name: mycnf
|
||||
configMap:
|
||||
name: mysql-config
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mysql
|
||||
namespace: ykf
|
||||
spec:
|
||||
selector:
|
||||
app: mysql
|
||||
ports:
|
||||
- port: 3306
|
||||
targetPort: 3306
|
||||
42
deploy/k8s/xinchuang/redis.yaml
Normal file
42
deploy/k8s/xinchuang/redis.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis
|
||||
namespace: ykf
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: easzlab.io.local:5000/dev/redis:6.0.20
|
||||
command: ["sh","-c","redis-server --requirepass 123456"]
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
memory: "100Mi"
|
||||
limits:
|
||||
cpu: "500m"
|
||||
memory: "200Mi"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis
|
||||
namespace: ykf
|
||||
spec:
|
||||
selector:
|
||||
app: redis
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
34
deploy/k8s/xinchuang/svc.yaml
Normal file
34
deploy/k8s/xinchuang/svc.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ykfui
|
||||
namespace: ykf
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- name: web
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
nodePort: 30018
|
||||
selector:
|
||||
app: ykfui
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ykfcore
|
||||
namespace: ykf
|
||||
spec:
|
||||
ports:
|
||||
- name: svc
|
||||
protocol: TCP
|
||||
port: 9003
|
||||
targetPort: 9003
|
||||
- name: socket
|
||||
protocol: TCP
|
||||
port: 9885
|
||||
targetPort: 9885
|
||||
selector:
|
||||
app: ykfcore
|
||||
350
deploy/k8s/xinchuang/ykfcore.yaml
Normal file
350
deploy/k8s/xinchuang/ykfcore.yaml
Normal file
@@ -0,0 +1,350 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ykfcore
|
||||
namespace: ykf
|
||||
labels:
|
||||
app: ykfcore
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ykfcore
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ykfcore
|
||||
spec:
|
||||
containers:
|
||||
- name: ykfcore
|
||||
image: easzlab.io.local:5000/dev/ykfcore:20250707
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
# 基本配置
|
||||
- name: SERVER_PORT
|
||||
value: "9003"
|
||||
# bytedesk 配置
|
||||
- name: BYTEDESK_DEBUG
|
||||
value: "true"
|
||||
- name: BYTEDESK_VERSION
|
||||
value: "0.8.6"
|
||||
- name: BYTEDESK_APPKEY
|
||||
value: "cDoyMDI1LTA5LTA2OlBMQVRGT1JNOjo6Og=="
|
||||
# 自定义配置
|
||||
- name: BYTEDESK_CUSTOM_ENABLED
|
||||
value: "true"
|
||||
- name: BYTEDESK_CUSTOM_NAME
|
||||
value: "k8测试云客服"
|
||||
- name: BYTEDESK_CUSTOM_LOGO
|
||||
value: "http://59.211.236.64:30024/admin/icons/custom/zhiguitong.jpg"
|
||||
- name: BYTEDESK_CUSTOM_DESCRIPTION
|
||||
value: ""
|
||||
- name: BYTEDESK_CUSTOM_SHOW_RIGHT_CORNER_CHAT
|
||||
value: "false"
|
||||
- name: BYTEDESK_CUSTOM_SHOW_DEMO
|
||||
value: "false"
|
||||
- name: BYTEDESK_CUSTOM_PRIVACY_POLICY_URL
|
||||
value: ""
|
||||
- name: BYTEDESK_CUSTOM_TERMS_OF_SERVICE_URL
|
||||
value: ""
|
||||
- name: BYTEDESK_CUSTOM_LOGIN_USERNAME_ENABLE
|
||||
value: "true"
|
||||
- name: BYTEDESK_CUSTOM_LOGIN_MOBILE_ENABLE
|
||||
value: "true"
|
||||
- name: BYTEDESK_CUSTOM_LOGIN_EMAIL_ENABLE
|
||||
value: "false"
|
||||
- name: BYTEDESK_CUSTOM_LOGIN_SCAN_ENABLE
|
||||
value: "true"
|
||||
- name: BYTEDESK_CUSTOM_DOC_URL_SHOW
|
||||
value: "true"
|
||||
- name: BYTEDESK_CUSTOM_DOC_URL
|
||||
value: "https://www.weiyuai.cn/docs/zh-CN/"
|
||||
# 管理员配置
|
||||
- name: BYTEDESK_ADMIN_EMAIL
|
||||
value: "admin@email.com"
|
||||
- name: BYTEDESK_ADMIN_PASSWORD
|
||||
value: "admin"
|
||||
- name: BYTEDESK_ADMIN_NICKNAME
|
||||
value: "SuperAdmin"
|
||||
- name: BYTEDESK_ADMIN_MOBILE
|
||||
value: "13345678000"
|
||||
- name: BYTEDESK_ADMIN_MOBILE_WHITELIST
|
||||
value: "18888888000,18888888001,18888888002,18888888003,18888888004,18888888005"
|
||||
- name: BYTEDESK_ADMIN_EMAIL_WHITELIST
|
||||
value: "100@email.com,101@email.com,102@email.com,103@email.com,104@email.com,105@email.com"
|
||||
- name: BYTEDESK_ADMIN_VALIDATE_CODE
|
||||
value: "123456"
|
||||
- name: BYTEDESK_ADMIN_FORCE_VALIDATE_MOBILE
|
||||
value: "true"
|
||||
- name: BYTEDESK_ADMIN_FORCE_VALIDATE_EMAIL
|
||||
value: "true"
|
||||
# 成员配置
|
||||
- name: BYTEDESK_MEMBER_PASSWORD
|
||||
value: "admin@20250606"
|
||||
# 组织配置
|
||||
- name: BYTEDESK_ORGANIZATION_NAME
|
||||
value: "MyCompany"
|
||||
- name: BYTEDESK_ORGANIZATION_CODE
|
||||
value: "bytedesk"
|
||||
# 功能配置
|
||||
- name: BYTEDESK_FEATURES_JAVA_AI
|
||||
value: "false"
|
||||
- name: BYTEDESK_FEATURES_PYTHON_AI
|
||||
value: "true"
|
||||
- name: BYTEDESK_FEATURES_EMAIL_TYPE
|
||||
value: "javamail"
|
||||
- name: BYTEDESK_FEATURES_ENABLE_REGISTRATION
|
||||
value: "false"
|
||||
- name: BYTEDESK_FEATURES_AVATAR_BASE_URL
|
||||
value: "http://59.211.236.64:30024"
|
||||
# JWT配置
|
||||
- name: BYTEDESK_JWT_SECRET_KEY
|
||||
value: "1dfaf8d004207b628a9a6b859c429f49a9a7ead9fd8161c1e60847aeef06dbd2"
|
||||
- name: BYTEDESK_JWT_EXPIRATION
|
||||
value: "2592000000"
|
||||
- name: BYTEDESK_JWT_REFRESH_TOKEN_EXPIRATION
|
||||
value: "5184000000"
|
||||
# 数据库配置
|
||||
- name: SPRING_DATASOURCE_URL
|
||||
value: "jdbc:mysql://mysql:3306/bytedesk_im?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true"
|
||||
- name: SPRING_DATASOURCE_USERNAME
|
||||
value: "root"
|
||||
- name: SPRING_DATASOURCE_PASSWORD
|
||||
value: "mssql@admin2025"
|
||||
- name: SPRING_JPA_HIBERNATE_DDL_AUTO
|
||||
value: "update"
|
||||
# Redis配置
|
||||
- name: SPRING_DATA_REDIS_HOST
|
||||
value: "redis"
|
||||
- name: SPRING_DATA_REDIS_PORT
|
||||
value: "6379"
|
||||
- name: SPRING_DATA_REDIS_PASSWORD
|
||||
value: "123456"
|
||||
- name: SPRING_DATA_REDIS_DATABASE
|
||||
value: "0"
|
||||
# 缓存配置
|
||||
- name: BYTEDESK_CACHE_LEVEL
|
||||
value: "0"
|
||||
- name: BYTEDESK_CACHE_PREFIX
|
||||
value: "bytedeskim"
|
||||
- name: BYTEDESK_CACHE_REDIS_STREAM_KEY
|
||||
value: "bytedeskim:stream"
|
||||
# 上传配置
|
||||
- name: BYTEDESK_UPLOAD_TYPE
|
||||
value: "local"
|
||||
- name: BYTEDESK_UPLOAD_DIR
|
||||
value: "/app/uploads"
|
||||
- name: BYTEDESK_UPLOAD_URL
|
||||
value: "http://59.211.236.64:30024"
|
||||
# 知识库配置
|
||||
- name: BYTEDESK_KBASE_THEME
|
||||
value: "default"
|
||||
- name: BYTEDESK_KBASE_HTML_PATH
|
||||
value: "helpcenter"
|
||||
- name: BYTEDESK_KBASE_API_URL
|
||||
value: "https://kf.gxzgt.com:9003"
|
||||
# Socket配置
|
||||
- name: BYTEDESK_SOCKET_HOST
|
||||
value: "0.0.0.0"
|
||||
- name: BYTEDESK_SOCKET_WEBSOCKET_PORT
|
||||
value: "9885"
|
||||
- name: BYTEDESK_SOCKET_LEAK_DETECTOR_LEVEL
|
||||
value: "SIMPLE"
|
||||
- name: BYTEDESK_SOCKET_PARENT_EVENT_LOOP_GROUP_THREAD_COUNT
|
||||
value: "1"
|
||||
- name: BYTEDESK_SOCKET_CHILD_EVENT_LOOP_GROUP_THREAD_COUNT
|
||||
value: "8"
|
||||
- name: BYTEDESK_SOCKET_MAX_PAYLOAD_SIZE
|
||||
value: "10240"
|
||||
- name: BYTEDESK_CLUSTER_ENABLED
|
||||
value: "false"
|
||||
# Druid配置
|
||||
- name: SPRING_DATASOURCE_DRUID_STAT_VIEW_SERVLET_LOGIN_USERNAME
|
||||
value: "admin@email.com"
|
||||
- name: SPRING_DATASOURCE_DRUID_STAT_VIEW_SERVLET_LOGIN_PASSWORD
|
||||
value: "admin"
|
||||
# Actuator配置
|
||||
- name: MANAGEMENT_ENDPOINTS_ENABLED_BY_DEFAULT
|
||||
value: "false"
|
||||
- name: MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE
|
||||
value: ""
|
||||
- name: MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_EXCLUDE
|
||||
value: "*"
|
||||
- name: MANAGEMENT_ENDPOINT_HEALTH_ENABLED
|
||||
value: "false"
|
||||
- name: MANAGEMENT_ENDPOINT_INFO_ENABLED
|
||||
value: "false"
|
||||
- name: MANAGEMENT_SERVER_PORT
|
||||
value: "-1"
|
||||
- name: MANAGEMENT_ENDPOINTS_WEB_BASE_PATH
|
||||
value: "/management"
|
||||
- name: SPRING_SECURITY_BASIC_ENABLED
|
||||
value: "true"
|
||||
# AI配置 - Ollama
|
||||
- name: SPRING_AI_MODEL_CHAT
|
||||
value: "zhupuai"
|
||||
- name: SPRING_AI_MODEL_EMBEDDING
|
||||
value: "zhupuai"
|
||||
- name: SPRING_AI_OLLAMA_BASE_URL
|
||||
value: "http://10.11.8.123:11434"
|
||||
- name: SPRING_AI_OLLAMA_CHAT_ENABLED
|
||||
value: "false"
|
||||
- name: SPRING_AI_OLLAMA_CHAT_OPTIONS_MODEL
|
||||
value: "qwen3:0.6b"
|
||||
- name: SPRING_AI_OLLAMA_CHAT_OPTIONS_TEMPERATURE
|
||||
value: "0.7"
|
||||
- name: SPRING_AI_OLLAMA_EMBEDDING_ENABLED
|
||||
value: "false"
|
||||
- name: SPRING_AI_OLLAMA_EMBEDDING_OPTIONS_MODEL
|
||||
value: "bge-m3:latest"
|
||||
- name: SPRING_AI_OLLAMA_INIT_PULL_MODEL_STRATEGY
|
||||
value: "when_missing"
|
||||
- name: SPRING_AI_OLLAMA_EMBEDDING_OPTIONS_MODEL_RERANK
|
||||
value: "bge-reranker-v2-m3:latest"
|
||||
# AI配置 - 智谱AI
|
||||
- name: SPRING_AI_ZHIPUAI_API_KEY
|
||||
value: "2e9995f1e58a47e6ad4a4d8449582a53.DlPmMSZTU6adnha1"
|
||||
- name: SPRING_AI_ZHIPUAI_CHAT_ENABLED
|
||||
value: "true"
|
||||
- name: SPRING_AI_ZHIPUAI_CHAT_OPTIONS_MODEL
|
||||
value: "glm-4-flash"
|
||||
- name: SPRING_AI_ZHIPUAI_CHAT_OPTIONS_TEMPERATURE
|
||||
value: "0.7"
|
||||
- name: SPRING_AI_ZHIPUAI_EMBEDDING_ENABLED
|
||||
value: "true"
|
||||
# AI配置 - Deepseek
|
||||
- name: SPRING_AI_DEEPSEEK_BASE_URL
|
||||
value: "https://api.deepseek.com"
|
||||
- name: SPRING_AI_DEEPSEEK_API_KEY
|
||||
value: "sk-xxx"
|
||||
- name: SPRING_AI_DEEPSEEK_CHAT_ENABLED
|
||||
value: "false"
|
||||
- name: SPRING_AI_DEEPSEEK_CHAT_OPTIONS_MODEL
|
||||
value: "deepseek-chat"
|
||||
- name: SPRING_AI_DEEPSEEK_CHAT_OPTIONS_TEMPERATURE
|
||||
value: "0.7"
|
||||
- name: SPRING_AI_DEEPSEEK_EMBEDDING_ENABLED
|
||||
value: "false"
|
||||
# AI配置 - OpenAI
|
||||
- name: SPRING_AI_OPENAI_BASE_URL
|
||||
value: "https://api.openai.com"
|
||||
- name: SPRING_AI_OPENAI_API_KEY
|
||||
value: "sk-xxx"
|
||||
- name: SPRING_AI_OPENAI_CHAT_ENABLED
|
||||
value: "false"
|
||||
- name: SPRING_AI_OPENAI_CHAT_OPTIONS_MODEL
|
||||
value: "gpt-4o"
|
||||
- name: SPRING_AI_OPENAI_CHAT_OPTIONS_TEMPERATURE
|
||||
value: "0.7"
|
||||
- name: SPRING_AI_OPENAI_EMBEDDING_ENABLED
|
||||
value: "false"
|
||||
# AI配置 - 阿里云
|
||||
- name: SPRING_AI_DASHSCOPE_BASE_URL
|
||||
value: "https://dashscope.aliyuncs.com/compatible-mode"
|
||||
- name: SPRING_AI_DASHSCOPE_API_KEY
|
||||
value: "sk-xxx"
|
||||
- name: SPRING_AI_DASHSCOPE_CHAT_ENABLED
|
||||
value: "false"
|
||||
- name: SPRING_AI_DASHSCOPE_CHAT_OPTIONS_MODEL
|
||||
value: "deepseek-r1"
|
||||
- name: SPRING_AI_DASHSCOPE_CHAT_OPTIONS_TEMPERATURE
|
||||
value: "0.7"
|
||||
- name: SPRING_AI_DASHSCOPE_AUDIO_TRANSCRIPTION_ENABLED
|
||||
value: "false"
|
||||
- name: SPRING_AI_DASHSCOPE_IMAGE_ENABLED
|
||||
value: "false"
|
||||
- name: SPRING_AI_DASHSCOPE_EMBEDDING_ENABLED
|
||||
value: "false"
|
||||
- name: SPRING_AI_DASHSCOPE_AUDIO_SYNTHESIS_ENABLED
|
||||
value: "false"
|
||||
- name: SPRING_AI_NACOS_PROMPT_TEMPLATE_ENABLED
|
||||
value: "false"
|
||||
# 其他AI服务配置...
|
||||
# (此处应包含所有其他AI服务配置,格式同上)
|
||||
# Elasticsearch配置
|
||||
- name: SPRING_ELASTICSEARCH_URIS
|
||||
value: "http://elasticsearch8:9200"
|
||||
- name: SPRING_ELASTICSEARCH_USERNAME
|
||||
value: "elastic"
|
||||
- name: SPRING_ELASTICSEARCH_PASSWORD
|
||||
value: "ykfsft20250805"
|
||||
- name: SPRING_AI_VECTORSTORE_ELASTICSEARCH_ENABLED
|
||||
value: "true"
|
||||
- name: SPRING_AI_VECTORSTORE_ELASTICSEARCH_INITIALIZE_SCHEMA
|
||||
value: "true"
|
||||
- name: SPRING_AI_VECTORSTORE_ELASTICSEARCH_INDEX_NAME
|
||||
value: "bytedesk_vs_index"
|
||||
- name: SPRING_AI_VECTORSTORE_ELASTICSEARCH_DIMENSIONS
|
||||
value: "1024"
|
||||
- name: SPRING_AI_VECTORSTORE_ELASTICSEARCH_SIMILARITY
|
||||
value: "cosine"
|
||||
# Artemis JMS配置
|
||||
- name: SPRING_ARTEMIS_MODE
|
||||
value: "native"
|
||||
- name: SPRING_ARTEMIS_BROKER_URL
|
||||
value: "tcp://activemq:61616"
|
||||
- name: SPRING_ARTEMIS_USER
|
||||
value: "admin"
|
||||
- name: SPRING_ARTEMIS_PASSWORD
|
||||
value: "admin"
|
||||
- name: SPRING_JMS_LISTENER_CONCURRENCY
|
||||
value: "1"
|
||||
- name: SPRING_JMS_LISTENER_MAX_CONCURRENCY
|
||||
value: "10"
|
||||
- name: SPRING_JMS_LISTENER_ACKNOWLEDGE_MODE
|
||||
value: "client"
|
||||
- name: SPRING_JMS_LISTENER_AUTO_STARTUP
|
||||
value: "true"
|
||||
- name: SPRING_JMS_LISTENER_MAX_ATTEMPTS
|
||||
value: "5"
|
||||
- name: SPRING_JMS_LISTENER_INITIAL_INTERVAL
|
||||
value: "1000"
|
||||
- name: SPRING_JMS_LISTENER_MAX_INTERVAL
|
||||
value: "10000"
|
||||
- name: SPRING_JMS_LISTENER_MULTIPLIER
|
||||
value: "2.0"
|
||||
- name: SPRING_JMS_LISTENER_RECEIVE_TIMEOUT
|
||||
value: "1000"
|
||||
- name: SPRING_ARTEMIS_EMBEDDED_QUEUES
|
||||
value: "DLQ"
|
||||
- name: SPRING_JMS_LISTENER_MISSING_QUEUES_FATAL
|
||||
value: "false"
|
||||
# 数据库连接池配置
|
||||
- name: SPRING_DATASOURCE_HIKARI_CONNECTION_TIMEOUT
|
||||
value: "60000"
|
||||
- name: SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE
|
||||
value: "10"
|
||||
# 微信支付配置
|
||||
- name: WECHAT_PAY_ENABLED
|
||||
value: "false"
|
||||
# 阿里云短信配置
|
||||
- name: ALIYUN_SMS_SIGNNAME
|
||||
value: ""
|
||||
- name: ALIYUN_SMS_TEMPLATECODE
|
||||
value: ""
|
||||
# 文档配置
|
||||
- name: SPRINGDOC_SHOW_ACTUATOR
|
||||
value: "false"
|
||||
- name: SPRINGDOC_SWAGGER_UI_ENABLED
|
||||
value: "true"
|
||||
- name: SPRINGDOC_SWAGGER_UI_PATH
|
||||
value: "/index.html"
|
||||
- name: SPRINGDOC_API_DOCS_ENABLED
|
||||
value: "true"
|
||||
- name: SPRINGDOC_API_DOCS_PATH
|
||||
value: "/v3/api-docs"
|
||||
- name: KNIFE4J_ENABLED
|
||||
value: "true"
|
||||
- name: KNIFE4J_SETTING_LANGUAGE
|
||||
value: "zh_cn"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 1
|
||||
memory: 2Gi
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 4Gi
|
||||
ports:
|
||||
- containerPort: 9003 # Core protocol
|
||||
- containerPort: 9885 # socket
|
||||
142
deploy/k8s/xinchuang/ykfui-conf.yaml
Normal file
142
deploy/k8s/xinchuang/ykfui-conf.yaml
Normal file
@@ -0,0 +1,142 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ykfui-conf
|
||||
namespace: ykf
|
||||
data:
|
||||
nginx.conf: |
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
events {
|
||||
worker_connections 102400;
|
||||
}
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
access_log /var/log/nginx/access.log main;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
root /usr/share/nginx/html/;
|
||||
index index.html index.htm index.nginx-debian.html;
|
||||
server_name _;
|
||||
location /api/ {
|
||||
proxy_pass http://ykfcore:9003;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
include fastcgi_params;
|
||||
}
|
||||
location /visitor/ {
|
||||
proxy_pass http://ykfcore:9003;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
include fastcgi_params;
|
||||
}
|
||||
location /config/ {
|
||||
proxy_pass http://ykfcore:9003;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
include fastcgi_params;
|
||||
}
|
||||
location /auth/ {
|
||||
proxy_pass http://ykfcore:9003;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
include fastcgi_params;
|
||||
}
|
||||
location /kaptcha/ {
|
||||
proxy_pass http://ykfcore:9003;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
include fastcgi_params;
|
||||
}
|
||||
location /stomp {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_pass http://ykfcore:9003/stomp;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
include fastcgi_params;
|
||||
}
|
||||
location /websocket {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_pass http://ykfcore:9885/websocket;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
include fastcgi_params;
|
||||
}
|
||||
location /download/ {
|
||||
alias /usr/share/nginx/html/download/;
|
||||
charset utf-8; # 设置字符编码为UTF-8,解决中文乱码问题
|
||||
autoindex on;
|
||||
autoindex_format html; #以html风格将目录展示在浏览器中
|
||||
autoindex_exact_size off; #切换为 off 后,以可读的方式显示文件大小,单位为 KB、MB 或者 GB
|
||||
autoindex_localtime on; #以服务器的文件时间作为显示的时间
|
||||
client_max_body_size 4048M;
|
||||
proxy_max_temp_file_size 4048M;
|
||||
proxy_send_timeout 600; #后端服务器数据回传时间(代理发送超时)
|
||||
proxy_read_timeout 600; #连接成功后,后端服务器响应时间(代理接收超时)
|
||||
if ($request_filename ~* ^.*?\.(txt|doc|pdf|rar|gz|zip|docx|exe|xlsx|ppt|pptx)$){
|
||||
add_header Content-Disposition attachment;
|
||||
}
|
||||
}
|
||||
location /admin/ {
|
||||
try_files $uri $uri/ /admin/index.html;
|
||||
}
|
||||
location /agent/ {
|
||||
try_files $uri $uri/ /agent/index.html;
|
||||
}
|
||||
location /chat/ {
|
||||
try_files $uri $uri/ /chat/index.html;
|
||||
}
|
||||
location /frame/ {
|
||||
try_files $uri $uri/ /chat/index.html;
|
||||
}
|
||||
location /docs/ {
|
||||
try_files $uri $uri/ /docs/index.html;
|
||||
}
|
||||
location /agenticflow/ {
|
||||
try_files $uri $uri/ /agenticflow/index.html;
|
||||
}
|
||||
location /notebase/ {
|
||||
try_files $uri $uri/ /notebase/index.html;
|
||||
}
|
||||
location /kanban/ {
|
||||
try_files $uri $uri/ /kanban/index.html;
|
||||
}
|
||||
location /helpcenter/ {
|
||||
try_files $uri $uri/ /helpcenter/index.html;
|
||||
}
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
add_header X-Via $server_addr;
|
||||
add_header X-Cache $upstream_cache_status;
|
||||
location @springboot {
|
||||
proxy_pass http://ykfcore:9003;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
include fastcgi_params;
|
||||
proxy_cache_valid 404 10m;
|
||||
}
|
||||
}
|
||||
}
|
||||
39
deploy/k8s/xinchuang/ykfui.yaml
Normal file
39
deploy/k8s/xinchuang/ykfui.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ykfui
|
||||
namespace: ykf
|
||||
labels:
|
||||
app: ykfui
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ykfui
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ykfui
|
||||
spec:
|
||||
containers:
|
||||
- name: ykfui
|
||||
image: easzlab.io.local:5000/dev/ykfui:20250807
|
||||
imagePullPolicy: IfNotPresent
|
||||
resources:
|
||||
requests:
|
||||
cpu: 0.5
|
||||
memory: 0.5Gi
|
||||
limits:
|
||||
cpu: 0.5
|
||||
memory: 0.5Gi
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- mountPath: /etc/nginx/nginx.conf
|
||||
name: nginx-conf
|
||||
subPath: nginx.conf
|
||||
volumes:
|
||||
- name: nginx-conf
|
||||
configMap:
|
||||
name: ykfui-conf
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2024-06-08 12:30:14
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2025-03-01 13:08:32
|
||||
* @LastEditTime: 2025-08-07 15:54:50
|
||||
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
|
||||
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
|
||||
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
|
||||
@@ -13,6 +13,8 @@
|
||||
*/
|
||||
package com.bytedesk.service.queue;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -21,6 +23,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
import com.bytedesk.core.base.BaseSpecification;
|
||||
import com.bytedesk.core.rbac.auth.AuthService;
|
||||
import com.bytedesk.core.topic.TopicUtils;
|
||||
|
||||
import jakarta.persistence.criteria.Predicate;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -29,19 +32,28 @@ import lombok.extern.slf4j.Slf4j;
|
||||
public class QueueSpecification extends BaseSpecification<QueueEntity, QueueRequest> {
|
||||
|
||||
public static Specification<QueueEntity> search(QueueRequest request, AuthService authService) {
|
||||
log.info("request: {}", request);
|
||||
// log.info("request: {}", request);
|
||||
return (root, query, criteriaBuilder) -> {
|
||||
List<Predicate> predicates = new ArrayList<>();
|
||||
predicates.add(criteriaBuilder.equal(root.get("deleted"), false));
|
||||
// 使用基类方法处理超级管理员权限和组织过滤
|
||||
addOrgFilterIfNotSuperUser(root, criteriaBuilder, predicates, request, authService);
|
||||
|
||||
// 根据nickname查询
|
||||
if (StringUtils.hasText(request.getNickname())) {
|
||||
predicates.add(criteriaBuilder.like(root.get("nickname"), "%" + request.getNickname() + "%"));
|
||||
}
|
||||
|
||||
if (StringUtils.hasText(request.getUserUid())) {
|
||||
predicates.add(criteriaBuilder.equal(root.get("userUid"), request.getUserUid()));
|
||||
// day
|
||||
if (StringUtils.hasText(request.getDay())) {
|
||||
predicates.add(criteriaBuilder.like(root.get("day"), "%" + request.getDay() + "%"));
|
||||
}
|
||||
// agentUid
|
||||
if (StringUtils.hasText(request.getAgentUid())) {
|
||||
String queueTopic = TopicUtils.getQueueTopicFromUid(request.getAgentUid());
|
||||
String today = LocalDate.now().format(DateTimeFormatter.ISO_DATE);
|
||||
// 根据topic + day查询
|
||||
predicates.add(criteriaBuilder.equal(root.get("topic"), queueTopic));
|
||||
predicates.add(criteriaBuilder.equal(root.get("day"), today));
|
||||
}
|
||||
|
||||
return criteriaBuilder.and(predicates.toArray(new Predicate[0]));
|
||||
|
||||
Reference in New Issue
Block a user