first backup of charts

This commit is contained in:
Ivan087
2025-09-23 10:01:17 +08:00
commit cbfc0104a6
170 changed files with 17788 additions and 0 deletions

23
jarvis/jarvis/.helmignore Normal file
View File

@ -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/

24
jarvis/jarvis/Chart.yaml Normal file
View File

@ -0,0 +1,24 @@
apiVersion: v2
name: jarvis
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.1.0
# 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: "1.16.0"

View File

@ -0,0 +1,22 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "jarvis.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "jarvis.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "jarvis.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "jarvis.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}

View File

@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "jarvis.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 "jarvis.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 "jarvis.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "jarvis.labels" -}}
helm.sh/chart: {{ include "jarvis.chart" . }}
{{ include "jarvis.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "jarvis.selectorLabels" -}}
app.kubernetes.io/name: {{ include "jarvis.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "jarvis.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "jarvis.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,17 @@
# pv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Release.Name }}-pv # PV 的名称,可以自定义
spec:
storageClassName: local-path # 添加这一行与上面StorageClass的名称一致
capacity:
storage: 500Gi # PV 的容量,可以根据 NFS 共享的实际大小或预期使用量调整
accessModes:
- ReadWriteMany # 访问模式:
persistentVolumeReclaimPolicy: Retain
nfs:
path: /volume1/Dataset/PVStore/lab-data-dataset-pvc-ec4aba12-c683-4168-b335-7b1a8819581a/Private/cache-images # NFS 服务器上共享的路径
server: 10.6.80.11 # NFS 服务器的 IP 地址或主机名

View File

@ -0,0 +1,14 @@
# pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-pvc # PVC 的名称Pod 会引用这个名称
#namespace: default # PVC 所在的命名空间,通常是 default 或你自定义的命名空间
spec:
storageClassName: local-path # 添加这一行与PV和StorageClass的名称一致
accessModes:
- ReadWriteMany # 访问模式,必须与 PV 的 accessModes 匹配或更宽松
resources:
requests:
storage: 50Gi # PVC 请求的存储容量,必须小于或等于 PV 的容量
volumeName: {{ .Release.Name }}-pv # 明确指定要绑定的 PV 的名称,这是手动绑定 PV 的关键

View File

@ -0,0 +1,68 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: jarvis-adapter-deployment
# namespace: jarvis-models
labels:
app: jarvis-adapter
spec:
replicas: 1
selector:
matchLabels:
app: jarvis-adapter
template:
metadata:
labels:
app: jarvis-adapter
spec:
#hostNetwork: true
# --- START: Add this section for image pull secrets ---
imagePullSecrets:
- name: regcred # This MUST match the name of the secret you just created
# --- END: Add this section ---
containers:
- name: jarvis-adapter
image: {{ .Values.jarvis_adapter.image }}
imagePullPolicy: IfNotPresent # Ensure it always tries to pull, especially on first deploy
env:
- name: INFERENCE_ENDPOINT
value: {{ .Values.jarvis_adapter.endpoint }}
ports:
- containerPort: 5000 # The port your application listens on inside the container
#hostPort: 8880 # The port on the host machine (--network=host combined with -p 8880:8080)
protocol: TCP
resources: # Add this section
requests:
cpu: 100m # Example: 100 millicores (0.1 CPU)
memory: 256Mi # Example: 128 mebibytes
limits:
cpu: 500m # Example: Limit to 500 millicores (0.5 CPU)
memory: 512Mi # Example: Limit to 512 mebibytes
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: llm-blackbox
# namespace: jarvis-models
labels:
app: jarvis-adapter
spec:
selector:
app: jarvis-adapter
ports:
- protocol: TCP
port: 80
targetPort: 5000
type: NodePort

View File

@ -0,0 +1,85 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: jarvis-api-deployment
# namespace: jarvis-models
labels:
app: jarvis-api
spec:
replicas: 1
selector:
matchLabels:
app: jarvis-api
template:
metadata:
labels:
app: jarvis-api
spec:
#hostNetwork: true
# --- START: Add this section for image pull secrets ---
imagePullSecrets:
- name: regcred # This MUST match the name of the secret you just created
# --- END: Add this section ---
containers:
- name: jarvis-api
image: {{ .Values.jarvis_api.image }}
imagePullPolicy: IfNotPresent # Ensure it always tries to pull, especially on first deploy
ports:
- containerPort: 8080 # The port your application listens on inside the container
#hostPort: 8880 # The port on the host machine (--network=host combined with -p 8880:8080)
protocol: TCP
resources: # Add this section
requests:
cpu: 100m # Example: 100 millicores (0.1 CPU)
memory: 256Mi # Example: 128 mebibytes
limits:
cpu: 500m # Example: Limit to 500 millicores (0.5 CPU)
memory: 512Mi # Example: Limit to 512 mebibytes
volumeMounts:
- name: env-config-volume
mountPath: /.env.yml
subPath: .env.yml
readOnly: true
- name: images-data
mountPath: /images
volumes:
- name: env-config-volume
#hostPath:
# path: /Workspace/HDD1/code/jarvis-api/.env.yml # Host path for .env.yml
# type: FileOrCreate
configMap:
name: {{ .Release.Name }}-cm # This MUST match the name of the ConfigMap you created
items:
- key: .api.env.yml # This is the key defined in the ConfigMap's data section
path: .env.yml # This is the filename inside the mountPath (e.g., /.env.yml)
- name: images-data
persistentVolumeClaim:
claimName: {{ .Release.Name }}-pvc
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-api-service
# namespace: jarvis-models
labels:
app: jarvis-api
spec:
selector:
app: jarvis-api
ports:
- protocol: TCP
port: 8080
targetPort: 8080
type: NodePort

View File

@ -0,0 +1,183 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-cm # Name of your ConfigMap
# namespace: jarvis-models # Ensure this matches your Deployment's namespace
data:
.api.env.yml: | # The key here will be the filename in the pod (e.g., /.env.yml)
database:
host: 10.6.14.130
port: 3306
username: jarvis
password: boardwarejarvis
database: jarvis
jwt:
secret: secretkey
users:
- username: jarvis
password: boardwarejarvis
- username: user
password: boardwareuser
- username: g2e
password: g2e
- username: vera
password: vera
- username: ivan
password: ivan
blackbox:
mode: 0 # 0: /?blackbox=models, 1: /models-blackbox
url: http://jarvis-model-service
port: 8080
vad:
url: http://vad-blackbox
asr:
url: http://asr-blackbox
llm:
url: http://llm-blackbox
vlm:
url: http://vlm-blackbox
tts:
url: http://tts-blackbox
chatllama:
url: http://chatllama-blackbox
chroma:
upsert_url: http://chroma-blackbox/upsert
env: dev
authentik:
redirectUri: http://10.6.14.130:4200
baseUrl: https://authentik.universalmacro.com
clientId: xxx
clientSecret: xxx
server:
port: 8080
# log:
# path: "/Workspace/Logging/logtime.out"
log:
loki:
# url: "https://103.192.46.20:27002/laas/1868865592451137536/loki/api/v1/push"
url: "https://loki.bwgdi.com/loki/api/v1/push"
x-odin-auth: "log_m7uxtqtru2318hbaoonf9wgjy8chcnebhwhl0wncsvfctu2ppn9m53q6p3i3"
labels:
app: jarvis
env: dev
location: "k3s_gdi"
model:
tts:
url: http://10.6.14.130:8000/?blackbox_name=tts
tts_model_name: melotts
tts_stream: false
streaming:
url: http://10.6.14.130:8000/?blackbox_name=chat
vlms_url: http://10.6.14.130:8000/?blackbox_name=vlms
.models.env.yml: | # The key here will be the filename in the pod (e.g., /.env.yml)
env:
version: 0.0.1
host: 0.0.0.0
port: 8000
log:
level: debug
time_format: "%Y-%m-%d %H:%M:%S"
filename: "./jarvis-models.log"
loki:
url: "https://loki.bwgdi.com/loki/api/v1/push"
labels:
app: jarvis
env: dev
location: "k3s_gdi"
layer: models
melotts:
mode: local # or docker
url: http://10.6.44.141:18080/convert/tts
speed: 0.9
device: 'cuda:0'
language: 'ZH'
speaker: 'ZH'
cosyvoicetts:
mode: local # or docker
url: http://10.6.44.141:18080/convert/tts
speed: 0.9
device: 'cuda:0'
language: '粤语女'
speaker: 'ZH'
sovitstts:
mode: docker
url: http://10.6.80.90:9880/tts
speed: 0.9
device: 'cuda:0'
language: 'ZH'
speaker: 'ZH'
text_lang: "yue"
ref_audio_path: "output/slicer_opt/Ricky-Wong/Ricky-Wong-3-Mins.wav_0006003840_0006134080.wav"
prompt_lang: "yue"
prompt_text: "你失敗咗點算啊?你而家安安穩穩,點解要咁樣做呢?"
text_split_method: "cut5"
batch_size: 1
media_type: "wav"
streaming_mode: True
sensevoiceasr:
mode: local # or docker
url: http://10.6.44.141:18080/convert/tts
speed: 0.9
device: 'cuda:0'
language: '粤语女'
speaker: 'ZH'
tesou:
url: http://120.196.116.194:48891/chat/
TokenIDConverter:
token_path: src/asr/resources/models/token_list.pkl
unk_symbol: <unk>
CharTokenizer:
symbol_value:
space_symbol: <space>
remove_non_linguistic_symbols: false
WavFrontend:
cmvn_file: src/asr/resources/models/am.mvn
frontend_conf:
fs: 16000
window: hamming
n_mels: 80
frame_length: 25
frame_shift: 10
lfr_m: 7
lfr_n: 6
filter_length_max: -.inf
dither: 0.0
Model:
model_path: src/asr/resources/models/model.onnx
use_cuda: false
CUDAExecutionProvider:
device_id: 0
arena_extend_strategy: kNextPowerOfTwo
cudnn_conv_algo_search: EXHAUSTIVE
do_copy_in_default_stream: true
batch_size: 3
blackbox:
lazyloading: true
vlms:
urls:
qwen_vl: http://vl-svc
vlm: http://vl-svc:8080
path:
chroma_rerank_embedding_model: /Model/BAAI
cosyvoice_path: /Voice/CosyVoice
cosyvoice_model_path: /Voice/CosyVoice/pretrained_models
sensevoice_model_path: /Voice/SenseVoice/SenseVoiceSmall

View File

@ -0,0 +1,96 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: jarvis-model-deployment
# namespace: jarvis-models
labels:
app: jarvis-model
spec:
replicas: 1
selector:
matchLabels:
app: jarvis-model
template:
metadata:
labels:
app: jarvis-model
spec:
#hostNetwork: true
# --- START: Add this section for image pull secrets ---
imagePullSecrets:
- name: regcred # This MUST match the name of the secret you just created
# --- END: Add this section ---
runtimeClassName: nvidia
containers:
- name: jarvis-model
image: {{ .Values.jarvis_model.image }}
imagePullPolicy: IfNotPresent # Ensure it always tries to pull, especially on first deploy
# command: ["sleep", "infinity"]
ports:
- containerPort: 8000 # The port your application listens on inside the container
#hostPort: 8880 # The port on the host machine (--network=host combined with -p 8880:8080)
protocol: TCP
resources: # Add this section
requests:
cpu: 1 # Example: 100 millicores (0.1 CPU)
memory: 512Mi # Example: 128 mebibytes
limits:
cpu: 2 # Example: Limit to 500 millicores (0.5 CPU)
memory: 1Gi # Example: Limit to 512 mebibytes
nvidia.com/gpu: 1
volumeMounts:
- name: env-config-volume
mountPath: /jarvis-models/.env.yaml
subPath: .env.yaml
readOnly: true
- name: nfs-volume
subPath: Weight
mountPath: /Model
- name: nfs-volume
subPath: Voice
mountPath: /Voice
volumes:
- name: env-config-volume
#hostPath:
# path: /Workspace/HDD1/code/jarvis-api/.env.yml # Host path for .env.yml
# type: FileOrCreate
configMap:
name: {{ .Release.Name }}-cm # This MUST match the name of the ConfigMap you created
items:
- key: .models.env.yml # This is the key defined in the ConfigMap's data section
path: .env.yaml # This is the filename inside the mountPath (e.g., /.env.yml)
- name: nfs-volume
nfs :
server: "10.6.80.11"
path: "/volume1/Dataset/PVStore/lab-data-model-pvc-c0beeab1-6dd5-4c6a-bd2c-6ce9e114c25e/"
#{{- range .Values.volumes }}
#- {{ . | toYaml | nindent 10 | trim }}
#{{- 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 }}
---
apiVersion: v1
kind: Service
metadata:
name: jarvis-model-service
# namespace: jarvis-models
labels:
app: jarvis-model
spec:
selector:
app: jarvis-model
ports:
- protocol: TCP
port: 8080
targetPort: 8000
type: NodePort

87
jarvis/jarvis/values.yaml Normal file
View File

@ -0,0 +1,87 @@
# Default values for jarvis.
# 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
jarvis_api:
image: harbor.bwgdi.com/library/jarvis-api:1.0.9
jarvis_model:
image: harbor.bwgdi.com/library/jarvis-models:0.0.1
jarvis_adapter:
image: harbor.bwgdi.com/library/adapter-test:0.0.1
endpoint: "http://vllm-leader-nodeport: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 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: 80
# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
# Additional volumes on the output Deployment definition.
volumes:
- name: nfs-volume
nfs:
server: "10.6.80.11"
path: "/volume1/Dataset/PVStore/lab-data-model-pvc-c0beeab1-6dd5-4c6a-bd2c-6ce9e114c25e/"
# - 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: {}

43
jarvis/metadata.yaml Normal file
View File

@ -0,0 +1,43 @@
application_name: &application_name jarvis
distributed:
method: helm
release_name: *application_name
chart: jarvis
sets:
jarvis_api:
image: harbor.bwgdi.com/library/jarvis-api:1.0.9
jarvis_adapter:
image: harbor.bwgdi.com/library/adapter-test:0.0.1
endpoint: "http://vllm-leader-nodeport:8080"
nodeSelector: {}
svc:
svc_type: NodePort
protocol: http
hostname: 10.6.14.123
servicename: jarvis-api-service
port: 30083
url: ~
pod:
name: jarvis-
monolithic:
method: helm
release_name: *application_name
chart: jarvis
sets:
jarvis_api:
image: harbor.bwgdi.com/library/jarvis-api:1.0.9
jarvis_adapter:
image: harbor.bwgdi.com/library/adapter-test:0.0.1
endpoint: "http://vllm-leader-nodeport:8080"
nodeSelector: {}
svc:
svc_type: NodePort
protocol: http
hostname: 10.6.14.123
servicename: jarvis-api-service
port: 30083
url: ~
pod:
name: jarvis-