diff --git a/Makefile b/Makefile index 968c59c9..2f238145 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,9 @@ IMG ?= milvusdb/milvus-operator:dev-latest TOOL_IMG ?= milvus-config-tool:dev-latest SIT_IMG ?= milvus-operator:sit -VERSION ?= 1.1.9 +VERSION ?= 1.2.0 TOOL_VERSION ?= 1.0.0 -MILVUS_HELM_VERSION ?= milvus-4.2.13 +MILVUS_HELM_VERSION ?= milvus-4.2.36 RELEASE_IMG ?= milvusdb/milvus-operator:v$(VERSION) TOOL_RELEASE_IMG ?= milvusdb/milvus-config-tool:v$(TOOL_VERSION) KIND_CLUSTER ?= kind @@ -110,20 +110,21 @@ docker-build: ## Build docker image with the manager. docker-push: ## Push docker image with the manager. docker push ${IMG} -out/config/assets: +out/config/assets/templates: mkdir -p out/config/assets - cp -r config/assets out/config/assets + cp -r config/assets/templates out/config/assets/templates -docker-prepare: build-release out/config/assets +docker-prepare: build-release out/config/assets/templates + mkdir -p ./out/config/assets/charts/ wget https://github.com/zilliztech/milvus-helm/raw/${MILVUS_HELM_VERSION}/charts/milvus/charts/etcd-6.3.3.tgz -O ./etcd.tgz wget https://github.com/zilliztech/milvus-helm/raw/${MILVUS_HELM_VERSION}/charts/milvus/charts/minio-8.0.17.tgz -O ./minio.tgz - wget https://github.com/zilliztech/milvus-helm/raw/${MILVUS_HELM_VERSION}/charts/milvus/charts/pulsar-2.7.8.tgz -O ./pulsar.tgz - wget https://archive.apache.org/dist/pulsar/helm-chart/3.3.0/pulsar-3.3.0.tgz -O ./pulsar-v3.tgz + wget https://github.com/zilliztech/milvus-helm/raw/${MILVUS_HELM_VERSION}/charts/milvus/charts/pulsarv2-2.7.8.tgz -O ./pulsar.tgz + wget https://github.com/zilliztech/milvus-helm/raw/${MILVUS_HELM_VERSION}/charts/milvus/charts/pulsar-3.3.0.tgz -O ./pulsarv3.tgz wget https://github.com/zilliztech/milvus-helm/raw/${MILVUS_HELM_VERSION}/charts/milvus/charts/kafka-15.5.1.tgz -O ./kafka.tgz tar -xf ./etcd.tgz -C ./out/config/assets/charts/ tar -xf ./minio.tgz -C ./out/config/assets/charts/ - tar -xf ./pulsar-v3.tgz -C ./out/config/assets/charts/ - mv ./out/config/assets/charts/pulsar ./out/config/assets/charts/pulsar-v3 + tar -xf ./pulsarv3.tgz -C ./out/config/assets/ + mv ./out/config/assets/pulsar ./out/config/assets/charts/pulsarv3 tar -xf ./pulsar.tgz -C ./out/config/assets/charts/ tar -xf ./kafka.tgz -C ./out/config/assets/charts/ wget https://github.com/zilliztech/milvus-helm/raw/${MILVUS_HELM_VERSION}/charts/milvus/values.yaml -O ./out/config/assets/charts/values.yaml @@ -233,7 +234,7 @@ sit-prepare-operator-images: sit-prepare-images: sit-prepare-operator-images @echo "Preparing images" - docker pull milvusdb/milvus:v2.4.21 + docker pull milvusdb/milvus:v2.5.4 # docker pull -q apachepulsar/pulsar:2.8.2 docker pull -q bitnami/kafka:3.1.0-debian-10-r52 @@ -250,7 +251,7 @@ sit-load-operator-images: sit-load-images: sit-load-operator-images @echo "Loading images" - kind load docker-image milvusdb/milvus:v2.4.21 + kind load docker-image milvusdb/milvus:v2.5.4 # kind load docker-image apachepulsar/pulsar:2.8.2 --name ${KIND_CLUSTER} kind load docker-image bitnami/kafka:3.1.0-debian-10-r52 --name ${KIND_CLUSTER} kind load docker-image milvusdb/etcd:3.5.14-r1 --name ${KIND_CLUSTER} @@ -259,7 +260,7 @@ sit-load-images: sit-load-operator-images sit-load-and-cleanup-images: sit-load-images @echo "Clean up some big images to save disk space in github action" - docker rmi milvusdb/milvus:v2.4.21 + docker rmi milvusdb/milvus:v2.5.4 # docker rmi apachepulsar/pulsar:2.8.2 docker rmi bitnami/kafka:3.1.0-debian-10-r52 docker rmi milvusdb/etcd:3.5.14-r1 diff --git a/README.md b/README.md index 69fb3743..a978e41e 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ helm -n milvus-operator upgrade --install --create-namespace milvus-operator mil Or with kubectl & raw manifests: ```shell -kubectl apply -f https://raw.githubusercontent.com/zilliztech/milvus-operator/v1.1.9/deploy/manifests/deployment.yaml +kubectl apply -f https://raw.githubusercontent.com/zilliztech/milvus-operator/v1.2.0/deploy/manifests/deployment.yaml ``` For more infomation Check [Installation Instructions](docs/installation/installation.md) @@ -96,16 +96,16 @@ Versions of the underlying components are listed below: +Versions, v2.5.4 `[1]`, 3.0.7 / 3.1.0, 3.5.16, RELEASE.2023-03-20T20-16-18Z --> |Components| Milvus| Pulsar / Kafka| Etcd| MinIO| |---|---|---|---|---| -|Versions| v2.4.21 `[1]`| 2.9.5`[2]` / 3.1.0 | 3.5.14 |RELEASE.2023-03-20T20-16-18Z| +|Versions| v2.5.4 `[1]`| 3.0.7`[2]` / 3.1.0 | 3.5.16 |RELEASE.2023-03-20T20-16-18Z| > `[1]` Version of milvus is the default version we will use, you can set it to other version. The Compatibility with milvus releases is showed below. > -> `[2]` pulsar of 3.x is also supported. check [this sample](config/samples/milvus_pulsar_v3.yaml) for more details. +> `[2]` pulsar of 2.x is also supported. check [this sample](config/samples/milvus_pulsar_v2.yaml) for more details. ## Compatibility With Milvus Releases @@ -135,11 +135,11 @@ Use helm: ```shell helm upgrade --install milvus-operator \ -n milvus-operator --create-namespace \ - https://github.com/zilliztech/milvus-operator/releases/download/v1.1.9/milvus-operator-1.1.9.tgz + https://github.com/zilliztech/milvus-operator/releases/download/v1.2.0/milvus-operator-1.2.0.tgz ``` Or use kubectl & raw manifests: ```shell -kubectl apply -f https://raw.githubusercontent.com/zilliztech/milvus-operator/v1.1.9/deploy/manifests/deployment.yaml +kubectl apply -f https://raw.githubusercontent.com/zilliztech/milvus-operator/v1.2.0/deploy/manifests/deployment.yaml ``` diff --git a/charts/milvus-operator/Chart.yaml b/charts/milvus-operator/Chart.yaml index d7d1bf93..04df6fa1 100644 --- a/charts/milvus-operator/Chart.yaml +++ b/charts/milvus-operator/Chart.yaml @@ -18,13 +18,13 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.1.9 +version: 1.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.1.9" +appVersion: "1.2.0" dependencies: - name: cert-manager diff --git a/charts/milvus-operator/values.yaml b/charts/milvus-operator/values.yaml index eac973c1..cbbd6bfa 100644 --- a/charts/milvus-operator/values.yaml +++ b/charts/milvus-operator/values.yaml @@ -13,7 +13,7 @@ image: # image.pullPolicy -- The image pull policy for the controller. pullPolicy: IfNotPresent # image.tag -- The image tag whose default is the chart appVersion. - tag: "v1.1.9" + tag: "v1.2.0" # installCRDs -- If true, CRD resources will be installed as part of the Helm chart. If enabled, when uninstalling CRD resources will be deleted causing all installed custom resources to be DELETED installCRDs: true diff --git a/config/assets/charts/pulsar-v3-values.yaml b/config/assets/charts/pulsar-v3-values.yaml deleted file mode 100644 index 510d6d91..00000000 --- a/config/assets/charts/pulsar-v3-values.yaml +++ /dev/null @@ -1,252 +0,0 @@ -# This file contains recommended default values for a production deployment -persistence: true -extra: {} -monitoring: {} -volumes: - persistence: true - local_storage: false - -components: - # zookeeper - zookeeper: true - # bookkeeper - bookkeeper: true - # bookkeeper - autorecovery - autorecovery: true - # broker - broker: true - # functions - functions: false - # proxy - proxy: true - # toolset - toolset: false - # pulsar manager - pulsar_manager: false - -images: - zookeeper: - repository: apachepulsar/pulsar - tag: 3.0.7 - pullPolicy: IfNotPresent - bookie: - repository: apachepulsar/pulsar - tag: 3.0.7 - pullPolicy: IfNotPresent - autorecovery: - repository: apachepulsar/pulsar - tag: 3.0.7 - pullPolicy: IfNotPresent - broker: - repository: apachepulsar/pulsar - tag: 3.0.7 - pullPolicy: IfNotPresent - proxy: - repository: apachepulsar/pulsar - tag: 3.0.7 - pullPolicy: IfNotPresent - -zookeeper: - pdb: - usePolicy: false - affinity: - anti_affinity: false - component: zookeeper - replicaCount: 3 - updateStrategy: - type: RollingUpdate - podManagementPolicy: Parallel - podMonitor: - enabled: false - resources: - requests: - memory: 256Mi - cpu: 0.2 - volumes: - # use a persistent volume or emptyDir - persistence: true - data: - name: data - size: 20Gi - local_storage: false - configData: - PULSAR_MEM: > - -Xms256m -Xmx256m - PULSAR_GC: > - -XX:+UseG1GC - -XX:MaxGCPauseMillis=10 - -Dcom.sun.management.jmxremote - -Djute.maxbuffer=10485760 - -XX:+ParallelRefProcEnabled - -XX:+UnlockExperimentalVMOptions - -XX:+DoEscapeAnalysis - -XX:+DisableExplicitGC - -XX:+ExitOnOutOfMemoryError - -XX:+PerfDisableSharedMem - -bookkeeper: - pdb: - usePolicy: false - affinity: - anti_affinity: false - component: bookie - replicaCount: 3 - updateStrategy: - type: RollingUpdate - podManagementPolicy: Parallel - podMonitor: - enabled: false - resources: - requests: - memory: 2048Mi - cpu: 0.5 - volumes: - # use a persistent volume or emptyDir - persistence: true - journal: - name: journal - size: 100Gi - local_storage: false - ledgers: - name: ledgers - size: 200Gi - local_storage: false - configData: - PULSAR_MEM: > - -Xms4096m - -Xmx4096m - -XX:MaxDirectMemorySize=8192m - PULSAR_GC: > - -XX:+UseG1GC - -XX:MaxGCPauseMillis=10 - -XX:+ParallelRefProcEnabled - -XX:+UnlockExperimentalVMOptions - -XX:+DoEscapeAnalysis - -XX:ParallelGCThreads=4 - -XX:ConcGCThreads=4 - -XX:G1NewSizePercent=50 - -XX:+DisableExplicitGC - -XX:-ResizePLAB - -XX:+ExitOnOutOfMemoryError - -XX:+PerfDisableSharedMem - nettyMaxFrameSizeBytes: "104867840" -autorecovery: - affinity: - anti_affinity: false - component: recovery - replicaCount: 1 - resources: - requests: - memory: 128Mi - cpu: 0.1 - podMonitor: - enabled: false - configData: - BOOKIE_MEM: > - -Xms128m -Xmx128m - PULSAR_PREFIX_useV2WireProtocol: "true" -pulsar_metadata: - component: pulsar-init - image: - repository: apachepulsar/pulsar - tag: 3.0.7 - pullPolicy: IfNotPresent - -broker: - pdb: - usePolicy: false - affinity: - anti_affinity: false - component: broker - replicaCount: 2 - autoscaling: - enabled: false - podMonitor: - enabled: false - resources: - requests: - memory: 2048Mi - cpu: 0.5 - configData: - PULSAR_MEM: > - -Xms4096m -Xmx4096m -XX:MaxDirectMemorySize=8192m - PULSAR_GC: > - -XX:+UseG1GC - -XX:MaxGCPauseMillis=10 - -Dio.netty.leakDetectionLevel=disabled - -Dio.netty.recycler.linkCapacity=1024 - -XX:+ParallelRefProcEnabled - -XX:+UnlockExperimentalVMOptions - -XX:+DoEscapeAnalysis - -XX:ParallelGCThreads=4 - -XX:ConcGCThreads=4 - -XX:G1NewSizePercent=50 - -XX:+DisableExplicitGC - -XX:-ResizePLAB - -XX:+ExitOnOutOfMemoryError - -XX:+PerfDisableSharedMem - managedLedgerDefaultEnsembleSize: "3" - managedLedgerDefaultWriteQuorum: "3" - managedLedgerDefaultAckQuorum: "2" - maxMessageSize: "104857600" - defaultRetentionTimeInMinutes: "10080" - defaultRetentionSizeInMB: "-1" - backlogQuotaDefaultLimitGB: "8" - ttlDurationDefaultInSeconds: "259200" - subscriptionExpirationTimeMinutes: "3" - backlogQuotaDefaultRetentionPolicy: producer_exception - -proxy: - pdb: - usePolicy: false - affinity: - anti_affinity: false - component: proxy - replicaCount: 2 - autoscaling: - enabled: false - podMonitor: - enabled: false - resources: - requests: - memory: 1024Mi - cpu: 0.5 - configData: - PULSAR_MEM: > - -Xms512m -Xmx512m -XX:MaxDirectMemorySize=2048m - PULSAR_GC: > - -XX:+UseG1GC - -XX:MaxGCPauseMillis=10 - -Dio.netty.leakDetectionLevel=disabled - -Dio.netty.recycler.linkCapacity=1024 - -XX:+ParallelRefProcEnabled - -XX:+UnlockExperimentalVMOptions - -XX:+DoEscapeAnalysis - -XX:ParallelGCThreads=4 - -XX:ConcGCThreads=4 - -XX:G1NewSizePercent=50 - -XX:+DisableExplicitGC - -XX:-ResizePLAB - -XX:+ExitOnOutOfMemoryError - -XX:+PerfDisableSharedMem - httpNumThreads: "8" - ports: - http: 80 - https: 443 - pulsar: 6650 - pulsarssl: 6651 - containerPorts: - http: 8080 - https: 8443 - service: - annotations: {} - type: ClusterIP - -kube-prometheus-stack: - crds: - enabled: false - enabled: false - prometheus: - enabled: false - grafana: - enabled: false diff --git a/config/samples/milvus_pulsar_v3.yaml b/config/samples/milvus_pulsar_v2.yaml similarity index 90% rename from config/samples/milvus_pulsar_v3.yaml rename to config/samples/milvus_pulsar_v2.yaml index 71f89f96..cfe4b118 100644 --- a/config/samples/milvus_pulsar_v3.yaml +++ b/config/samples/milvus_pulsar_v2.yaml @@ -10,6 +10,6 @@ spec: msgStreamType: pulsar pulsar: inCluster: - chartVersion: pulsar-v3 + chartVersion: pulsar-v2 deletionPolicy: Delete pvcDeletion: true diff --git a/deploy/manifests/deployment.yaml b/deploy/manifests/deployment.yaml index 78fb1cb6..c9d824a9 100644 --- a/deploy/manifests/deployment.yaml +++ b/deploy/manifests/deployment.yaml @@ -11,10 +11,10 @@ metadata: name: "milvus-operator" namespace: "milvus-operator" labels: - helm.sh/chart: milvus-operator-1.1.9 + helm.sh/chart: milvus-operator-1.2.0 app.kubernetes.io/name: milvus-operator app.kubernetes.io/instance: milvus-operator - app.kubernetes.io/version: "1.1.9" + app.kubernetes.io/version: "1.2.0" app.kubernetes.io/managed-by: Helm --- # Source: milvus-operator/templates/crds.yaml @@ -15945,10 +15945,10 @@ kind: Service metadata: labels: service-kind: metrics - helm.sh/chart: milvus-operator-1.1.9 + helm.sh/chart: milvus-operator-1.2.0 app.kubernetes.io/name: milvus-operator app.kubernetes.io/instance: milvus-operator - app.kubernetes.io/version: "1.1.9" + app.kubernetes.io/version: "1.2.0" app.kubernetes.io/managed-by: Helm name: 'milvus-operator-metrics-service' namespace: "milvus-operator" @@ -15966,10 +15966,10 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: milvus-operator-1.1.9 + helm.sh/chart: milvus-operator-1.2.0 app.kubernetes.io/name: milvus-operator app.kubernetes.io/instance: milvus-operator - app.kubernetes.io/version: "1.1.9" + app.kubernetes.io/version: "1.2.0" app.kubernetes.io/managed-by: Helm name: 'milvus-operator-webhook-service' namespace: "milvus-operator" @@ -15988,10 +15988,10 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - helm.sh/chart: milvus-operator-1.1.9 + helm.sh/chart: milvus-operator-1.2.0 app.kubernetes.io/name: milvus-operator app.kubernetes.io/instance: milvus-operator - app.kubernetes.io/version: "1.1.9" + app.kubernetes.io/version: "1.2.0" app.kubernetes.io/managed-by: Helm name: "milvus-operator" namespace: "milvus-operator" @@ -16021,7 +16021,7 @@ spec: - --leader-elect command: - /manager - image: 'milvusdb/milvus-operator:v1.1.9' + image: 'milvusdb/milvus-operator:v1.2.0' imagePullPolicy: "IfNotPresent" livenessProbe: httpGet: diff --git a/docs/administration/manage-dependencies/message-storage.md b/docs/administration/manage-dependencies/message-storage.md index 754d2470..49472053 100644 --- a/docs/administration/manage-dependencies/message-storage.md +++ b/docs/administration/manage-dependencies/message-storage.md @@ -115,98 +115,81 @@ spec: # Omit other fields ... pulsar: inCluster: + chartVersion: pulsar-v3 + deletionPolicy: Delete + pvcDeletion: true values: - components: + volumes: + persistence: false + components: autorecovery: false - functions: false - toolset: false - pulsar_manager: false - monitoring: - prometheus: false - grafana: false - node_exporter: false - alert_manager: false - proxy: + zookeeper: replicaCount: 1 + podMonitor: + enabled: false resources: requests: - cpu: 0.01 - memory: 256Mi + memory: 64Mi + cpu: 0.001 + volumes: + # use a persistent volume or emptyDir + persistence: false configData: PULSAR_MEM: > - -Xms256m -Xmx256m - PULSAR_GC: > - -XX:MaxDirectMemorySize=256m + -Xms64m -Xmx256m bookkeeper: - replicaCount: 2 + component: bookie + replicaCount: 1 + podMonitor: + enabled: false resources: requests: - cpu: 0.01 - memory: 256Mi + memory: 64Mi + cpu: 0.001 + volumes: + # use a persistent volume or emptyDir + persistence: false configData: PULSAR_MEM: > - -Xms256m - -Xmx256m - -XX:MaxDirectMemorySize=256m - PULSAR_GC: > - -Dio.netty.leakDetectionLevel=disabled - -Dio.netty.recycler.linkCapacity=1024 - -XX:+UseG1GC -XX:MaxGCPauseMillis=10 - -XX:+ParallelRefProcEnabled - -XX:+UnlockExperimentalVMOptions - -XX:+DoEscapeAnalysis - -XX:ParallelGCThreads=32 - -XX:ConcGCThreads=32 - -XX:G1NewSizePercent=50 - -XX:+DisableExplicitGC - -XX:-ResizePLAB - -XX:+ExitOnOutOfMemoryError - -XX:+PerfDisableSharedMem - -XX:+PrintGCDetails - zookeeper: + -Xms64m + -Xmx4096m + -XX:MaxDirectMemorySize=8192m + autorecovery: + replicaCount: 0 + podMonitor: + enabled: false + broker: replicaCount: 1 + podMonitor: + enabled: false resources: requests: - cpu: 0.01 - memory: 256Mi + memory: 64Mi + cpu: 0.001 configData: PULSAR_MEM: > - -Xms256m - -Xmx256m - PULSAR_GC: > - -Dcom.sun.management.jmxremote - -Djute.maxbuffer=10485760 - -XX:+ParallelRefProcEnabled - -XX:+UnlockExperimentalVMOptions - -XX:+DoEscapeAnalysis -XX:+DisableExplicitGC - -XX:+PerfDisableSharedMem - -Dzookeeper.forceSync=no - broker: + -Xms64m -Xmx4096m -XX:MaxDirectMemorySize=8192m + managedLedgerDefaultEnsembleSize: '1' + managedLedgerDefaultWriteQuorum: '1' + managedLedgerDefaultAckQuorum: '1' + proxy: replicaCount: 1 + autoscaling: + enabled: false + podMonitor: + enabled: false + interval: 30s + scrapeTimeout: 10s resources: requests: - cpu: 0.01 - memory: 256Mi + memory: 64Mi + cpu: 0.001 configData: PULSAR_MEM: > - -Xms256m - -Xmx256m - PULSAR_GC: > - -XX:MaxDirectMemorySize=256m - -Dio.netty.leakDetectionLevel=disabled - -Dio.netty.recycler.linkCapacity=1024 - -XX:+ParallelRefProcEnabled - -XX:+UnlockExperimentalVMOptions - -XX:+DoEscapeAnalysis - -XX:ParallelGCThreads=32 - -XX:ConcGCThreads=32 - -XX:G1NewSizePercent=50 - -XX:+DisableExplicitGC - -XX:-ResizePLAB - -XX:+ExitOnOutOfMemoryError + -Xms64m -Xmx512m -XX:MaxDirectMemorySize=2048m ``` -> Find the complete configuration items to configure an internal Pulsar service in values.yaml. Add configuration items as needed under `pulsar.inCluster.values` as shown in the preceding example. +> Find the complete configuration items to configure an internal Pulsar service in values.yaml. Add configuration items as needed under `pulsar.inCluster.values` as shown in the preceding example. ## Configure Kafka diff --git a/docs/installation/installation.md b/docs/installation/installation.md index 719f8251..f4017249 100644 --- a/docs/installation/installation.md +++ b/docs/installation/installation.md @@ -12,7 +12,7 @@ For quick start, install with one line command: ```shell helm install milvus-operator \ -n milvus-operator --create-namespace \ - https://github.com/zilliztech/milvus-operator/releases/download/v1.1.9/milvus-operator-1.1.9.tgz + https://github.com/zilliztech/milvus-operator/releases/download/v1.2.0/milvus-operator-1.2.0.tgz ``` If you already have `cert-manager` v1.0+ installed which is not in its default configuration, you may encounter some error with the check of cert-manager installation. you can install with special options to disable the check: @@ -20,7 +20,7 @@ If you already have `cert-manager` v1.0+ installed which is not in its default c ``` helm install milvus-operator \ -n milvus-operator --create-namespace \ - https://github.com/zilliztech/milvus-operator/releases/download/v1.1.9/milvus-operator-1.1.9.tgz \ + https://github.com/zilliztech/milvus-operator/releases/download/v1.2.0/milvus-operator-1.2.0.tgz \ --set checker.disableCertManagerCheck=true ``` @@ -39,7 +39,7 @@ use helm commands to upgrade earlier milvus-operator to current version: ```shell helm upgrade -n milvus-operator milvus-operator --reuse-values \ - https://github.com/zilliztech/milvus-operator/releases/download/v1.1.9/milvus-operator-1.1.9.tgz + https://github.com/zilliztech/milvus-operator/releases/download/v1.2.0/milvus-operator-1.2.0.tgz ``` ## Delete operator @@ -62,7 +62,7 @@ If you don't want to use helm you can also install with kubectl and raw manifest ## Installation It is recommended to install the milvus operator with a newest stable version ```shell -kubectl apply -f https://github.com/zilliztech/milvus-operator/v1.1.9/deploy/manifests/deployment.yaml +kubectl apply -f https://github.com/zilliztech/milvus-operator/v1.2.0/deploy/manifests/deployment.yaml ``` Check the installed operators: @@ -85,7 +85,7 @@ Same as installation, you can update the milvus operator with a newer version by Delete the milvus operator stack by the deployment manifest: ```shell -kubectl delete -f https://github.com/zilliztech/milvus-operator/v1.1.9/deploy/manifests/deployment.yaml +kubectl delete -f https://github.com/zilliztech/milvus-operator/v1.2.0/deploy/manifests/deployment.yaml ``` Or delete the milvus operator stack by using makefile: diff --git a/pkg/config/config.go b/pkg/config/config.go index 7b72be09..6974aecc 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -8,7 +8,7 @@ import ( ) const ( - DefaultMilvusVersion = "v2.4.21" + DefaultMilvusVersion = "v2.5.4" DefaultMilvusBaseImage = "milvusdb/milvus" DefaultMilvusImage = DefaultMilvusBaseImage + ":" + DefaultMilvusVersion DefaultImagePullPolicy = corev1.PullIfNotPresent diff --git a/pkg/controllers/dependencies.go b/pkg/controllers/dependencies.go index a7a281c4..e1adfee8 100644 --- a/pkg/controllers/dependencies.go +++ b/pkg/controllers/dependencies.go @@ -18,10 +18,11 @@ import ( //go:generate mockgen -package=controllers -source=dependencies.go -destination=dependencies_mock.go HelmReconciler const ( - Etcd = "etcd" - Minio = "minio" - Pulsar = "pulsar" - Kafka = "kafka" + Etcd = "etcd" + Minio = "minio" + Pulsar = "pulsar" + PulsarV3 = "pulsar-v3" + Kafka = "kafka" ) // HelmReconciler reconciles Helm releases @@ -78,6 +79,10 @@ func getRESTClientGetterWithNamespace(env *cli.EnvSettings, namespace string) ge } } +func IsPulsarChartPath(chartPath string) bool { + return chartPath == helm.GetChartPathByName(Pulsar) +} + // ReconcileHelm reconciles Helm releases func (l LocalHelmReconciler) Reconcile(ctx context.Context, request helm.ChartRequest) error { cfg := l.NewHelmCfg(request.Namespace) diff --git a/pkg/helm/helm.go b/pkg/helm/helm.go index 263acc73..390f7a97 100644 --- a/pkg/helm/helm.go +++ b/pkg/helm/helm.go @@ -3,7 +3,6 @@ package helm import ( "errors" "reflect" - "strings" "github.com/milvus-io/milvus-operator/apis/milvus.io/v1beta1" "github.com/milvus-io/milvus-operator/pkg/helm/values" @@ -133,11 +132,12 @@ func GetChartPathByName(chart string) string { func GetChartRequest(mc v1beta1.Milvus, dep values.DependencyKind, chart string) ChartRequest { inCluster := reflect.ValueOf(mc.Spec.Dep).FieldByName(string(dep)). FieldByName("InCluster").Interface().(*v1beta1.InClusterConfig) + chartKind := chart switch inCluster.ChartVersion { case values.ChartVersionPulsarV3: chart = values.PulsarV3 + chartKind = values.Pulsar } - chartKind := strings.Split(chart, "-")[0] return ChartRequest{ ReleaseName: mc.Name + "-" + chartKind, Namespace: mc.Namespace, diff --git a/pkg/helm/values/values.go b/pkg/helm/values/values.go index 6a441e16..0d55ec62 100644 --- a/pkg/helm/values/values.go +++ b/pkg/helm/values/values.go @@ -23,10 +23,11 @@ const ( DependencyKindPulsar DependencyKind = "Pulsar" DependencyKindKafka DependencyKind = "Kafka" + // Chart names & values sub-fields in milvus-helm Etcd = "etcd" Minio = "minio" Pulsar = "pulsar" - PulsarV3 = string(ChartVersionPulsarV3) + PulsarV3 = "pulsarv3" Kafka = "kafka" ) @@ -34,8 +35,6 @@ const ( ValuesRootPath = "config/assets/charts" // DefaultValuesPath is the path to the default values file DefaultValuesPath = ValuesRootPath + "/values.yaml" - - DefaultPulsarV3ValuesPath = ValuesRootPath + "/pulsar-v3-values.yaml" ) type DefaultValuesProvider interface { @@ -59,17 +58,12 @@ func MustInitDefaultValuesProvider() { err = errors.Wrapf(err, "failed to read default helm chart values from [%s]", DefaultValuesPath) panic(err) } - pulsarV3Values, err := readValuesFromFile(DefaultPulsarV3ValuesPath) - if err != nil { - err = errors.Wrapf(err, "failed to read default pulsar v3 chart values from [%s]", DefaultPulsarV3ValuesPath) - panic(err) - } globalDefaultValues = &DefaultValuesProviderImpl{ chartDefaultValues: map[Chart]Values{ Etcd: values[Etcd].(Values), Minio: values[Minio].(Values), Pulsar: values[Pulsar].(Values), - PulsarV3: Values(pulsarV3Values), + PulsarV3: values[PulsarV3].(Values), Kafka: values[Kafka].(Values), }, }