Files
file/label-studio/templates/service.yaml
thaoduc 4c123eee1b asd
2025-10-08 23:37:43 +07:00

36 lines
1.1 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: {{ include "ls-app.fullname" . }}
labels:
{{- include "ls-app.labels" . | nindent 4 }}
{{- with .Values.app.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.app.service.type }}
ports:
- port: {{ .Values.app.service.port }}
targetPort: {{ .Values.app.service.targetPort }}
protocol: TCP
name: {{ .Values.app.service.portName }}
{{- if and .Values.metrics.enabled .Values.metrics.uwsgiExporter.enabled }}
- port: 9117
targetPort: "uwsgimetrics"
protocol: "TCP"
name: "uwsgimetrics"
{{- end }}
{{- if and .Values.metrics.enabled }}
- port: 8000
targetPort: "djangometrics"
protocol: "TCP"
name: "djangometrics"
{{- end }}
selector:
{{- include "ls-app.selectorLabels" . | nindent 4 }}
sessionAffinity: {{ .Values.app.service.sessionAffinity }}
{{- if .Values.app.service.sessionAffinityConfig }}
sessionAffinityConfig:
{{- toYaml .Values.app.service.sessionAffinityConfig | nindent 4 }}
{{- end }}