Files
charts/bitnami/milvus/templates/data-coordinator/service.yaml
Carlos Rodríguez Hernández ba40e46ec6 [bitnami/milvus] Bump kafka major version and update license header (#17538)
Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
2023-07-10 09:27:23 +02:00

78 lines
3.7 KiB
YAML

{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.dataCoord.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "milvus.data-coordinator.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/part-of: milvus
app.kubernetes.io/component: data-coordinator
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.commonAnnotations .Values.dataCoord.service.annotations }}
annotations:
{{- if .Values.dataCoord.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.dataCoord.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if and .Values.dataCoord.metrics.enabled .Values.dataCoord.metrics.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.dataCoord.metrics.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.dataCoord.service.type }}
{{- if .Values.dataCoord.service.sessionAffinity }}
sessionAffinity: {{ .Values.dataCoord.service.sessionAffinity }}
{{- end }}
{{- if .Values.dataCoord.service.sessionAffinityConfig }}
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.dataCoord.service.sessionAffinityConfig "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.dataCoord.service.clusterIP }}
clusterIP: {{ .Values.dataCoord.service.clusterIP }}
{{- end }}
{{- if (or (eq .Values.dataCoord.service.type "LoadBalancer") (eq .Values.dataCoord.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.dataCoord.service.externalTrafficPolicy | quote }}
{{- end }}
{{ if eq .Values.dataCoord.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.dataCoord.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.dataCoord.service.type "LoadBalancer") (not (empty .Values.dataCoord.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.dataCoord.service.loadBalancerIP }}
{{- end }}
ports:
- name: grpc
port: {{ .Values.dataCoord.service.ports.grpc }}
targetPort: grpc
protocol: TCP
{{- if (and (or (eq .Values.dataCoord.service.type "NodePort") (eq .Values.dataCoord.service.type "LoadBalancer")) (not (empty .Values.dataCoord.service.nodePorts.grpc))) }}
nodePort: {{ .Values.dataCoord.service.nodePorts.grpc }}
{{- else if eq .Values.dataCoord.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- if .Values.dataCoord.metrics.enabled }}
- name: http-metrics
port: {{ .Values.dataCoord.service.ports.metrics }}
targetPort: http-metrics
protocol: TCP
{{- if (and (or (eq .Values.dataCoord.service.type "NodePort") (eq .Values.dataCoord.service.type "LoadBalancer")) (not (empty .Values.dataCoord.service.nodePorts.metrics))) }}
nodePort: {{ .Values.dataCoord.service.nodePorts.metrics }}
{{- else if eq .Values.dataCoord.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- end }}
{{- if .Values.dataCoord.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.dataCoord.service.extraPorts "context" $) | nindent 4 }}
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/part-of: milvus
app.kubernetes.io/component: data-coordinator
{{- end }}