Skip to content
Open
Show file tree
Hide file tree
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
24 changes: 24 additions & 0 deletions config/crd/bases/starrocks.com_starrocksclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2634,6 +2634,12 @@ spec:
type: string
description: the pod labels for user select or classify pods.
type: object
priorityClassName:
description: |-
If specified, Pods can have priority. Priority indicates the importance of a Pod relative to other Pods. If a Pod
cannot be scheduled, the scheduler tries to preempt (evict) lower priority Pods to make scheduling
More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption of the pending Pod possible.
type: string
readOnlyRootFilesystem:
description: "Whether this container has a read-only root filesystem.\nDefault
is false.\nNote that:\n\t1. This field cannot be set when spec.os.name
Expand Down Expand Up @@ -7637,6 +7643,12 @@ spec:
type: string
description: the pod labels for user select or classify pods.
type: object
priorityClassName:
description: |-
If specified, Pods can have priority. Priority indicates the importance of a Pod relative to other Pods. If a Pod
cannot be scheduled, the scheduler tries to preempt (evict) lower priority Pods to make scheduling
More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption of the pending Pod possible.
type: string
readOnlyRootFilesystem:
description: "Whether this container has a read-only root filesystem.\nDefault
is false.\nNote that:\n\t1. This field cannot be set when spec.os.name
Expand Down Expand Up @@ -10534,6 +10546,12 @@ spec:
type: string
description: the pod labels for user select or classify pods.
type: object
priorityClassName:
description: |-
If specified, Pods can have priority. Priority indicates the importance of a Pod relative to other Pods. If a Pod
cannot be scheduled, the scheduler tries to preempt (evict) lower priority Pods to make scheduling
More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption of the pending Pod possible.
type: string
readinessProbeFailureSeconds:
description: |-
ReadinessProbeFailureSeconds defines the total failure seconds of readiness Probe.
Expand Down Expand Up @@ -13526,6 +13544,12 @@ spec:
type: string
description: the pod labels for user select or classify pods.
type: object
priorityClassName:
description: |-
If specified, Pods can have priority. Priority indicates the importance of a Pod relative to other Pods. If a Pod
cannot be scheduled, the scheduler tries to preempt (evict) lower priority Pods to make scheduling
More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption of the pending Pod possible.
type: string
readOnlyRootFilesystem:
description: "Whether this container has a read-only root filesystem.\nDefault
is false.\nNote that:\n\t1. This field cannot be set when spec.os.name
Expand Down
6 changes: 6 additions & 0 deletions config/crd/bases/starrocks.com_starrockswarehouses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3230,6 +3230,12 @@ spec:
type: string
description: the pod labels for user select or classify pods.
type: object
priorityClassName:
description: |-
If specified, Pods can have priority. Priority indicates the importance of a Pod relative to other Pods. If a Pod
cannot be scheduled, the scheduler tries to preempt (evict) lower priority Pods to make scheduling
More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption of the pending Pod possible.
type: string
readOnlyRootFilesystem:
description: "Whether this container has a read-only root filesystem.\nDefault
is false.\nNote that:\n\t1. This field cannot be set when spec.os.name
Expand Down
8 changes: 8 additions & 0 deletions deploy/starrocks.com_starrocksclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,8 @@ spec:
additionalProperties:
type: string
type: object
priorityClassName:
type: string
readOnlyRootFilesystem:
type: boolean
readinessProbeFailureSeconds:
Expand Down Expand Up @@ -3662,6 +3664,8 @@ spec:
additionalProperties:
type: string
type: object
priorityClassName:
type: string
readOnlyRootFilesystem:
type: boolean
readinessProbeFailureSeconds:
Expand Down Expand Up @@ -4994,6 +4998,8 @@ spec:
additionalProperties:
type: string
type: object
priorityClassName:
type: string
readinessProbeFailureSeconds:
format: int32
type: integer
Expand Down Expand Up @@ -6387,6 +6393,8 @@ spec:
additionalProperties:
type: string
type: object
priorityClassName:
type: string
readOnlyRootFilesystem:
type: boolean
readinessProbeFailureSeconds:
Expand Down
2 changes: 2 additions & 0 deletions deploy/starrocks.com_starrockswarehouses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1603,6 +1603,8 @@ spec:
additionalProperties:
type: string
type: object
priorityClassName:
type: string
readOnlyRootFilesystem:
type: boolean
readinessProbeFailureSeconds:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ spec:
{{- end }}
replicas: {{ .Values.starrocksFESpec.replicas }}
imagePullPolicy: {{ .Values.starrocksFESpec.imagePullPolicy }}
{{- if .Values.starrocksFESpec.priorityClassName }}
priorityClassName: {{ .Values.starrocksFESpec.priorityClassName }}
{{- end }}
{{- if .Values.starrocksFESpec.maxUnavailablePods }}
updateStrategy:
rollingUpdate:
Expand Down Expand Up @@ -296,6 +299,9 @@ spec:
{{- end }}
replicas: {{ .Values.starrocksBeSpec.replicas }}
imagePullPolicy: {{ .Values.starrocksBeSpec.imagePullPolicy }}
{{- if .Values.starrocksBeSpec.priorityClassName }}
priorityClassName: {{ .Values.starrocksBeSpec.priorityClassName }}
{{- end }}
{{- if .Values.starrocksBeSpec.maxUnavailablePods }}
updateStrategy:
rollingUpdate:
Expand Down Expand Up @@ -593,6 +599,9 @@ spec:
replicas: {{ .Values.starrocksCnSpec.replicas }}
{{- end }}
imagePullPolicy: {{ .Values.starrocksCnSpec.imagePullPolicy }}
{{- if .Values.starrocksCnSpec.priorityClassName }}
priorityClassName: {{ .Values.starrocksCnSpec.priorityClassName }}
{{- end }}
{{- if .Values.starrocksCnSpec.maxUnavailablePods }}
updateStrategy:
rollingUpdate:
Expand Down Expand Up @@ -888,6 +897,9 @@ spec:
{{- end }}
replicas: {{ .Values.starrocksFeProxySpec.replicas }}
imagePullPolicy: {{ .Values.starrocksFeProxySpec.imagePullPolicy }}
{{- if .Values.starrocksFeProxySpec.priorityClassName }}
priorityClassName: {{ .Values.starrocksFeProxySpec.priorityClassName }}
{{- end }}
resolver: {{ .Values.starrocksFeProxySpec.resolver }}
{{- if .Values.starrocksFeProxySpec.resources }}
{{- toYaml .Values.starrocksFeProxySpec.resources | nindent 4 }}
Expand Down
16 changes: 16 additions & 0 deletions helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ starrocksFESpec:
# When this is set containers will be able to view and signal processes from other containers
# in the same pod, and the first process in each container will not be assigned PID 1.
shareProcessNamespace:
# priorityClassName allows you to assign a [Kubernetes PriorityClass]
# to the pods of this component. This determines the scheduling priority of pods and their eviction order under resource pressure.
# see https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass for more details.
priorityClassName:

