Files
GenAIExamples/DocSum/kubernetes/helm-charts/templates/deployment.yaml
letonghan 7d779513f5 add docsum helm charts
Signed-off-by: letonghan <letong.han@intel.com>
2024-11-08 16:04:29 +08:00

82 lines
2.6 KiB
YAML

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "docsum.fullname" . }}
labels:
{{- include "docsum.labels" . | nindent 4 }}
app: {{ include "docsum.fullname" . }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "docsum.selectorLabels" . | nindent 6 }}
app: {{ include "docsum.fullname" . }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "docsum.selectorLabels" . | nindent 8 }}
app: {{ include "docsum.fullname" . }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Release.Name }}
env:
- name: LLM_SERVICE_HOST_IP
{{- if .Values.LLM_SERVICE_HOST_IP }}
value: {{ .Values.LLM_SERVICE_HOST_IP | quote}}
{{- else }}
value: {{ .Release.Name }}-llm-uservice
{{- end }}
#- name: MEGA_SERVICE_PORT
# value: {{ .Values.port }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- mountPath: /tmp
name: tmp
ports:
- name: docsum
containerPort: {{ .Values.port }}
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: tmp
emptyDir: {}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.evenly_distributed }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
{{- include "docsum.selectorLabels" . | nindent 14 }}
app: {{ include "docsum.fullname" . }}
{{- end }}