From 031202084d24bbe37a826aa588202d7edb436539 Mon Sep 17 00:00:00 2001 From: quicksilver Date: Fri, 18 Sep 2020 00:11:06 +0800 Subject: [PATCH] Upgrade to v0.10.3 (#117) * Upgrade to v0.10.2 Signed-off-by: quicksilver * Add shards feature Signed-off-by: quicksilver * Update README Signed-off-by: quicksilver * Update values.yaml Signed-off-by: quicksilver * Add mishards-rbac.yaml Signed-off-by: quicksilver * Add mishards-rbac.yaml (#114) Signed-off-by: quicksilver * Upgrade to v0.10.3 Signed-off-by: quicksilver * Update docker images version to v0.10.3 (#115) * Add mishards-rbac.yaml Signed-off-by: quicksilver * Upgrade to v0.10.3 Signed-off-by: quicksilver * Update mishards-rbac.yaml Signed-off-by: quicksilver * Update _mishards_config.tpl Signed-off-by: quicksilver --- charts/milvus/Chart.yaml | 4 +-- charts/milvus/README.md | 10 +++++-- charts/milvus/templates/_mishards_config.tpl | 28 +++++++++++++++----- charts/milvus/templates/mishards-rbac.yaml | 25 +++++++++++++++++ charts/milvus/values.yaml | 18 ++++++------- 5 files changed, 66 insertions(+), 19 deletions(-) create mode 100644 charts/milvus/templates/mishards-rbac.yaml diff --git a/charts/milvus/Chart.yaml b/charts/milvus/Chart.yaml index 64bb2f2..7881395 100755 --- a/charts/milvus/Chart.yaml +++ b/charts/milvus/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v1 name: milvus -appVersion: "0.10.2" +appVersion: "0.10.3" kubeVersion: "^1.10.0-0" description: Milvus is an open source similarity search engine for massive-scalefeature vectors. -version: 0.10.2 +version: 0.10.3 keywords: - milvus - elastic diff --git a/charts/milvus/README.md b/charts/milvus/README.md index 61f0ddc..72af9a7 100644 --- a/charts/milvus/README.md +++ b/charts/milvus/README.md @@ -118,6 +118,12 @@ The following table lists the configurable parameters of the Milvus chart and th | `readonly.gpu.gpuSearchThreshold` | GPU search threshold | `1000` | | `readonly.gpu.searchDevices` | Define the GPU devices used for search computation | `[gpu0]` | | `readonly.gpu.buildIndexDevices` | Define the GPU devices used for index building | `[gpu0]` | +| `mishards.debug` | Choose if to enable Debug work mode. | `true` | +| `mishards.discoveryClassName` | Under the plug-in search path, search the class based on the class name, and instantiate it. Currently, the system provides 2 classes: static and kubernetes. | `kubernetes` | +| `mishards.trace.enabled` | Enable Mishards tracing service. | `false` | +| `mishards.trace.tracerClassName` | Under the plug-in search path, search the class based on the class name, and instantiate it. Currently, only Jaeger is supported. | `Jaeger` | +| `mishards.trace.tracingReportingHost` | The host of the tracing service. | `jaeger` | +| `mishards.trace.tracingReportingPort` | The port of the tracing service. | `5775` | ### Milvus Deployment Configuration @@ -131,7 +137,7 @@ The following table lists the configurable parameters of the Milvus chart and th | `restartPolicy` | Restart policy for all containers | `Always` | | `initContainerImage` | Init container image | `alpine:3.8` | | `image.repository` | Image repository | `milvusdb/milvus` | -| `image.tag` | Image tag | `0.10.2-cpu-d081520-8a2393` | +| `image.tag` | Image tag | `0.10.3-cpu-d091720-f962e8` | | `image.pullPolicy` | Image pull policy | `IfNotPresent` | | `image.pullSecrets` | Image pull secrets | `{}` | | `image.resources` | CPU/GPU/Memory resource requests/limits | `{}` | @@ -175,7 +181,7 @@ The following table lists the configurable parameters of the Milvus chart and th | `podDisruptionBudget.minAvailable` | Pod disruption minimum available | `unset` | | `podDisruptionBudget.maxUnavailable` | Pod disruption maximum unavailable | `unset` | | `mishards.image.repository` | Mishards image repository | `milvusdb/mishards` | -| `mishards.image.tag` | Mishards image tag | `0.10.2` | +| `mishards.image.tag` | Mishards image tag | `0.10.3` | | `mishards.image.pullPolicy` | Mishards image pull policy | `IfNotPresent` | | `mishards.replicas` | Number of mishards nodes | `1` | | `mishards.resources` | Mishards CPU/GPU/Memory resource requests/limits | `{}` | diff --git a/charts/milvus/templates/_mishards_config.tpl b/charts/milvus/templates/_mishards_config.tpl index ba01e4c..bf4a0ef 100644 --- a/charts/milvus/templates/_mishards_config.tpl +++ b/charts/milvus/templates/_mishards_config.tpl @@ -1,5 +1,6 @@ {{- define "milvus.mishards.config" -}} -FROM_EXAMPLE='true' + +MAX_WORKERS={{ .Values.mishards.maxWorkers }} {{- if or .Values.mysql.enabled .Values.externalMysql.enabled }} SQLALCHEMY_DATABASE_URI={{ template "milvus.mysqlURI" . }} @@ -10,12 +11,27 @@ SQLALCHEMY_DATABASE_URI={{ template "milvus.sqliteURI" . }} DEBUG={{ .Values.mishards.debug }} SERVER_PORT=19530 WOSERVER=tcp://{{ template "milvus.writable.fullname" . }}:{{ .Values.service.port }} -DISCOVERY_PLUGIN_PATH=static + +{{- if eq .Values.mishards.discoveryClassName "static" }} +DISCOVERY_CLASS_NAME=static DISCOVERY_STATIC_HOSTS={{ template "milvus.writable.fullname" . }},{{ template "milvus.readonly.fullname" . }} DISCOVERY_STATIC_PORT={{ .Values.service.port }} +{{- else if eq .Values.mishards.discoveryClassName "kubernetes" }} +DISCOVERY_CLASS_NAME=kubernetes +DISCOVERY_KUBERNETES_NAMESPACE={{ .Release.Namespace }} +DISCOVERY_KUBERNETES_IN_CLUSTER=True +DISCOVERY_KUBERNETES_POLL_INTERVAL=10 +DISCOVERY_KUBERNETES_POD_PATT={{ template "milvus.readonly.fullname" . }}-.* +DISCOVERY_KUBERNETES_LABEL_SELECTOR=component=readonly +{{- else }} +DISCOVERY_CLASS_NAME={{ .Values.mishards.discoveryClassName }} +{{- end -}} + +{{- if .Values.mishards.trace.enabled }} +TRACER_CLASS_NAME={{ .Values.mishards.trace.tracerClassName }} +TRACING_SERVICE_NAME={{ template "milvus.fullname" . }} +TRACING_REPORTING_HOST={{ .Values.mishards.trace.tracingReportingHost }} +TRACING_REPORTING_PORT={{ .Values.mishards.trace.tracingReportingPort }} +{{- end -}} -TRACER_CLASS_NAME=jaeger -TRACING_SERVICE_NAME=mishards-demo -TRACING_REPORTING_HOST=jaeger -TRACING_REPORTING_PORT=5775 {{- end -}} \ No newline at end of file diff --git a/charts/milvus/templates/mishards-rbac.yaml b/charts/milvus/templates/mishards-rbac.yaml new file mode 100644 index 0000000..63cc3f4 --- /dev/null +++ b/charts/milvus/templates/mishards-rbac.yaml @@ -0,0 +1,25 @@ +{{- if and .Values.cluster.enabled (eq .Values.mishards.discoveryClassName "kubernetes") }} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: pods-list +rules: +- apiGroups: [""] + resources: ["pods", "events"] + verbs: ["list", "get", "watch"] + +--- + +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: pods-list +subjects: +- kind: ServiceAccount + name: default + namespace: {{ .Release.Namespace }} +roleRef: + kind: ClusterRole + name: pods-list + apiGroup: rbac.authorization.k8s.io +{{- end -}} \ No newline at end of file diff --git a/charts/milvus/values.yaml b/charts/milvus/values.yaml index 66bf888..6e89c69 100755 --- a/charts/milvus/values.yaml +++ b/charts/milvus/values.yaml @@ -176,7 +176,7 @@ logsPersistence: image: repository: milvusdb/milvus - tag: 0.10.2-cpu-d081520-8a2393 + tag: 0.10.3-cpu-d091720-f962e8 pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -220,7 +220,7 @@ serviceAccounts: mishards: image: repository: milvusdb/mishards - tag: 0.10.2 + tag: 0.10.3 pullPolicy: IfNotPresent replicas: 1 @@ -234,13 +234,13 @@ mishards: ## Mishards conf debug: true - maxworkers: 50 - - # discoverypluginpath: "static" - # tracerclassname: "jaeger" - # tracingservicename: "mishards-demo" - # tracingreportinghost: "jaeger" - # tracingreportingport: 5775 + maxWorkers: 50 + discoveryClassName: kubernetes + trace: + enabled: false + tracerClassName: jaeger + tracingReportingHost: jaeger + tracingReportingPort: 5775 ## Milvus Readonly Server Configuration readonly: