Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ package metaservice

import (
"context"
"github.com/apache/doris-operator/api/disaggregated/v1"

v1 "github.com/apache/doris-operator/api/disaggregated/v1"
"github.com/apache/doris-operator/pkg/common/utils/k8s"
"github.com/apache/doris-operator/pkg/common/utils/metadata"
"github.com/apache/doris-operator/pkg/common/utils/resource"
Expand Down Expand Up @@ -59,19 +60,7 @@ func (dms *DisaggregatedMSController) newStatefulset(ddc *v1.DorisDisaggregatedC

msSpec := ddc.Spec.MetaService
matchLabels := dms.newMSPodsSelector(ddc.Name)
var volumeClaimTemplates []corev1.PersistentVolumeClaim
cpv := msSpec.PersistentVolume
if cpv != nil {
pvc := corev1.PersistentVolumeClaim{
ObjectMeta: metav1.ObjectMeta{
Name: defaultLogPrefixName,
Annotations: resource.NewAnnotations(),
},
Spec: cpv.PersistentVolumeClaimSpec,
}
volumeClaimTemplates = append(volumeClaimTemplates, pvc)
}

_, _, vcts := dms.BuildVolumesVolumeMountsAndPVCs(confMap, v1.DisaggregatedMS, &msSpec.CommonSpec)
replicas := metadata.GetInt32Pointer(v1.DefaultMetaserviceNumber)
if msSpec.Replicas != nil {
replicas = msSpec.Replicas
Expand All @@ -84,7 +73,7 @@ func (dms *DisaggregatedMSController) newStatefulset(ddc *v1.DorisDisaggregatedC
}
st.Spec.Template = dms.NewPodTemplateSpec(ddc, matchLabels, confMap)
st.Spec.ServiceName = ddc.GetMSServiceName()
st.Spec.VolumeClaimTemplates = volumeClaimTemplates
st.Spec.VolumeClaimTemplates = vcts
}()

return st
Expand Down