From ac02990fa7d664b2f5939dad5395c60601ce4df8 Mon Sep 17 00:00:00 2001 From: jubingc <163592420+jubingc@users.noreply.github.com> Date: Thu, 31 Oct 2024 20:22:14 -0700 Subject: [PATCH] [milvus] Support custom annotations in pod deployments (#138) * Support custom annotations in pod deployments Signed-off-by: Jubing Chen * Bump milvus chart version to 4.2.18 Signed-off-by: Jubing Chen --------- Signed-off-by: Jubing Chen --- charts/milvus/Chart.yaml | 2 +- charts/milvus/README.md | 9 +++++++++ charts/milvus/templates/datacoord-deployment.yaml | 3 +++ charts/milvus/templates/datanode-deployment.yaml | 3 +++ charts/milvus/templates/indexcoord-deployment.yaml | 3 +++ charts/milvus/templates/indexnode-deployment.yaml | 3 +++ charts/milvus/templates/mixcoord-deployment.yaml | 3 +++ charts/milvus/templates/proxy-deployment.yaml | 3 +++ charts/milvus/templates/querycoord-deployment.yaml | 3 +++ charts/milvus/templates/querynode-deployment.yaml | 3 +++ charts/milvus/templates/rootcoord-deployment.yaml | 3 +++ charts/milvus/values.yaml | 9 +++++++++ 12 files changed, 46 insertions(+), 1 deletion(-) diff --git a/charts/milvus/Chart.yaml b/charts/milvus/Chart.yaml index d6dcb02..d10147a 100644 --- a/charts/milvus/Chart.yaml +++ b/charts/milvus/Chart.yaml @@ -3,7 +3,7 @@ name: milvus appVersion: "2.4.14" kubeVersion: "^1.10.0-0" description: Milvus is an open-source vector database built to power AI applications and vector similarity search. -version: 4.2.17 +version: 4.2.18 keywords: - milvus - elastic diff --git a/charts/milvus/README.md b/charts/milvus/README.md index f2cd65d..9c1f9a8 100644 --- a/charts/milvus/README.md +++ b/charts/milvus/README.md @@ -381,6 +381,7 @@ The following table lists the configurable parameters of the Milvus Proxy compon | `proxy.http.debugMode.enabled` | Enable debug mode for rest api | `false` | | `proxy.tls.enabled` | Enable porxy tls connection | `false` | | `proxy.strategy` | Deployment strategy configuration | RollingUpdate | +| `proxy.annotations` | Additional pod annotations | `{}` | ### Milvus Root Coordinator Deployment Configuration @@ -406,6 +407,7 @@ The following table lists the configurable parameters of the Milvus Root Coordin | `rootCoordinator.service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to lb (if supported) | `[]` | | `rootCoordinator.service.externalIPs` | Service external IP addresses | `[]` | | `rootCoordinator.strategy` | Deployment strategy configuration | RollingUpdate | +| `rootCoordinator.annotations` | Additional pod annotations | `{}` | ### Milvus Query Coordinator Deployment Configuration The following table lists the configurable parameters of the Milvus Query Coordinator component and their default values. @@ -430,6 +432,7 @@ The following table lists the configurable parameters of the Milvus Query Coordi | `queryCoordinator.service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to lb (if supported) | `[]` | | `queryCoordinator.service.externalIPs` | Service external IP addresses | `[]` | | `queryCoordinator.strategy` | Deployment strategy configuration | RollingUpdate | +| `queryCoordinator.annotations` | Additional pod annotations | `{}` | ### Milvus Query Node Deployment Configuration The following table lists the configurable parameters of the Milvus Query Node component and their default values. @@ -447,6 +450,7 @@ The following table lists the configurable parameters of the Milvus Query Node c | `queryNode.profiling.enabled` | Whether to enable live profiling | `false` | | `queryNode.extraEnv` | Additional Milvus Query Node container environment variables | `[]` | | `queryNode.strategy` | Deployment strategy configuration | RollingUpdate | +| `queryNode.annotations` | Additional pod annotations | `{}` | ### Milvus Index Coordinator Deployment Configuration @@ -472,6 +476,7 @@ The following table lists the configurable parameters of the Milvus Index Coordi | `indexCoordinator.service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to lb (if supported) | `[]` | | `indexCoordinator.service.externalIPs` | Service external IP addresses | `[]` | | `indexCoordinator.strategy` | Deployment strategy configuration | RollingUpdate | +| `indexCoordinator.annotations` | Additional pod annotations | `{}` | ### Milvus Index Node Deployment Configuration The following table lists the configurable parameters of the Milvus Index Node component and their default values. @@ -489,6 +494,7 @@ The following table lists the configurable parameters of the Milvus Index Node c | `indexNode.profiling.enabled` | Whether to enable live profiling | `false` | | `indexNode.extraEnv` | Additional Milvus Index Node container environment variables | `[]` | | `indexNode.strategy` | Deployment strategy configuration | RollingUpdate | +| `indexNode.annotations` | Additional pod annotations | `{}` | ### Milvus Data Coordinator Deployment Configuration @@ -514,6 +520,7 @@ The following table lists the configurable parameters of the Milvus Data Coordin | `dataCoordinator.service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to lb (if supported) | `[]` | | `dataCoordinator.service.externalIPs` | Service external IP addresses | `[]` | | `dataCoordinator.strategy` | Deployment strategy configuration | RollingUpdate | +| `dataCoordinator.annotations` | Additional pod annotations | `{}` | ### Milvus Data Node Deployment Configuration The following table lists the configurable parameters of the Milvus Data Node component and their default values. @@ -530,6 +537,7 @@ The following table lists the configurable parameters of the Milvus Data Node co | `dataNode.profiling.enabled` | Whether to enable live profiling | `false` | | `dataNode.extraEnv` | Additional Milvus Data Node container environment variables | `[]` | | `dataNode.strategy` | Deployment strategy configuration | RollingUpdate | +| `dataNode.annotations` | Additional pod annotations | `{}` | ### Milvus Mixture Coordinator Deployment Configuration @@ -554,6 +562,7 @@ The following table lists the configurable parameters of the Milvus Mixture Coor | `mixCoordinator.service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to lb (if supported) | `[]` | | `mixCoordinator.service.externalIPs` | Service external IP addresses | `[]` | | `mixCoordinator.strategy` | Deployment strategy configuration | RollingUpdate | +| `mixCoordinator.annotations` | Additional pod annotations | `{}` | ### Pulsar Configuration This version of the chart includes the dependent Pulsar chart in the charts/ directory. diff --git a/charts/milvus/templates/datacoord-deployment.yaml b/charts/milvus/templates/datacoord-deployment.yaml index c7e434e..1dcc958 100644 --- a/charts/milvus/templates/datacoord-deployment.yaml +++ b/charts/milvus/templates/datacoord-deployment.yaml @@ -39,6 +39,9 @@ spec: pyroscope.io/scrape: "true" pyroscope.io/application-name: {{ template "milvus.datacoord.fullname" . }} pyroscope.io/port: "9091" + {{- end }} + {{- if .Values.dataCoordinator.annotations }} + {{- toYaml .Values.dataCoordinator.annotations | nindent 8 }} {{- end }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} diff --git a/charts/milvus/templates/datanode-deployment.yaml b/charts/milvus/templates/datanode-deployment.yaml index b7d3c28..1a2a271 100644 --- a/charts/milvus/templates/datanode-deployment.yaml +++ b/charts/milvus/templates/datanode-deployment.yaml @@ -35,6 +35,9 @@ spec: pyroscope.io/scrape: "true" pyroscope.io/application-name: {{ template "milvus.datanode.fullname" . }} pyroscope.io/port: "9091" + {{- end }} + {{- if .Values.dataNode.annotations }} + {{- toYaml .Values.dataNode.annotations | nindent 8 }} {{- end }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} diff --git a/charts/milvus/templates/indexcoord-deployment.yaml b/charts/milvus/templates/indexcoord-deployment.yaml index 06eaea1..a62e911 100644 --- a/charts/milvus/templates/indexcoord-deployment.yaml +++ b/charts/milvus/templates/indexcoord-deployment.yaml @@ -39,6 +39,9 @@ spec: pyroscope.io/scrape: "true" pyroscope.io/application-name: {{ template "milvus.indexcoord.fullname" . }} pyroscope.io/port: "9091" + {{- end }} + {{- if .Values.indexCoordinator.annotations }} + {{- toYaml .Values.indexCoordinator.annotations | nindent 8 }} {{- end }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} diff --git a/charts/milvus/templates/indexnode-deployment.yaml b/charts/milvus/templates/indexnode-deployment.yaml index 1d68aeb..e260dd5 100644 --- a/charts/milvus/templates/indexnode-deployment.yaml +++ b/charts/milvus/templates/indexnode-deployment.yaml @@ -34,6 +34,9 @@ spec: pyroscope.io/scrape: "true" pyroscope.io/application-name: {{ template "milvus.indexnode.fullname" . }} pyroscope.io/port: "9091" + {{- end }} + {{- if .Values.indexNode.annotations }} + {{- toYaml .Values.indexNode.annotations | nindent 8 }} {{- end }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} diff --git a/charts/milvus/templates/mixcoord-deployment.yaml b/charts/milvus/templates/mixcoord-deployment.yaml index 3c16603..4eb392f 100644 --- a/charts/milvus/templates/mixcoord-deployment.yaml +++ b/charts/milvus/templates/mixcoord-deployment.yaml @@ -39,6 +39,9 @@ spec: pyroscope.io/scrape: "true" pyroscope.io/application-name: {{ template "milvus.mixcoord.fullname" . }} pyroscope.io/port: "9091" + {{- end }} + {{- if .Values.mixCoordinator.annotations }} + {{- toYaml .Values.mixCoordinator.annotations | nindent 8 }} {{- end }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} diff --git a/charts/milvus/templates/proxy-deployment.yaml b/charts/milvus/templates/proxy-deployment.yaml index fe1b430..e366ff2 100644 --- a/charts/milvus/templates/proxy-deployment.yaml +++ b/charts/milvus/templates/proxy-deployment.yaml @@ -35,6 +35,9 @@ spec: pyroscope.io/scrape: "true" pyroscope.io/application-name: {{ template "milvus.proxy.fullname" . }} pyroscope.io/port: "9091" + {{- end }} + {{- if .Values.proxy.annotations }} + {{- toYaml .Values.proxy.annotations | nindent 8 }} {{- end }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} diff --git a/charts/milvus/templates/querycoord-deployment.yaml b/charts/milvus/templates/querycoord-deployment.yaml index 31843aa..3f7b4d7 100644 --- a/charts/milvus/templates/querycoord-deployment.yaml +++ b/charts/milvus/templates/querycoord-deployment.yaml @@ -39,6 +39,9 @@ spec: pyroscope.io/scrape: "true" pyroscope.io/application-name: {{ template "milvus.querycoord.fullname" . }} pyroscope.io/port: "9091" + {{- end }} + {{- if .Values.queryCoordinator.annotations }} + {{- toYaml .Values.queryCoordinator.annotations | nindent 8 }} {{- end }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} diff --git a/charts/milvus/templates/querynode-deployment.yaml b/charts/milvus/templates/querynode-deployment.yaml index f56f7ec..de72586 100644 --- a/charts/milvus/templates/querynode-deployment.yaml +++ b/charts/milvus/templates/querynode-deployment.yaml @@ -34,6 +34,9 @@ spec: pyroscope.io/scrape: "true" pyroscope.io/application-name: {{ template "milvus.querynode.fullname" . }} pyroscope.io/port: "9091" + {{- end }} + {{- if .Values.queryNode.annotations }} + {{- toYaml .Values.queryNode.annotations | nindent 8 }} {{- end }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{ include "milvus.ud.annotations" . | indent 8 }} diff --git a/charts/milvus/templates/rootcoord-deployment.yaml b/charts/milvus/templates/rootcoord-deployment.yaml index 1b0d7e9..5bcd2a2 100644 --- a/charts/milvus/templates/rootcoord-deployment.yaml +++ b/charts/milvus/templates/rootcoord-deployment.yaml @@ -39,6 +39,9 @@ spec: 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 }} diff --git a/charts/milvus/values.yaml b/charts/milvus/values.yaml index ce213ba..c94489c 100644 --- a/charts/milvus/values.yaml +++ b/charts/milvus/values.yaml @@ -280,6 +280,7 @@ proxy: # Deployment strategy, default is RollingUpdate # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment strategy: {} + annotations: {} rootCoordinator: enabled: false @@ -299,6 +300,7 @@ rootCoordinator: # Deployment strategy, default is RollingUpdate # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment strategy: {} + annotations: {} service: port: 53100 @@ -324,6 +326,7 @@ queryCoordinator: # Deployment strategy, default is RollingUpdate # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment strategy: {} + annotations: {} service: port: 19531 @@ -355,6 +358,7 @@ queryNode: # Deployment strategy, default is RollingUpdate # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment strategy: {} + annotations: {} indexCoordinator: enabled: false @@ -374,6 +378,7 @@ indexCoordinator: # Deployment strategy, default is RollingUpdate # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment strategy: {} + annotations: {} service: port: 31000 @@ -404,6 +409,7 @@ indexNode: # Deployment strategy, default is RollingUpdate # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment strategy: {} + annotations: {} dataCoordinator: enabled: false @@ -423,6 +429,7 @@ dataCoordinator: # Deployment strategy, default is RollingUpdate # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment strategy: {} + annotations: {} service: port: 13333 @@ -446,6 +453,7 @@ dataNode: # Deployment strategy, default is RollingUpdate # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment strategy: {} + annotations: {} ## mixCoordinator contains all coord ## If you want to use mixcoord, enable this and disable all of other coords @@ -467,6 +475,7 @@ mixCoordinator: # Deployment strategy, default is RollingUpdate # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment strategy: {} + annotations: {} service: annotations: {}