Skip to content

Commit

Permalink
fix for default priorityClasses (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
enrichman authored Jan 14, 2025
1 parent ccaa09f commit 349f54d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion k3k-kubelet/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,14 @@ func (p *Provider) CreatePod(ctx context.Context, pod *corev1.Pod) error {
tPod.Spec.NodeName = ""

tPod.Spec.NodeSelector = cluster.Spec.NodeSelector
tPod.Spec.PriorityClassName = cluster.Spec.PriorityClass

// if the priorityCluss for the virtual cluster is set then override the provided value
// Note: the core-dns and local-path-provisioner pod are scheduled by k3s with the
// 'system-cluster-critical' and 'system-node-critical' default priority classes.
if cluster.Spec.PriorityClass != "" {
tPod.Spec.PriorityClassName = cluster.Spec.PriorityClass
tPod.Spec.Priority = nil
}

// volumes will often refer to resources in the virtual cluster, but instead need to refer to the sync'd
// host cluster version
Expand Down

0 comments on commit 349f54d

Please sign in to comment.