# spec for compute node, compute node provide compute function.
starrocksCnSpec:
Expand Down Expand Up @@ -817,6 +821,10 @@ starrocksCnSpec:
# When this is set containers will be able to view and signal processes from other containers
# in the same pod, and the first process in each container will not be assigned PID 1.
shareProcessNamespace:
# priorityClassName allows you to assign a [Kubernetes PriorityClass]
# to the pods of this component. This determines the scheduling priority of pods and their eviction order under resource pressure.
# see https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass for more details.
priorityClassName:

# spec for component be, provide storage and compute function.
starrocksBeSpec:
Expand Down Expand Up @@ -1128,6 +1136,10 @@ starrocksBeSpec:
# When this is set containers will be able to view and signal processes from other containers
# in the same pod, and the first process in each container will not be assigned PID 1.
shareProcessNamespace:
# priorityClassName allows you to assign a [Kubernetes PriorityClass]
# to the pods of this component. This determines the scheduling priority of pods and their eviction order under resource pressure.
# see https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass for more details.
priorityClassName:

# create secrets if necessary.
secrets: []
Expand Down Expand Up @@ -1247,3 +1259,7 @@ starrocksFeProxySpec:
# e.g. mount an emptyDir volume to /tmp
# - name: tmp-data
# mountPath: /tmp
# priorityClassName allows you to assign a [Kubernetes PriorityClass]
# to the pods of this component. This determines the scheduling priority of pods and their eviction order under resource pressure.
# see https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass for more details.
priorityClassName:
16 changes: 16 additions & 0 deletions helm-charts/charts/kube-starrocks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,10 @@ starrocks:
# When this is set containers will be able to view and signal processes from other containers
# in the same pod, and the first process in each container will not be assigned PID 1.
shareProcessNamespace:
# priorityClassName allows you to assign a [Kubernetes PriorityClass]
# to the pods of this component. This determines the scheduling priority of pods and their eviction order under resource pressure.
# see https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass for more details.
priorityClassName:

