diff --git a/apis/milvus.io/v1beta1/dependencies_types.go b/apis/milvus.io/v1beta1/dependencies_types.go index 90f7b54..5f05337 100644 --- a/apis/milvus.io/v1beta1/dependencies_types.go +++ b/apis/milvus.io/v1beta1/dependencies_types.go @@ -72,13 +72,15 @@ type MilvusEtcd struct { type InClusterConfig struct { // +kubebuilder:validation:Optional // +kubebuilder:pruning:PreserveUnknownFields + // +nullable Values Values `json:"values,omitempty"` // ChartVersion is the pulsar chart version to be installed // For now only pulsar uses this field // pulsar-v2 (v2.7.8) & pulsar-v3 (v3.3.0) can be used - // default to pulsar-v2 for backward compatibility + // after v1.1.4, pulsar-v3 is used for new milvus // note it's the version of chart, not pulsar + // pulsar v2.x should use pulsar-v2 chart, & pulsar v3.x should use pulsar-v3 chart // +kubebuilder:validation:Optional ChartVersion values.ChartVersion `json:"chartVersion,omitempty"` diff --git a/apis/milvus.io/v1beta1/milvus_webhook.go b/apis/milvus.io/v1beta1/milvus_webhook.go index 361fdab..41ff190 100644 --- a/apis/milvus.io/v1beta1/milvus_webhook.go +++ b/apis/milvus.io/v1beta1/milvus_webhook.go @@ -461,6 +461,9 @@ func (r *Milvus) defaultMsgStream() { if r.Spec.Dep.Pulsar.InCluster.Values.Data == nil { r.Spec.Dep.Pulsar.InCluster.Values.Data = map[string]interface{}{} } + if r.IsFirstTimeStarting() { + r.Spec.Dep.Pulsar.InCluster.ChartVersion = "pulsar-v3" + } r.defaultValuesByDependency(values.DependencyKindPulsar) if r.Spec.Dep.Pulsar.InCluster.DeletionPolicy == "" { r.Spec.Dep.Pulsar.InCluster.DeletionPolicy = DeletionPolicyRetain diff --git a/apis/milvus.io/v1beta1/milvus_webhook_test.go b/apis/milvus.io/v1beta1/milvus_webhook_test.go index 1497d94..cf23d53 100644 --- a/apis/milvus.io/v1beta1/milvus_webhook_test.go +++ b/apis/milvus.io/v1beta1/milvus_webhook_test.go @@ -27,6 +27,8 @@ func TestMilvus_Default_NotExternal(t *testing.T) { Data: map[string]interface{}{}, }, } + pulsarDefaultInClusterConfig := defaultInClusterConfig.DeepCopy() + pulsarDefaultInClusterConfig.ChartVersion = "pulsar-v3" etcdStandaloneDefaultInClusterConfig := defaultInClusterConfig.DeepCopy() etcdStandaloneDefaultInClusterConfig.Values.Data["replicaCount"] = int64(1) @@ -92,7 +94,7 @@ func TestMilvus_Default_NotExternal(t *testing.T) { clusterDefault.Dep.MsgStreamType = MsgStreamTypePulsar clusterDefault.Dep.Pulsar = MilvusPulsar{ Endpoint: "mc-pulsar-proxy.default:6650", - InCluster: defaultInClusterConfig, + InCluster: pulsarDefaultInClusterConfig, } clusterDefault.Dep.Etcd.Endpoints = []string{ "mc-etcd-0.mc-etcd-headless.default:2379", diff --git a/charts/milvus-operator/templates/crds.yaml b/charts/milvus-operator/templates/crds.yaml index f926e65..4ebcd3d 100644 --- a/charts/milvus-operator/templates/crds.yaml +++ b/charts/milvus-operator/templates/crds.yaml @@ -6331,6 +6331,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -6357,6 +6358,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -6417,6 +6419,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -6468,6 +6471,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -7082,6 +7086,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -7108,6 +7113,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -7168,6 +7174,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -7219,6 +7226,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -13960,6 +13968,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -13986,6 +13995,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -14046,6 +14056,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -14097,6 +14108,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object diff --git a/config/assets/charts/pulsar-v3-values.yaml b/config/assets/charts/pulsar-v3-values.yaml index abdf485..510d6d9 100644 --- a/config/assets/charts/pulsar-v3-values.yaml +++ b/config/assets/charts/pulsar-v3-values.yaml @@ -1,5 +1,7 @@ # This file contains recommended default values for a production deployment persistence: true +extra: {} +monitoring: {} volumes: persistence: true local_storage: false @@ -25,35 +27,37 @@ components: images: zookeeper: repository: apachepulsar/pulsar - tag: 3.0.2 + tag: 3.0.7 pullPolicy: IfNotPresent bookie: repository: apachepulsar/pulsar - tag: 3.0.2 + tag: 3.0.7 pullPolicy: IfNotPresent autorecovery: repository: apachepulsar/pulsar - tag: 3.0.2 + tag: 3.0.7 pullPolicy: IfNotPresent broker: repository: apachepulsar/pulsar - tag: 3.0.2 + tag: 3.0.7 pullPolicy: IfNotPresent proxy: repository: apachepulsar/pulsar - tag: 3.0.2 + 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: true - interval: 10s - scrapeTimeout: 10s + enabled: false resources: requests: memory: 256Mi @@ -81,15 +85,17 @@ zookeeper: -XX:+PerfDisableSharedMem bookkeeper: + pdb: + usePolicy: false + affinity: + anti_affinity: false component: bookie replicaCount: 3 updateStrategy: type: RollingUpdate podManagementPolicy: Parallel podMonitor: - enabled: true - interval: 30s - scrapeTimeout: 10s + enabled: false resources: requests: memory: 2048Mi @@ -99,11 +105,11 @@ bookkeeper: persistence: true journal: name: journal - size: 50Gi + size: 100Gi local_storage: false ledgers: name: ledgers - size: 500Gi + size: 200Gi local_storage: false configData: PULSAR_MEM: > @@ -123,18 +129,18 @@ bookkeeper: -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem - + nettyMaxFrameSizeBytes: "104867840" autorecovery: + affinity: + anti_affinity: false component: recovery replicaCount: 1 - podMonitor: - enabled: true - interval: 30s - scrapeTimeout: 10s resources: requests: memory: 128Mi cpu: 0.1 + podMonitor: + enabled: false configData: BOOKIE_MEM: > -Xms128m -Xmx128m @@ -143,18 +149,20 @@ pulsar_metadata: component: pulsar-init image: repository: apachepulsar/pulsar - tag: 3.0.2 + tag: 3.0.7 pullPolicy: IfNotPresent broker: + pdb: + usePolicy: false + affinity: + anti_affinity: false component: broker replicaCount: 2 autoscaling: enabled: false podMonitor: - enabled: true - interval: 30s - scrapeTimeout: 10s + enabled: false resources: requests: memory: 2048Mi @@ -189,14 +197,16 @@ broker: backlogQuotaDefaultRetentionPolicy: producer_exception proxy: + pdb: + usePolicy: false + affinity: + anti_affinity: false component: proxy replicaCount: 2 autoscaling: enabled: false podMonitor: - enabled: true - interval: 30s - scrapeTimeout: 10s + enabled: false resources: requests: memory: 1024Mi @@ -240,4 +250,3 @@ kube-prometheus-stack: enabled: false grafana: enabled: false - diff --git a/config/crd/bases/milvus.io_milvusclusters.yaml b/config/crd/bases/milvus.io_milvusclusters.yaml index b00ee84..0f8a9b0 100644 --- a/config/crd/bases/milvus.io_milvusclusters.yaml +++ b/config/crd/bases/milvus.io_milvusclusters.yaml @@ -6329,6 +6329,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -6355,6 +6356,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -6415,6 +6417,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -6466,6 +6469,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object diff --git a/config/crd/bases/milvus.io_milvuses.yaml b/config/crd/bases/milvus.io_milvuses.yaml index df566da..9196049 100644 --- a/config/crd/bases/milvus.io_milvuses.yaml +++ b/config/crd/bases/milvus.io_milvuses.yaml @@ -429,6 +429,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -455,6 +456,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -515,6 +517,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -566,6 +569,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -7307,6 +7311,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -7333,6 +7338,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -7393,6 +7399,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -7444,6 +7451,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object diff --git a/deploy/manifests/deployment.yaml b/deploy/manifests/deployment.yaml index 42bb492..0a6489a 100644 --- a/deploy/manifests/deployment.yaml +++ b/deploy/manifests/deployment.yaml @@ -6349,6 +6349,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -6375,6 +6376,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -6435,6 +6437,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -6486,6 +6489,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -7101,6 +7105,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -7127,6 +7132,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -7187,6 +7193,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -7238,6 +7245,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -13979,6 +13987,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -14005,6 +14014,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -14065,6 +14075,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object @@ -14116,6 +14127,7 @@ spec: pvcDeletion: type: boolean values: + nullable: true type: object x-kubernetes-preserve-unknown-fields: true type: object