Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/milvus] Fix milvus config #21013

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bitnami/milvus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ maintainers:
name: milvus
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/milvus
version: 5.0.0
version: 5.2.0
2 changes: 2 additions & 0 deletions bitnami/milvus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ The command removes all the Kubernetes components associated with the chart and
| `milvus.auth.existingSecret` | Name of a secret containing the Milvus password | `""` |
| `milvus.auth.existingSecretPasswordKey` | Name of the secret key containing the Milvus password | `""` |
| `milvus.defaultConfig` | Milvus components default configuration | `""` |
| `milvus.logConfig` | Milvus components default logging configuration | `""` |
| `milvus.extraConfig` | Extra configuration parameters | `{}` |
| `milvus.existingConfigMap` | name of a ConfigMap with existing configuration for the default configuration | `""` |
| `milvus.existingLogConfigMap` | name of a ConfigMap with existing configuration for the logging configuration | `""` |
| `milvus.extraConfigExistingConfigMap` | name of a ConfigMap with existing configuration for the Dashboard | `""` |
| `initJob.forceRun` | Force the run of the credential job | `false` |
| `initJob.image.registry` | PyMilvus image registry | `REGISTRY_NAME` |
Expand Down
11 changes: 11 additions & 0 deletions bitnami/milvus/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,13 @@ Get the secret password key
{{- end -}}
{{- end -}}

{{/*
Return the proper Milvus log configmap fullname
*/}}
{{- define "milvus.logConfigmapName" -}}
{{- printf "%s-log" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Get the common configuration configmap.
*/}}
Expand Down Expand Up @@ -960,6 +967,8 @@ Init container definition for waiting for the database to be ready
- -ec
- |
#!/bin/bash
# Copy logging configuration
cp /bitnami/milvus/conf/log/glog.conf /bitnami/milvus/rendered-conf/glog.conf
rafariossaa marked this conversation as resolved.
Show resolved Hide resolved
# Build final milvus.yaml with the sections of the different files
find /bitnami/milvus/conf -type f -name *.yaml -print0 | sort -z | xargs -0 yq eval-all '. as $item ireduce ({}; . * $item )' /opt/bitnami/milvus/configs/milvus.yaml > /bitnami/milvus/rendered-conf/pre-render-config_00.yaml
{{- if (include "milvus.kafka.deployed" .context) }}
Expand Down Expand Up @@ -1005,6 +1014,8 @@ Init container definition for waiting for the database to be ready
name: {{ include "common.tplvalues.render" (dict "value" $block.extraEnvVarsSecret "context" $) }}
{{- end }}
volumeMounts:
- name: log-config
mountPath: /bitnami/milvus/conf/log
- name: config-common
mountPath: /bitnami/milvus/conf/00_default
{{- if or .context.Values.milvus.extraConfig .context.Values.milvus.extraConfigExistingConfigMap }}
Expand Down
3 changes: 3 additions & 0 deletions bitnami/milvus/templates/data-coordinator/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ spec:
emptyDir: {}
- name: tmp
emptyDir: {}
- name: log-config
configMap:
name: {{ template "milvus.logConfigmapName" . }}
- name: config-common
configMap:
name: {{ template "milvus.configmapName" . }}
Expand Down
3 changes: 3 additions & 0 deletions bitnami/milvus/templates/data-node/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ spec:
emptyDir: {}
- name: tmp
emptyDir: {}
- name: log-config
configMap:
name: {{ template "milvus.logConfigmapName" . }}
- name: config-common
configMap:
name: {{ template "milvus.configmapName" . }}
Expand Down
3 changes: 3 additions & 0 deletions bitnami/milvus/templates/index-coordinator/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ spec:
emptyDir: {}
- name: tmp
emptyDir: {}
- name: log-config
configMap:
name: {{ template "milvus.logConfigmapName" . }}
- name: config-common
configMap:
name: {{ template "milvus.configmapName" . }}
Expand Down
3 changes: 3 additions & 0 deletions bitnami/milvus/templates/index-node/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ spec:
emptyDir: {}
- name: tmp
emptyDir: {}
- name: log-config
configMap:
name: {{ template "milvus.logConfigmapName" . }}
- name: config-common
configMap:
name: {{ template "milvus.configmapName" . }}
Expand Down
21 changes: 21 additions & 0 deletions bitnami/milvus/templates/log-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}

{{- if not .Values.milvus.existingLogConfigMap }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "milvus.logConfigmapName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: milvus
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
glog.conf: |
{{- include "common.tplvalues.render" (dict "value" .Values.milvus.logConfig "context" $) | nindent 4 }}
{{- end }}

3 changes: 3 additions & 0 deletions bitnami/milvus/templates/proxy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ spec:
emptyDir: {}
- name: tmp
emptyDir: {}
- name: log-config
configMap:
name: {{ template "milvus.logConfigmapName" . }}
- name: config-common
configMap:
name: {{ template "milvus.configmapName" . }}
Expand Down
3 changes: 3 additions & 0 deletions bitnami/milvus/templates/query-coordinator/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ spec:
emptyDir: {}
- name: tmp
emptyDir: {}
- name: log-config
configMap:
name: {{ template "milvus.logConfigmapName" . }}
- name: config-common
configMap:
name: {{ template "milvus.configmapName" . }}
Expand Down
3 changes: 3 additions & 0 deletions bitnami/milvus/templates/query-node/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ spec:
emptyDir: {}
- name: tmp
emptyDir: {}
- name: log-config
configMap:
name: {{ template "milvus.logConfigmapName" . }}
- name: config-common
configMap:
name: {{ template "milvus.configmapName" . }}
Expand Down
3 changes: 3 additions & 0 deletions bitnami/milvus/templates/root-coordinator/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ spec:
emptyDir: {}
- name: tmp
emptyDir: {}
- name: log-config
configMap:
name: {{ template "milvus.logConfigmapName" . }}
- name: config-common
configMap:
name: {{ template "milvus.configmapName" . }}
Expand Down
18 changes: 18 additions & 0 deletions bitnami/milvus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,20 @@ milvus:
superUsers:
- {{ .Values.milvus.auth.username }}
{{- end }}
## @param milvus.logConfig [string] Milvus components default logging configuration
##
logConfig: |
# if true, only log to stdout
--logtostdout=true
--logtostderr=false
--alsologtostderr=false
# `INFO``, ``WARNING``, ``ERROR``, and ``FATAL`` are 0, 1, 2, and 3
--minloglevel=0
--log_dir=/var/lib/milvus/logs/
# MB
--max_log_size=200
--stop_logging_if_full_disk=true

## @param milvus.extraConfig Extra configuration parameters
##
extraConfig: {}
Expand All @@ -240,6 +254,10 @@ milvus:
##
existingConfigMap: ""

## @param milvus.existingLogConfigMap name of a ConfigMap with existing configuration for the logging configuration
##
existingLogConfigMap: ""

## @param milvus.extraConfigExistingConfigMap name of a ConfigMap with existing configuration for the Dashboard
##
extraConfigExistingConfigMap: ""
Expand Down