# spec for compute node, compute node provide compute function.
starrocksCnSpec:
Expand Down Expand Up @@ -934,6 +938,10 @@ starrocks:
# When this is set containers will be able to view and signal processes from other containers
# in the same pod, and the first process in each container will not be assigned PID 1.
shareProcessNamespace:
# priorityClassName allows you to assign a [Kubernetes PriorityClass]
# to the pods of this component. This determines the scheduling priority of pods and their eviction order under resource pressure.
# see https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass for more details.
priorityClassName:

# spec for component be, provide storage and compute function.
starrocksBeSpec:
Expand Down Expand Up @@ -1245,6 +1253,10 @@ starrocks:
# When this is set containers will be able to view and signal processes from other containers
# in the same pod, and the first process in each container will not be assigned PID 1.
shareProcessNamespace:
# priorityClassName allows you to assign a [Kubernetes PriorityClass]
# to the pods of this component. This determines the scheduling priority of pods and their eviction order under resource pressure.
# see https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass for more details.
priorityClassName:

# create secrets if necessary.
secrets: []
Expand Down Expand Up @@ -1364,3 +1376,7 @@ starrocks:
# e.g. mount an emptyDir volume to /tmp
# - name: tmp-data
# mountPath: /tmp
# priorityClassName allows you to assign a [Kubernetes PriorityClass]
# to the pods of this component. This determines the scheduling priority of pods and their eviction order under resource pressure.
# see https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass for more details.
priorityClassName:
4 changes: 4 additions & 0 deletions pkg/apis/starrocks/v1/component_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,7 @@ const (
DRPhaseDoing DRPhase = "doing"
DRPhaseDone DRPhase = "done"
)

func (spec *StarRocksComponentSpec) GetPriorityClassName() string {
return spec.PriorityClassName
}
11 changes: 11 additions & 0 deletions pkg/apis/starrocks/v1/load_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type loadInterface interface {
GetImagePullPolicy() corev1.PullPolicy
GetCommand() []string
GetArgs() []string
GetPriorityClassName() string
}

type StarRocksLoadSpec struct {
Expand Down Expand Up @@ -169,6 +170,12 @@ type StarRocksLoadSpec struct {
// Optional: Default to false.
// +optional
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty"`

//If specified, Pods can have priority. Priority indicates the importance of a Pod relative to other Pods. If a Pod
//cannot be scheduled, the scheduler tries to preempt (evict) lower priority Pods to make scheduling
//More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption of the pending Pod possible.
// +optional
PriorityClassName string `json:"priorityClassName,omitempty"`
}

// StarRocksService defines external service for starrocks component.
Expand Down Expand Up @@ -333,3 +340,7 @@ func (spec *StarRocksLoadSpec) GetImagePullPolicy() corev1.PullPolicy {
}
return spec.ImagePullPolicy
}

func (spec *StarRocksLoadSpec) GetPriorityClassName() string {
return spec.PriorityClassName
}
4 changes: 4 additions & 0 deletions pkg/apis/starrocks/v1/starrockscluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ func (spec *StarRocksFeProxySpec) IsReadOnlyRootFilesystem() *bool {
// that StarRocksFeProxySpec needs to implement SpecInterface interface
func (spec *StarRocksFeProxySpec) GetSysctls() []corev1.Sysctl { return nil }

func (spec *StarRocksFeProxySpec) GetPriorityClassName() string {
return spec.StarRocksLoadSpec.GetPriorityClassName()
}

// Phase is defined under status, e.g.
// 1. StarRocksClusterStatus.Phase represents the phase of starrocks cluster.
// 2. StarRocksWarehouseStatus.Phase represents the phase of starrocks warehouse.
Expand Down
1 change: 1 addition & 0 deletions pkg/k8sutils/templates/pod/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ func Spec(spec v1.SpecInterface, container corev1.Container, volumes []corev1.Vo
SchedulerName: spec.GetSchedulerName(),
AutomountServiceAccountToken: func() *bool { b := false; return &b }(),
ShareProcessNamespace: spec.GetShareProcessNamespace(),
PriorityClassName: spec.GetPriorityClassName(),
}
return podSpec
}
Expand Down