You've already forked DataMate
224 lines
8.4 KiB
YAML
224 lines
8.4 KiB
YAML
{{- if and .Values.rootCoordinator.enabled .Values.cluster.enabled }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "milvus.rootcoord.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{ include "milvus.labels" . | indent 4 }}
|
|
component: "rootcoord"
|
|
{{ include "milvus.ud.labels" . | indent 4 }}
|
|
annotations:
|
|
{{ include "milvus.ud.annotations" . | indent 4 }}
|
|
|
|
spec:
|
|
{{- if ge (int .Values.rootCoordinator.replicas) 0 }}
|
|
replicas: {{ .Values.rootCoordinator.replicas }}
|
|
{{- end }}
|
|
{{- if .Values.rootCoordinator.activeStandby.enabled}}
|
|
{{- with .Values.rootCoordinator.strategy }}
|
|
strategy:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- else }}
|
|
strategy:
|
|
type: Recreate
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{ include "milvus.matchLabels" . | indent 6 }}
|
|
component: "rootcoord"
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{ include "milvus.matchLabels" . | indent 8 }}
|
|
component: "rootcoord"
|
|
{{ include "milvus.ud.labels" . | indent 8 }}
|
|
annotations:
|
|
{{- if .Values.rootCoordinator.profiling.enabled }}
|
|
pyroscope.io/scrape: "true"
|
|
pyroscope.io/application-name: {{ template "milvus.rootcoord.fullname" . }}
|
|
pyroscope.io/port: "9091"
|
|
{{- end }}
|
|
{{- if .Values.rootCoordinator.annotations }}
|
|
{{- toYaml .Values.rootCoordinator.annotations | nindent 8 }}
|
|
{{- end }}
|
|
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
|
{{ include "milvus.ud.annotations" . | indent 8 }}
|
|
spec:
|
|
serviceAccountName: {{ include "milvus.serviceAccount" . }}
|
|
{{- if .Values.image.all.pullSecrets }}
|
|
imagePullSecrets:
|
|
{{- range .Values.image.all.pullSecrets }}
|
|
- name: {{ . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
initContainers:
|
|
{{- if .Values.rootCoordinator.heaptrack.enabled }}
|
|
- name: heaptrack
|
|
command:
|
|
- /bin/bash
|
|
- -c
|
|
- "cp -r /opt/heaptrack /milvus/tools"
|
|
image: "{{ .Values.heaptrack.image.repository }}:{{ .Values.heaptrack.image.tag }}"
|
|
imagePullPolicy: {{ .Values.heaptrack.image.pullPolicy }}
|
|
{{ if and (.Values.containerSecurityContext) (not .Values.rootCoordinator.containerSecurityContext) }}
|
|
securityContext:
|
|
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
|
{{ end }}
|
|
{{ if .Values.rootCoordinator.containerSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml .Values.rootCoordinator.containerSecurityContext | nindent 12 }}
|
|
{{ end }}
|
|
volumeMounts:
|
|
- mountPath: /milvus/tools
|
|
name: tools
|
|
{{- end }}
|
|
containers:
|
|
- name: rootcoord
|
|
image: "{{ .Values.image.all.repository }}:{{ .Values.image.all.tag }}"
|
|
imagePullPolicy: {{ .Values.image.all.pullPolicy }}
|
|
{{ if and (.Values.containerSecurityContext) (not .Values.rootCoordinator.containerSecurityContext) }}
|
|
securityContext:
|
|
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
|
{{ end }}
|
|
{{ if .Values.rootCoordinator.containerSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml .Values.rootCoordinator.containerSecurityContext | nindent 12 }}
|
|
{{ end }}
|
|
{{- if .Values.rootCoordinator.heaptrack.enabled }}
|
|
args: [ "/milvus/tools/heaptrack/bin/heaptrack", "milvus", "run", "rootcoord" ]
|
|
{{- else }}
|
|
args: [ "milvus", "run", "rootcoord" ]
|
|
{{- end }}
|
|
env:
|
|
{{- if and .Values.streaming .Values.streaming.enabled }}
|
|
- name: MILVUS_STREAMING_SERVICE_ENABLED
|
|
value: "1"
|
|
{{- end }}
|
|
{{- if .Values.rootCoordinator.heaptrack.enabled }}
|
|
- name: LD_LIBRARY_PATH
|
|
value: /milvus/tools/heaptrack/lib:/milvus/lib:/usr/lib
|
|
{{- end }}
|
|
{{- if .Values.rootCoordinator.extraEnv }}
|
|
{{- toYaml .Values.rootCoordinator.extraEnv | nindent 8 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: rootcoord
|
|
containerPort: 53100
|
|
protocol: TCP
|
|
- name: metrics
|
|
containerPort: 9091
|
|
protocol: TCP
|
|
{{- if .Values.livenessProbe.enabled }}
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: metrics
|
|
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
|
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
|
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
|
{{- end }}
|
|
{{- if .Values.readinessProbe.enabled }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: metrics
|
|
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
|
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
|
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.rootCoordinator.resources | nindent 10 }}
|
|
volumeMounts:
|
|
{{- if .Values.customConfigMap }}
|
|
- name: milvus-config
|
|
mountPath: /milvus/configs/user.yaml
|
|
subPath: milvus.yaml
|
|
readOnly: true
|
|
{{- else }}
|
|
- name: milvus-config
|
|
mountPath: /milvus/configs/default.yaml
|
|
subPath: default.yaml
|
|
readOnly: true
|
|
- name: milvus-config
|
|
mountPath: /milvus/configs/user.yaml
|
|
subPath: user.yaml
|
|
readOnly: true
|
|
{{- end }}
|
|
{{- if .Values.log.persistence.enabled }}
|
|
- name: milvus-logs-disk
|
|
mountPath: {{ .Values.log.persistence.mountPath | quote }}
|
|
subPath: {{ .Values.log.persistence.persistentVolumeClaim.subPath | default "" }}
|
|
{{- end }}
|
|
- mountPath: /milvus/tools
|
|
name: tools
|
|
{{- if .Values.volumeMounts }}
|
|
{{- toYaml .Values.volumeMounts | nindent 8 }}
|
|
{{- end}}
|
|
|
|
{{- if and (.Values.nodeSelector) (not .Values.rootCoordinator.nodeSelector) }}
|
|
nodeSelector:
|
|
{{ toYaml .Values.nodeSelector | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.rootCoordinator.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml .Values.rootCoordinator.nodeSelector | indent 8 }}
|
|
{{- end }}
|
|
{{- if and (.Values.affinity) (not .Values.rootCoordinator.affinity) }}
|
|
affinity:
|
|
{{ toYaml .Values.affinity | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.rootCoordinator.affinity }}
|
|
affinity:
|
|
{{ toYaml .Values.rootCoordinator.affinity | indent 8 }}
|
|
{{- end }}
|
|
{{- if and (.Values.tolerations) (not .Values.rootCoordinator.tolerations) }}
|
|
tolerations:
|
|
{{ toYaml .Values.tolerations | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.rootCoordinator.tolerations }}
|
|
tolerations:
|
|
{{ toYaml .Values.rootCoordinator.tolerations | indent 8 }}
|
|
{{- end }}
|
|
|
|
{{- if and (.Values.topologySpreadConstraints) (not .Values.rootCoordinator.topologySpreadConstraints) }}
|
|
topologySpreadConstraints:
|
|
{{ toYaml .Values.topologySpreadConstraints | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.rootCoordinator.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{ toYaml .Values.rootCoordinator.topologySpreadConstraints | indent 8 }}
|
|
{{- end }}
|
|
{{- if and (.Values.securityContext) (not .Values.rootCoordinator.securityContext) }}
|
|
securityContext:
|
|
{{ toYaml .Values.securityContext | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.rootCoordinator.securityContext }}
|
|
securityContext:
|
|
{{ toYaml .Values.rootCoordinator.securityContext | indent 8 }}
|
|
{{- end }}
|
|
|
|
volumes:
|
|
- name: milvus-config
|
|
configMap:
|
|
{{- if .Values.customConfigMap }}
|
|
name: {{ .Values.customConfigMap }}
|
|
{{- else }}
|
|
name: {{ template "milvus.fullname" . }}
|
|
{{- end }}
|
|
{{- if .Values.log.persistence.enabled }}
|
|
- name: milvus-logs-disk
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Values.log.persistence.persistentVolumeClaim.existingClaim | default (printf "%s-logs" (include "milvus.fullname" . | trunc 58)) }}
|
|
{{- end }}
|
|
- name: tools
|
|
emptyDir: {}
|
|
{{- if .Values.volumes }}
|
|
{{- toYaml .Values.volumes | nindent 6 }}
|
|
{{- end}}
|
|
{{- end }}
|