Skip to content
Draft
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
4 changes: 4 additions & 0 deletions api/v1/runtimecomponent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ type RuntimeComponentSpec struct {
// DNS settings for the pod.
// +operator-sdk:csv:customresourcedefinitions:order=29,type=spec,displayName="DNS"
DNS *RuntimeComponentDNS `json:"dns,omitempty"`

// Name of the PriorityClass for the pod.
// +operator-sdk:csv:customresourcedefinitions:order=30,type=spec,displayName="Priority Class Name"
PriorityClassName *string `json:"priorityClassName,omitempty"`
}

// Defines the DNS
Expand Down
1 change: 1 addition & 0 deletions common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,5 @@ type BaseComponent interface {
GetDisableServiceLinks() *bool
GetTolerations() []corev1.Toleration
GetDNS() BaseComponentDNS
GetPriorityClassName() *string
}
4 changes: 4 additions & 0 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,10 @@ func CustomizePodSpec(pts *corev1.PodTemplateSpec, ba common.BaseComponent) {
}

pts.Spec.Tolerations = ba.GetTolerations()

if ba.GetPriorityClassName() != nil {
pts.Spec.PriorityClassName = *ba.GetPriorityClassName()
}
}

// Initialize an empty TopologySpreadConstraints list and optionally prefers scheduling across zones/hosts for pods with podMatchLabels
Expand Down