Skip to content

Commit 4b81f6b

Browse files
maltelehmannbrandond
authored andcommitted
fix: use string instead of *string for PrioClassName
1 parent a3dc281 commit 4b81f6b

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

pkg/apis/upgrade.cattle.io/v1/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ type PlanSpec struct {
8383
// Time after a Job for one Node is complete before a new Job will be created for the next Node.
8484
PostCompleteDelay *metav1.Duration `json:"postCompleteDelay,omitempty"`
8585
// Priority Class Name of Job, if specified.
86-
PriorityClassName *string `json:"priorityClassName,omitempty"`
86+
PriorityClassName string `json:"priorityClassName,omitempty"`
8787
}
8888

8989
// PlanStatus represents the resulting state from processing Plan events.

pkg/apis/upgrade.cattle.io/v1/zz_generated_deepcopy.go

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/upgrade/job/job.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ func New(plan *upgradeapiv1.Plan, node *corev1.Node, controllerName string) *bat
195195
HostPID: true,
196196
HostNetwork: true,
197197
DNSPolicy: corev1.DNSClusterFirstWithHostNet,
198+
PriorityClassName: plan.Spec.PriorityClassName,
198199
ServiceAccountName: plan.Spec.ServiceAccountName,
199200
Affinity: &corev1.Affinity{
200201
NodeAffinity: &corev1.NodeAffinity{
@@ -282,10 +283,6 @@ func New(plan *upgradeapiv1.Plan, node *corev1.Node, controllerName string) *bat
282283

283284
podTemplate := &job.Spec.Template
284285

285-
// setup priority class
286-
if prioClassName := plan.Spec.PriorityClassName; prioClassName != nil {
287-
podTemplate.Spec.PriorityClassName = *prioClassName
288-
}
289286
// setup secrets volumes
290287
for _, secret := range plan.Spec.Secrets {
291288
podTemplate.Spec.Volumes = append(podTemplate.Spec.Volumes, corev1.Volume{

0 commit comments

Comments
 (0)