源码快照 @ 2026-09-02 (source-only, 剔除非源码素材)
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
{{- include "openwork-ee.customCa.validate" . }}
|
||||
{{- if .Values.inference.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "openwork-ee.inferenceServiceName" . }}
|
||||
labels:
|
||||
{{- include "openwork-ee.componentLabels" (dict "root" . "component" "inference") | nindent 4 }}
|
||||
{{- with .Values.inference.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.inference.service.type }}
|
||||
{{- with .Values.inference.service.loadBalancerClass }}
|
||||
loadBalancerClass: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.inference.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.inference.service.port }}
|
||||
targetPort: http
|
||||
selector:
|
||||
{{- include "openwork-ee.componentSelectorLabels" (dict "root" . "component" "inference") | nindent 4 }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "openwork-ee.fullname" . }}-inference
|
||||
labels:
|
||||
{{- include "openwork-ee.componentLabels" (dict "root" . "component" "inference") | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.inference.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "openwork-ee.componentSelectorLabels" (dict "root" . "component" "inference") | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "openwork-ee.componentSelectorLabels" (dict "root" . "component" "inference") | nindent 8 }}
|
||||
{{- with .Values.inference.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
|
||||
{{- with .Values.inference.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.customCa.enabled }}
|
||||
volumes:
|
||||
{{- include "openwork-ee.customCa.volume" . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: inference
|
||||
image: "{{ .Values.inference.image.repository }}:{{ default .Values.image.tag .Values.inference.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.inference.containerPort }}
|
||||
{{- if .Values.customCa.enabled }}
|
||||
volumeMounts:
|
||||
{{- include "openwork-ee.customCa.volumeMount" . | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "openwork-ee.configName" . }}
|
||||
- secretRef:
|
||||
name: {{ include "openwork-ee.secretName" . }}
|
||||
env:
|
||||
- name: PORT
|
||||
value: {{ .Values.inference.containerPort | quote }}
|
||||
{{- if .Values.customCa.enabled }}
|
||||
{{- include "openwork-ee.customCa.env" . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.inference.env }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $value | quote }}
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
{{- toYaml .Values.inference.probes.liveness | nindent 12 }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: http
|
||||
{{- toYaml .Values.inference.probes.readiness | nindent 12 }}
|
||||
{{- with .Values.inference.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user