From 79653e2bdec4c8724369c91728c5ff35bff4c194 Mon Sep 17 00:00:00 2001 From: Rachit Chaudhary <65501028+Rachit-Chaudhary11@users.noreply.github.com> Date: Wed, 6 Mar 2024 13:06:52 +0530 Subject: [PATCH] [milvus-4.1.18] Enabling High Availability for Milvus (#68) * rolling deployment Signed-off-by: Rachit Chaudhary - r0c0axe * Check for activeStandby enabled Signed-off-by: Rachit Chaudhary - r0c0axe --------- Signed-off-by: Rachit Chaudhary - r0c0axe Co-authored-by: Rachit Chaudhary - r0c0axe --- charts/milvus/Chart.yaml | 2 +- charts/milvus/README.md | 26 +++++++++---------- .../templates/datacoord-deployment.yaml | 9 +++++++ .../templates/indexcoord-deployment.yaml | 9 +++++++ .../milvus/templates/mixcoord-deployment.yaml | 9 +++++++ .../templates/querycoord-deployment.yaml | 9 +++++++ .../templates/rootcoord-deployment.yaml | 9 +++++++ charts/milvus/values.yaml | 15 +++++++++++ 8 files changed, 74 insertions(+), 14 deletions(-) diff --git a/charts/milvus/Chart.yaml b/charts/milvus/Chart.yaml index 9b1ff0e..80ff4b7 100644 --- a/charts/milvus/Chart.yaml +++ b/charts/milvus/Chart.yaml @@ -3,7 +3,7 @@ name: milvus appVersion: "2.3.10" kubeVersion: "^1.10.0-0" description: Milvus is an open-source vector database built to power AI applications and vector similarity search. -version: 4.1.21 +version: 4.1.22 keywords: - milvus - elastic diff --git a/charts/milvus/README.md b/charts/milvus/README.md index b4cb695..c4e841b 100644 --- a/charts/milvus/README.md +++ b/charts/milvus/README.md @@ -370,15 +370,15 @@ The following table lists the configurable parameters of the Milvus Root Coordin | `rootCoordinator.profiling.enabled` | Whether to enable live profiling | `false` | | `rootCoordinator.activeStandby.enabled` | Whether to enable active-standby | `false` | | `rootCoordinator.extraEnv` | Additional Milvus Root Coordinator container environment variables | `[]` | -| `rootCoordinator.service.type` | Service type | `ClusterIP` | -| `rootCoordinator.service.port` | Port where service is exposed | `19530` | -| `rootCoordinator.service.annotations` | Service annotations | `{}` | -| `rootCoordinator.service.labels` | Service custom labels | `{}` | -| `rootCoordinator.service.clusterIP` | Internal cluster service IP | `unset` | -| `rootCoordinator.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `unset` | -| `rootCoordinator.service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to lb (if supported) | `[]` | -| `rootCoordinator.service.externalIPs` | Service external IP addresses | `[]` | - +| `rootCoordinator.service.type` | Service type | `ClusterIP` | +| `rootCoordinator.service.port` | Port where service is exposed | `19530` | +| `rootCoordinator.service.annotations` | Service annotations | `{}` | +| `rootCoordinator.service.labels` | Service custom labels | `{}` | +| `rootCoordinator.service.clusterIP` | Internal cluster service IP | `unset` | +| `rootCoordinator.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `unset` | +| `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 | ### Milvus Query Coordinator Deployment Configuration The following table lists the configurable parameters of the Milvus Query Coordinator component and their default values. @@ -402,7 +402,7 @@ The following table lists the configurable parameters of the Milvus Query Coordi | `queryCoordinator.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `unset` | | `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 | ### Milvus Query Node Deployment Configuration The following table lists the configurable parameters of the Milvus Query Node component and their default values. @@ -444,7 +444,7 @@ The following table lists the configurable parameters of the Milvus Index Coordi | `indexCoordinator.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `unset` | | `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 | ### Milvus Index Node Deployment Configuration The following table lists the configurable parameters of the Milvus Index Node component and their default values. @@ -486,7 +486,7 @@ The following table lists the configurable parameters of the Milvus Data Coordin | `dataCoordinator.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `unset` | | `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 | ### Milvus Data Node Deployment Configuration The following table lists the configurable parameters of the Milvus Data Node component and their default values. @@ -526,7 +526,7 @@ The following table lists the configurable parameters of the Milvus Mixture Coor | `mixCoordinator.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `unset` | | `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 | ### 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 2e0421c..34d00b4 100644 --- a/charts/milvus/templates/datacoord-deployment.yaml +++ b/charts/milvus/templates/datacoord-deployment.yaml @@ -11,9 +11,18 @@ metadata: {{ include "milvus.ud.annotations" . | indent 4 }} spec: + {{- if ge (int .Values.dataCoordinator.replicas) 0 }} replicas: {{ .Values.dataCoordinator.replicas }} + {{- end }} + {{- if .Values.dataCoordinator.activeStandby.enabled}} + {{- with .Values.dataCoordinator.strategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- else }} strategy: type: Recreate + {{- end }} selector: matchLabels: {{ include "milvus.matchLabels" . | indent 6 }} diff --git a/charts/milvus/templates/indexcoord-deployment.yaml b/charts/milvus/templates/indexcoord-deployment.yaml index c6fa1ec..f876943 100644 --- a/charts/milvus/templates/indexcoord-deployment.yaml +++ b/charts/milvus/templates/indexcoord-deployment.yaml @@ -11,9 +11,18 @@ metadata: {{ include "milvus.ud.annotations" . | indent 4 }} spec: + {{- if ge (int .Values.indexCoordinator.replicas) 0 }} replicas: {{ .Values.indexCoordinator.replicas }} + {{- end }} + {{- if .Values.indexCoordinator.activeStandby.enabled}} + {{- with .Values.indexCoordinator.strategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- else }} strategy: type: Recreate + {{- end }} selector: matchLabels: {{ include "milvus.matchLabels" . | indent 6 }} diff --git a/charts/milvus/templates/mixcoord-deployment.yaml b/charts/milvus/templates/mixcoord-deployment.yaml index ddf5af3..86ab063 100644 --- a/charts/milvus/templates/mixcoord-deployment.yaml +++ b/charts/milvus/templates/mixcoord-deployment.yaml @@ -11,9 +11,18 @@ metadata: {{ include "milvus.ud.annotations" . | indent 4 }} spec: + {{- if ge (int .Values.mixCoordinator.replicas) 0 }} replicas: {{ .Values.mixCoordinator.replicas }} + {{- end }} + {{- if .Values.mixCoordinator.activeStandby.enabled}} + {{- with .Values.mixCoordinator.strategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- else }} strategy: type: Recreate + {{- end }} selector: matchLabels: {{ include "milvus.matchLabels" . | indent 6 }} diff --git a/charts/milvus/templates/querycoord-deployment.yaml b/charts/milvus/templates/querycoord-deployment.yaml index 59d407f..e3159c9 100644 --- a/charts/milvus/templates/querycoord-deployment.yaml +++ b/charts/milvus/templates/querycoord-deployment.yaml @@ -11,9 +11,18 @@ metadata: {{ include "milvus.ud.annotations" . | indent 4 }} spec: + {{- if ge (int .Values.queryCoordinator.replicas) 0 }} replicas: {{ .Values.queryCoordinator.replicas }} + {{- end }} + {{- if .Values.queryCoordinator.activeStandby.enabled}} + {{- with .Values.queryCoordinator.strategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- else }} strategy: type: Recreate + {{- end }} selector: matchLabels: {{ include "milvus.matchLabels" . | indent 6 }} diff --git a/charts/milvus/templates/rootcoord-deployment.yaml b/charts/milvus/templates/rootcoord-deployment.yaml index c8c3cd3..2e16efe 100644 --- a/charts/milvus/templates/rootcoord-deployment.yaml +++ b/charts/milvus/templates/rootcoord-deployment.yaml @@ -11,9 +11,18 @@ metadata: {{ 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 }} diff --git a/charts/milvus/values.yaml b/charts/milvus/values.yaml index a1e8947..03b6bc2 100644 --- a/charts/milvus/values.yaml +++ b/charts/milvus/values.yaml @@ -273,6 +273,9 @@ rootCoordinator: enabled: false # Enable live profiling activeStandby: enabled: false # Enable active-standby when you set multiple replicas for root coordinator + # Deployment strategy, default is RollingUpdate + # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment + strategy: {} service: port: 53100 @@ -295,6 +298,9 @@ queryCoordinator: enabled: false # Enable live profiling activeStandby: enabled: false # Enable active-standby when you set multiple replicas for query coordinator + # Deployment strategy, default is RollingUpdate + # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment + strategy: {} service: port: 19531 @@ -341,6 +347,9 @@ indexCoordinator: enabled: false # Enable live profiling activeStandby: enabled: false # Enable active-standby when you set multiple replicas for index coordinator + # Deployment strategy, default is RollingUpdate + # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment + strategy: {} service: port: 31000 @@ -387,6 +396,9 @@ dataCoordinator: enabled: false # Enable live profiling activeStandby: enabled: false # Enable active-standby when you set multiple replicas for data coordinator + # Deployment strategy, default is RollingUpdate + # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment + strategy: {} service: port: 13333 @@ -428,6 +440,9 @@ mixCoordinator: enabled: false # Enable live profiling activeStandby: enabled: false # Enable active-standby when you set multiple replicas for Mixture coordinator + # Deployment strategy, default is RollingUpdate + # Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment + strategy: {} service: annotations: {}