Skip to content

Commit

Permalink
use point util
Browse files Browse the repository at this point in the history
  • Loading branch information
catpineapple committed Nov 12, 2024
1 parent 5a0594c commit be98721
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/sub_controller/be/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"context"
"fmt"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
"strconv"

v1 "github.com/apache/doris-operator/api/doris/v1"
Expand All @@ -39,11 +40,10 @@ func (be *Controller) buildBEPodTemplateSpec(dcr *v1.DorisCluster) corev1.PodTem
containers = append(containers, beContainer)

if dcr.Spec.BeSpec.EnableWorkloadGroup {
privileged := true
if dcr.Spec.BeSpec.ContainerSecurityContext == nil {
dcr.Spec.BeSpec.ContainerSecurityContext = &corev1.SecurityContext{}
}
dcr.Spec.BeSpec.ContainerSecurityContext.Privileged = &privileged
dcr.Spec.BeSpec.ContainerSecurityContext.Privileged = pointer.Bool(true)
}
containers = resource.ApplySecurityContext(containers, dcr.Spec.BeSpec.ContainerSecurityContext)

Expand Down

0 comments on commit be98721

Please sign in to comment.