Skip to content

Commit

Permalink
pulsarv3: update default values, default to 3.0.7, enabled for new in…
Browse files Browse the repository at this point in the history
…stance

Signed-off-by: haorenfsa <[email protected]>
  • Loading branch information
haorenfsa committed Nov 28, 2024
1 parent ea9cd59 commit 62bb8dd
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 28 deletions.
4 changes: 3 additions & 1 deletion apis/milvus.io/v1beta1/dependencies_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand Down
3 changes: 3 additions & 0 deletions apis/milvus.io/v1beta1/milvus_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion apis/milvus.io/v1beta1/milvus_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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",
Expand Down
12 changes: 12 additions & 0 deletions charts/milvus-operator/templates/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6331,6 +6331,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand All @@ -6357,6 +6358,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -6417,6 +6419,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -6468,6 +6471,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -7082,6 +7086,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand All @@ -7108,6 +7113,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -7168,6 +7174,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -7219,6 +7226,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -13960,6 +13968,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand All @@ -13986,6 +13995,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -14046,6 +14056,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -14097,6 +14108,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down
61 changes: 35 additions & 26 deletions config/assets/charts/pulsar-v3-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# This file contains recommended default values for a production deployment
persistence: true
extra: {}
monitoring: {}
volumes:
persistence: true
local_storage: false
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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: >
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -240,4 +250,3 @@ kube-prometheus-stack:
enabled: false
grafana:
enabled: false

4 changes: 4 additions & 0 deletions config/crd/bases/milvus.io_milvusclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6329,6 +6329,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand All @@ -6355,6 +6356,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -6415,6 +6417,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -6466,6 +6469,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down
8 changes: 8 additions & 0 deletions config/crd/bases/milvus.io_milvuses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand All @@ -455,6 +456,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -515,6 +517,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -566,6 +569,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -7307,6 +7311,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand All @@ -7333,6 +7338,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -7393,6 +7399,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down Expand Up @@ -7444,6 +7451,7 @@ spec:
pvcDeletion:
type: boolean
values:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
Expand Down
Loading

0 comments on commit 62bb8dd

Please sign in to comment.