feat: 完成 issue #56 ⑥ Helm chart 参数化(资源/副本/域名/存储)
This commit is contained in:
@@ -29,6 +29,19 @@ spec:
|
||||
nodeSelector:
|
||||
ascend.com/npu: "true"
|
||||
{{- end }}
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml .Values.tolerations | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.image.serviceAccountName }}
|
||||
serviceAccountName: {{ .Values.image.serviceAccountName }}
|
||||
{{- end }}
|
||||
{{- if .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: inference
|
||||
image: "{{ include "iaop.image" . }}"
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{{- if .Values.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "iaop.fullname" . }}
|
||||
labels:
|
||||
{{- include "iaop.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "iaop.fullname" . }}
|
||||
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,22 @@
|
||||
# iAOP Helm Chart —— 开发/联调环境 values 覆盖示例(issue #56 多环境参数化)。
|
||||
# 用法:helm install iaop deploy/k8s/helm/iaop -f values.dev.yaml
|
||||
# 说明:仅覆盖与开发环境差异的键;其余继承 values.yaml 默认值。
|
||||
|
||||
# 开发环境:低副本、小资源、关 HPA(本地/联调)
|
||||
replicaCount: 1
|
||||
resources:
|
||||
requests:
|
||||
cpu: "1"
|
||||
memory: 4Gi
|
||||
limits:
|
||||
cpu: "4"
|
||||
memory: 16Gi
|
||||
autoscaling:
|
||||
enabled: false
|
||||
storage:
|
||||
size: 20Gi
|
||||
|
||||
# 域名入口(开发环境使用独立域名)
|
||||
ingress:
|
||||
enabled: true
|
||||
host: dev.iaop.example.com
|
||||
@@ -0,0 +1,35 @@
|
||||
# iAOP Helm Chart —— 生产环境 values 覆盖示例(issue #56 多环境参数化)。
|
||||
# 用法:helm install iaop deploy/k8s/helm/iaop -f values.prod.yaml
|
||||
# 说明:生产环境按 PRD 5.6 配置点固化:资源配额、副本/HPA、灰度、域名。
|
||||
|
||||
# 生产环境:多副本 + HPA、大资源、灰度滚动
|
||||
replicaCount: 3
|
||||
autoscaling:
|
||||
enabled: true
|
||||
minReplicas: 3
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 70
|
||||
rollingUpdate:
|
||||
maxUnavailable: 0
|
||||
maxSurge: 1
|
||||
resources:
|
||||
requests:
|
||||
cpu: "2"
|
||||
memory: 8Gi
|
||||
limits:
|
||||
cpu: "8"
|
||||
memory: 32Gi
|
||||
storage:
|
||||
enabled: true
|
||||
className: "" # 生产建议指定 SSD StorageClass
|
||||
size: 200Gi
|
||||
|
||||
# 域名入口(生产域名 + 证书)
|
||||
ingress:
|
||||
enabled: true
|
||||
host: iaop.example.com
|
||||
|
||||
# 私有镜像仓库凭据(生产必需)
|
||||
image:
|
||||
pullSecrets:
|
||||
- iaop-registry-secret
|
||||
@@ -10,6 +10,10 @@ image:
|
||||
repository: iaop/inference
|
||||
tag: v1.0.0
|
||||
pullPolicy: IfNotPresent
|
||||
# 私有仓库拉取凭据(imagePullSecrets)
|
||||
pullSecrets: []
|
||||
# 服务账户(缺省 = release 名;自定义请先创建)
|
||||
serviceAccountName: ""
|
||||
|
||||
# ---- 推理后端选择(PRD 5.6 配置点:切换后端仅改此处) ----
|
||||
inference:
|
||||
@@ -28,6 +32,16 @@ rollingUpdate:
|
||||
maxUnavailable: 0
|
||||
maxSurge: 1
|
||||
|
||||
# ---- 水平自动扩缩(HPA;副本参数化扩展,issue #56) ----
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 2
|
||||
maxReplicas: 8
|
||||
targetCPUUtilizationPercentage: 70
|
||||
|
||||
# ---- 节点调度(可选) ----
|
||||
tolerations: [] # 容忍度(如 GPU/NPU 专用节点污点)
|
||||
|
||||
# ---- 服务 ----
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
Reference in New Issue
Block a user